2
0

2 Commits ed5ca3b3f5 ... a72c752c6a

Autor SHA1 Mensagem Data
  fanghuisheng a72c752c6a 门禁功能代码完善/配置新增 há 1 semana atrás
  fanghuisheng ced170ddeb 删除冗余文件 há 4 meses atrás
65 ficheiros alterados com 961 adições e 2346 exclusões
  1. 0 18
      AndroidManifest.xml
  2. BIN
      nativeplugins/Fvv-AutoStart/android/autoStart-release.aar
  3. 20 0
      nativeplugins/Fvv-AutoStart/package.json
  4. BIN
      nativeplugins/device_plugin/android/device_plugin-release.aar
  5. 0 39
      nativeplugins/device_plugin/package.json
  6. BIN
      nativeplugins/opencv_plugin/android/opencv_plugin-release.aar
  7. 0 19
      nativeplugins/opencv_plugin/package.json
  8. 2 1
      package.json
  9. 8 0
      src/App.vue
  10. 0 175
      src/components/helang-compress/helang-compress.vue
  11. 0 123
      src/components/mpvue-echarts/src/echarts.vue
  12. 0 73
      src/components/mpvue-echarts/src/wx-canvas.js
  13. 0 149
      src/components/oa-movable/index.vue
  14. 0 115
      src/components/oa-timeLine-item/index.vue
  15. 0 62
      src/components/oa-timeLine/index.vue
  16. 0 90
      src/components/oa-touch/index.vue
  17. 0 119
      src/components/oa-transForm/index.vue
  18. 0 70
      src/components/oa-ttsAudio/index.vue
  19. 0 91
      src/components/oa-ttsAudio/ttsAudio.js
  20. 0 83
      src/components/searchSelect/searchSelect.vue
  21. 0 236
      src/components/yealuo-select/yealuo-select.vue
  22. 0 115
      src/components/zzlb-mutiselect/zzlb-mutiselect.vue
  23. 0 12
      src/main.js
  24. 24 0
      src/pages.json
  25. 20 23
      src/pages/door/index.vue
  26. 118 0
      src/pages/door/setting/index.scss
  27. 24 72
      src/pages/door/setting/index.vue
  28. 7 28
      src/pages/door/setting/other/index.vue
  29. 73 0
      src/pages/door/setting/public/index.vue
  30. 1 23
      src/pages/door/setting/serve/index.vue
  31. 29 88
      src/pages/door/setting/system/index.vue
  32. 92 0
      src/pages/door/setting/system/senior.vue
  33. 33 204
      src/pages/face/index.vue
  34. 0 97
      src/plugins/constData.plugins.js
  35. 58 0
      src/plugins/device/ph.plugins.js
  36. 108 0
      src/plugins/device/sys.plugins.js
  37. 41 0
      src/plugins/device/yx.plugins.js
  38. 16 0
      src/plugins/index.js
  39. 9 10
      src/plugins/keyListen.plugins.js
  40. 17 0
      src/plugins/setting.plugins.js
  41. 67 57
      src/plugins/time.plugins.js
  42. 10 1
      src/static/face/css/door_homeCardCenter.css
  43. 42 22
      src/static/face/door.html
  44. BIN
      src/static/face/img/face_bg.png
  45. 39 35
      src/static/face/meeting.html
  46. 14 6
      src/static/iconfont/iconfont.css
  47. BIN
      src/static/iconfont/iconfont.ttf
  48. BIN
      src/static/images/common/alarmMessage.png
  49. BIN
      src/static/images/common/alarmMessage1.png
  50. BIN
      src/static/images/common/appMessage.png
  51. BIN
      src/static/images/common/informMessage.png
  52. BIN
      src/static/images/common/inspectionMessage.png
  53. BIN
      src/static/images/common/meetingMessage.png
  54. BIN
      src/static/images/common/noticeMessage.png
  55. BIN
      src/static/images/common/reportMessage.png
  56. BIN
      src/static/images/common/ydkd.png
  57. BIN
      src/static/images/mine/arc.png
  58. BIN
      src/static/images/mine/arc1.png
  59. BIN
      src/static/images/mine/missing-face.png
  60. BIN
      src/static/images/mine/user-bg.png
  61. BIN
      src/static/images/mine/vip-card.png
  62. 9 58
      src/store/modules/common.js
  63. 70 24
      src/store/modules/control.js
  64. 8 6
      src/utils/request.js
  65. 2 2
      unpackage/config/setting.js

+ 0 - 18
AndroidManifest.xml

@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="no" ?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:compileSdkVersion="33" android:compileSdkVersionCodename="13" package="android.dcloud.uskyMobile" platformBuildVersionCode="33" platformBuildVersionName="13">
-	<application android:allowBackup="false" android:allowClearUserData="true" android:appComponentFactory="androidx.core.app.CoreComponentFactory" android:debuggable="false" android:extractNativeLibs="true" android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name" android:largeHeap="true" android:name="io.dcloud.application.DCloudApplication" android:supportsRtl="true" android:usesCleartextTraffic="true">
-        <activity android:configChanges="fontScale|keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize" android:exported="true" android:hardwareAccelerated="true" android:label="@string/app_name" android:name="io.dcloud.PandoraEntry" android:screenOrientation="user" android:theme="@style/DCloudTranslucentTheme" android:windowSoftInputMode="adjustResize">
-            <intent-filter>
-				<action android:name="android.intent.action.MAIN"/>
-				<category android:name="android.intent.category.LAUNCHER"/>
-				<category android:name="android.intent.category.HOME"/>
-				<category android:name="android.intent.category.DEFAULT"/>
-			</intent-filter>
-			<intent-filter>
-				<action android:name="android.intent.action.VIEW"/>
-				<category android:name="android.intent.category.DEFAULT"/>
-				<category android:name="android.intent.category.BROWSABLE"/>
-			</intent-filter>
-		</activity>	
-    </application>
-</manifest>

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


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

@@ -0,0 +1,20 @@
+{
+    "name": "Fvv-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"
+        }
+    }
+}

BIN
nativeplugins/device_plugin/android/device_plugin-release.aar


+ 0 - 39
nativeplugins/device_plugin/package.json

@@ -1,39 +0,0 @@
-{
-    "name": "device_plugin",
-    "id": "device_plugin",
-    "version": "1.0.0",
-    "description": "集成插件",
-    "_dp_type": "nativeplugin",
-    "_dp_nativeplugin": {
-        "android": {
-            "plugins": [
-                {
-                    "type": "module",
-                    "name": "yxDevice",
-                    "class": "com.example.yxDevice.test"
-                },
-                {
-                    "type": "module",
-                    "name": "my",
-                    "class": "com.example.my.MyUniModule"
-                },
-                {
-                    "type": "module",
-                    "name": "temp",
-                    "class": "com.example.temp.test"
-                },
-                {
-                    "type": "module",
-                    "name": "opencv",
-                    "class": "com.example.opencv.test"
-                },
-                {
-                    "type": "module",
-                    "name": "serialPort",
-                    "class": "com.example.serialPort.UniSerialPort"
-                }
-            ],
-            "integrateType": "aar"
-        }
-    }
-}

BIN
nativeplugins/opencv_plugin/android/opencv_plugin-release.aar


+ 0 - 19
nativeplugins/opencv_plugin/package.json

@@ -1,19 +0,0 @@
-{
-    "name": "opencv_plugin",
-    "id": "opencv_plugin",
-    "version": "1.0.0",
-    "description": "opencv插件",
-    "_dp_type": "nativeplugin",
-    "_dp_nativeplugin": {
-        "android": {
-            "plugins": [
-                {
-                    "type": "module",
-                    "name": "opencv_plugin",
-                    "class": "org.opencv.face.FaceDetectionHelper"
-                }
-            ],
-            "integrateType": "aar"
-        }
-    }
-}

+ 2 - 1
package.json

@@ -54,6 +54,7 @@
     "@dcloudio/uni-mp-xhs": "3.0.0-alpha-4020320240703001",
     "@dcloudio/uni-quickapp-webview": "3.0.0-alpha-4020320240703001",
     "echarts": "^5.3.3",
+    "jquery": "^3.7.1",
     "jsencrypt": "^3.3.2",
     "pinia": "2.0.14",
     "pinia-plugin-persistedstate": "^3.1.0",
@@ -70,7 +71,7 @@
     "@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",
+    "@vitejs/plugin-vue": "^5.2.3",
     "@vue/runtime-core": "^3.4.21",
     "cross-env": "^7.0.3",
     "dayjs": "^1.11.7",

+ 8 - 0
src/App.vue

@@ -25,11 +25,19 @@ function stteingInit() {
   // 智能会议
   if (config.appInfo.appid === "__UNI__F3963F8") {
     plus.screen.lockOrientation("landscape-primary"); //设置屏幕方向(1.竖屏正方向:portrait-primary 2.竖屏反方向:portrait-secondary 3.横屏正方向:landscape-primary 4.横屏反方向:landscape-secondary 5.自然方向:default)
+    proxy.$keyListen.startListen({
+      needStopSystem: true,
+      packageName: "android.meeting.uskyMobile",
+    }); //开启物理按钮监听
   }
   // 智能门禁
   else if (config.appInfo.appid === "__UNI__8D6E9FD") {
     plus.screen.lockOrientation("portrait-primary"); //设置屏幕方向(1.竖屏正方向:portrait-primary 2.竖屏反方向:portrait-secondary 3.横屏正方向:landscape-primary 4.横屏反方向:landscape-secondary 5.自然方向:default)
     plus.navigator.hideSystemNavigation(); //隐藏安卓底部虚拟导航键
+    proxy.$keyListen.startListen({
+      needStopSystem: true,
+      packageName: "android.Door.uskyMobile",
+    }); //开启物理按钮监听
   }
 }
 

+ 0 - 175
src/components/helang-compress/helang-compress.vue

@@ -1,175 +0,0 @@
-<template>
-	<view class="compress">
-		<canvas :style="{ width: canvasSize.width,height: canvasSize.height}" canvas-id="myCanvas"></canvas>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				pic:'',
-				canvasSize: {
-					width: 0,
-					height: 0
-				}
-			}
-		},
-		methods: {
-			// 压缩
-			compress(params) {
-				return new Promise(async (resolve, reject) => {
-					// 等待图片信息
-					let info = await this.getImageInfo(params.src).then(info=>info).catch(err=>err);
-					
-					if(!info){
-						reject('获取图片信息异常');
-						return;
-					}
-					
-					// 设置最大 & 最小 尺寸
-					const maxSize = params.maxSize || 1080;
-					const minSize = params.minSize || 640;
-					
-					// 当前图片尺寸
-					let {width,height} = info;
-					
-					// 非 H5 平台进行最小尺寸校验
-					// #ifndef H5
-					if(width <= minSize && height <= minSize){
-						resolve(params.src);
-						return;
-					}
-					// #endif
-					
-					// 最大尺寸计算
-					if (width > maxSize || height > maxSize) {
-						if (width > height) {
-							height = Math.floor(height / (width / maxSize));
-							width = maxSize;
-						} else {
-							width = Math.floor(width / (height / maxSize));
-							height = maxSize;
-						}
-					}
-
-					// 设置画布尺寸
-					this.$set(this,"canvasSize",{
-						width: `${width}rpx`,
-						height: `${height}rpx`
-					});
-					
-					// Vue.nextTick 回调在 App 有异常,则使用 setTimeout 等待DOM更新
-					setTimeout(() => {
-						const ctx = uni.createCanvasContext('myCanvas', this);
-						ctx.clearRect(0,0,width, height)
-						ctx.drawImage(info.path, 0, 0, uni.upx2px(width), uni.upx2px(height));
-						ctx.draw(false, () => {
-							uni.canvasToTempFilePath({
-								x: 0,
-								y: 0,
-								width: uni.upx2px(width),
-								height: uni.upx2px(height),
-								destWidth: width,
-								destHeight: height,
-								canvasId: 'myCanvas',
-								fileType: params.fileType || 'png',
-								quality: params.quality || 0.9,
-								success: (res) => {
-									// 在H5平台下,tempFilePath 为 base64
-									resolve(res.tempFilePath);
-								},
-								fail:(err)=>{
-									reject(null);
-								}
-							},this);
-						});
-					}, 300);
-				});
-			},
-			// 获取图片信息
-			getImageInfo(src){
-				return new Promise((resolve, reject)=>{
-					uni.getImageInfo({
-						src,
-						success: (info)=> {
-							resolve(info);
-						},
-						fail: () => {
-							reject(null);
-						}
-					});
-				});
-			},
-			// 批量压缩
-			batchCompress(params){
-				// index:进度,done:成功,fail:失败
-				let [index,done,fail] = [0,0,0];
-				// 压缩完成的路径集合
-				let paths = [];
-				// 批量压缩方法
-				let batch = ()=>{
-					return new Promise((resolve, reject)=>{
-						// 开始
-						let start = async ()=>{
-							params.progress && params.progress({
-								done,
-								fail,
-								count:params.batchSrc.length
-							});
-							// 等待图片压缩方法返回
-							let path = await next();
-							if(path){
-								done++;
-								paths.push(path);
-							}else{
-								fail++;
-							}
-							
-							index++;
-							// 压缩完成
-							if(index >= params.batchSrc.length){
-								resolve(true);
-							}else{
-								start();
-							}
-						}
-						start();
-					});
-				}
-				// 依次调用压缩方法
-				let next = ()=>{
-					return this.compress({
-						src:params.batchSrc[index],
-						maxSize:params.maxSize,
-						fileType:params.fileType,
-						quality:params.quality,
-						minSize:params.minSize
-					})
-				}
-				
-				// 全部压缩完成后调用
-				return new Promise(async (resolve, reject)=>{
-					// 批量压缩方法回调
-					let res = await batch();
-					if(res){
-						resolve(paths);
-					}else{
-						reject(null);
-					}
-				});
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.compress{
-		position: fixed;
-		width: 12px;
-		height: 12px;
-		overflow: hidden;
-		top: -99999px;
-		left: 0;
-	}
-</style>

+ 0 - 123
src/components/mpvue-echarts/src/echarts.vue

@@ -1,123 +0,0 @@
-<template>
-	<canvas v-if="canvasId" class="ec-canvas" :id="canvasId" :canvasId="canvasId" @touchstart="touchStart" @touchmove="touchMove" @touchend="touchEnd" @error="error"></canvas>
-</template>
-
-<script>
-import WxCanvas from './wx-canvas';
-
-export default {
-	props: {
-		canvasId: {
-			type: String,
-			default: 'ec-canvas'
-		},
-		lazyLoad: {
-			type: Boolean,
-			default: false
-		},
-		disableTouch: {
-			type: Boolean,
-			default: false
-		},
-		throttleTouch: {
-			type: Boolean,
-			default: false
-		}
-	},
-	// #ifdef H5
-	mounted() {
-		if (!this.lazyLoad) this.init();
-	},
-	// #endif
-	// #ifndef H5
-	onReady() {
-		if (!this.lazyLoad) this.init();
-	},
-	// #endif
-	methods: {
-		setChart(chart){
-			this.chart = chart
-		},
-		init() {
-			const { canvasId } = this;
-			this.ctx = wx.createCanvasContext(canvasId, this);
-
-			this.canvas = new WxCanvas(this.ctx, canvasId);
-
-			const query = wx.createSelectorQuery().in(this);
-			query
-				.select(`#${canvasId}`)
-				.boundingClientRect(res => {
-					if (!res) {
-						setTimeout(() => this.init(), 50);
-						return;
-					}
-					this.$emit('onInit', {
-						width: res.width,
-						height: res.height
-					});
-				})
-				.exec();
-		},
-		canvasToTempFilePath(opt) {
-			const { canvasId } = this;
-			this.ctx.draw(true, () => {
-				wx.canvasToTempFilePath({
-					canvasId,
-					...opt
-				});
-			});
-		},
-		touchStart(e) {
-			const { disableTouch, chart } = this;
-			if (disableTouch || !chart || !e.mp.touches.length) return;
-			const touch = e.mp.touches[0];
-			chart._zr.handler.dispatch('mousedown', {
-				zrX: touch.x,
-				zrY: touch.y
-			});
-			chart._zr.handler.dispatch('mousemove', {
-				zrX: touch.x,
-				zrY: touch.y
-			});
-		},
-		touchMove(e) {
-			const { disableTouch, throttleTouch, chart, lastMoveTime } = this;
-			if (disableTouch || !chart || !e.mp.touches.length) return;
-
-			if (throttleTouch) {
-				const currMoveTime = Date.now();
-				if (currMoveTime - lastMoveTime < 240) return;
-				this.lastMoveTime = currMoveTime;
-			}
-
-			const touch = e.mp.touches[0];
-			chart._zr.handler.dispatch('mousemove', {
-				zrX: touch.x,
-				zrY: touch.y
-			});
-		},
-		touchEnd(e) {
-			const { disableTouch, chart } = this;
-			if (disableTouch || !chart) return;
-			const touch = e.mp.changedTouches ? e.mp.changedTouches[0] : {};
-			chart._zr.handler.dispatch('mouseup', {
-				zrX: touch.x,
-				zrY: touch.y
-			});
-			chart._zr.handler.dispatch('click', {
-				zrX: touch.x,
-				zrY: touch.y
-			});
-		}
-	}
-};
-</script>
-
-<style scoped>
-.ec-canvas {
-	width: 100%;
-	height: 100%;
-	flex: 1;
-}
-</style>

+ 0 - 73
src/components/mpvue-echarts/src/wx-canvas.js

@@ -1,73 +0,0 @@
-export default class WxCanvas {
-  constructor(ctx, canvasId) {
-    this.ctx = ctx;
-    this.canvasId = canvasId;
-    this.chart = null;
-
-    WxCanvas.initStyle(ctx);
-    this.initEvent();
-  }
-
-  getContext(contextType) {
-    return contextType === '2d' ? this.ctx : null;
-  }
-
-  setChart(chart) {
-    this.chart = chart;
-  }
-
-  attachEvent() {
-    // noop
-  }
-
-  detachEvent() {
-    // noop
-  }
-
-  static initStyle(ctx) {
-    const styles = ['fillStyle', 'strokeStyle', 'globalAlpha',
-      'textAlign', 'textBaseAlign', 'shadow', 'lineWidth',
-      'lineCap', 'lineJoin', 'lineDash', 'miterLimit', 'fontSize'];
-
-    styles.forEach((style) => {
-      Object.defineProperty(ctx, style, {
-        set: (value) => {
-          if ((style !== 'fillStyle' && style !== 'strokeStyle')
-            || (value !== 'none' && value !== null)
-          ) {
-            ctx[`set${style.charAt(0).toUpperCase()}${style.slice(1)}`](value);
-          }
-        },
-      });
-    });
-
-    ctx.createRadialGradient = () => ctx.createCircularGradient(arguments);
-  }
-
-  initEvent() {
-    this.event = {};
-    const eventNames = [{
-      wxName: 'touchStart',
-      ecName: 'mousedown',
-    }, {
-      wxName: 'touchMove',
-      ecName: 'mousemove',
-    }, {
-      wxName: 'touchEnd',
-      ecName: 'mouseup',
-    }, {
-      wxName: 'touchEnd',
-      ecName: 'click',
-    }];
-
-    eventNames.forEach((name) => {
-      this.event[name.wxName] = (e) => {
-        const touch = e.mp.touches[0];
-        this.chart._zr.handler.dispatch(name.ecName, {
-          zrX: name.wxName === 'tap' ? touch.clientX : touch.x,
-          zrY: name.wxName === 'tap' ? touch.clientY : touch.y,
-        });
-      };
-    });
-  }
-}

+ 0 - 149
src/components/oa-movable/index.vue

@@ -1,149 +0,0 @@
-<template>
-  <movable-area class="fixed-box">
-    <movable-view class="fixed-button" direction="all" :inertia="true" y="100px">
-      <view class="menuBox">
-        <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>
-      </view>
-    </movable-view>
-  </movable-area>
-</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({
-  //主题颜色
-  themesColor: {
-    type: String,
-    default: "#3f99ff",
-  },
-});
-
-const defaultArray = reactive({
-  off: true,
-  animation: null,
-  animationData: {},
-});
-
-const { themesColor } = toRefs(props);
-const { off, animation, animationData } = toRefs(defaultArray);
-
-// 悬浮按钮
-function declick() {
-  if (off.value) {
-    //使用动画
-    rotateAndScale();
-  } else {
-    norotateAndScale();
-  }
-  off.value = !off.value;
-}
-
-//定义动画内容
-function rotateAndScale() {
-  animation.value.rotate(0).translateY(-1).step();
-  //导出动画数据传递给data层
-  animationData.value = animation.value.export();
-}
-
-//当!off的时候动画回到原始位置
-function norotateAndScale() {
-  animation.value.rotate(0).translateY(150).step();
-  animationData.value = animation.value.export();
-}
-
-onLoad((option) => {
-  animation.value = uni.createAnimation();
-});
-
-onShow(() => {
-  var animation1 = uni.createAnimation({
-    duration: 500,
-    trmingFunction: "ease",
-  });
-  animation.value = animation1;
-});
-</script>
-
-<style lang="scss" scoped>
-.fixed-box {
-  pointer-events: none;
-  width: 100vw;
-  height: 100vh;
-  position: fixed;
-  left: 0;
-  bottom: 0;
-  z-index: 100000;
-}
-
-.fixed-button {
-  right: 0;
-  top: 60vh;
-  left: auto;
-  width: 50px;
-  height: 150px;
-  display: flex;
-  padding: 5px 5px;
-  justify-content: center;
-  align-items: center;
-  pointer-events: auto;
-}
-
-.menuBox {
-  width: 100%;
-  height: 100%;
-  position: relative;
-  z-index: 1;
-  overflow: hidden;
-  border-radius: 25px;
-}
-
-.mainMenu {
-  width: 50px;
-  height: 50px;
-  position: absolute;
-  right: 0;
-  bottom: 0;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  border-radius: 100%;
-}
-
-:deep(.iconfont) {
-  color: #fff;
-  font-size: 28px;
-}
-
-.posi {
-  width: 50px;
-  position: relative;
-  z-index: -1;
-  transform: rotate(0deg) translateY(150px);
-  background-color: #fff;
-  border-radius: 50rpx;
-  padding-bottom: 50px;
-
-  :deep(.iconfont) {
-    width: 50px;
-    height: 50px;
-    font-size: 18px;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    color: #333333 !important;
-  }
-}
-
-/* 适配iphonex 有底部横条的 */
-@supports (bottom: constant(safe-area-inset-bottom)) or (bottom: env(safe-area-inset-bottom)) {
-  .fixed-box {
-    bottom: constant(safe-area-inset-bottom);
-    bottom: env(safe-area-inset-bottom);
-  }
-}
-</style>

+ 0 - 115
src/components/oa-timeLine-item/index.vue

@@ -1,115 +0,0 @@
-<template>
-  <view class="oa-timeLine-item">
-    <view class="oa-timeLine-item-header">
-      <view class="oa-timeLine-item-header-icon">
-        <u-icon name="info-circle-fill" :color="iconColor" size="18"></u-icon>
-      </view>
-      <view class="oa-timeLine-item-header-cont">
-        <view class="title">
-          {{ titleValue }}
-        </view>
-        <!-- <view style="margin: auto"> </view> -->
-        <view class="time">
-          {{ timeValue }}
-        </view>
-      </view>
-    </view>
-
-    <view class="oa-timeLine-item-content">
-      <view class="oa-timeLine-item-content-icon">
-        <view class="icon"></view>
-      </view>
-      <view class="oa-timeLine-item-content-cont">
-        <slot class="content"></slot>
-      </view>
-    </view>
-  </view>
-</template>
-
-<script setup>
-import { toRefs } from "vue";
-
-const props = defineProps({
-  titleValue: {
-    type: String,
-    default: "",
-  },
-  timeValue: {
-    type: String,
-    default: "",
-  },
-  iconColor: {
-    type: String,
-    default: "#149eff",
-  },
-});
-
-const { titleValue, timeValue, iconColor } = toRefs(props);
-</script>
-
-<style lang="scss" scoped>
-.oa-timeLine-item {
-  .oa-timeLine-item-header {
-    display: flex;
-    height: 25px;
-    line-height: 25px;
-
-    .oa-timeLine-item-header-icon {
-      margin: auto 0;
-    }
-
-    .oa-timeLine-item-header-cont {
-      display: flex;
-      width: calc(100% - 18px - 15px);
-      margin-left: 15px;
-
-      .title {
-        font-size: 15px;
-        color: #000000;
-        overflow: hidden; //超出的文本隐藏
-        text-overflow: ellipsis; //溢出用省略号显示
-        white-space: nowrap; // 默认不换行;
-      }
-
-      .time {
-        font-size: 14px;
-        color: #b5b5b5;
-        margin-left: auto;
-      }
-    }
-  }
-
-  .oa-timeLine-item-content {
-    display: flex;
-
-    .oa-timeLine-item-content-icon {
-      width: 18px;
-      display: flex;
-
-      .icon {
-        width: 2px;
-        background-color: #e4e7ed;
-        margin: -5px auto;
-      }
-    }
-
-    .oa-timeLine-item-content-cont {
-      width: 100%;
-      margin: 15px 0px 15px 15px;
-      padding: 15px;
-      background-color: #fff;
-      border-radius: 10px;
-    }
-  }
-}
-
-// .oa-timeLine-item:last-child {
-//   .oa-timeLine-item-content {
-//     .oa-timeLine-item-content-icon {
-//       .icon {
-//         margin-bottom: 15px;
-//       }
-//     }
-//   }
-// }
-</style>

+ 0 - 62
src/components/oa-timeLine/index.vue

@@ -1,62 +0,0 @@
-<template>
-  <view class="oa-timeLine">
-    <view class="oa-timeLine-btn" :style="{ color: fontColor }">
-      <span @click="activitiesSortClick()">排序</span>
-    </view>
-    <slot></slot>
-  </view>
-</template>
-
-<script setup>
-import { ref, toRefs } from "vue";
-
-const emit = defineEmits(["activitiesSortChange"]);
-
-const props = defineProps({
-  sort: {
-    type: String,
-    default: "DESC",
-  },
-  fontColor: {
-    type: String,
-    default: "#149eff",
-  },
-});
-
-const { sort, fontColor } = toRefs(props);
-
-const _sort = ref(sort.value);
-
-function activitiesSortClick() {
-  if (_sort.value == "ASC") {
-    _sort.value = "DESC";
-  } else {
-    _sort.value = "ASC";
-  }
-
-  emit("activitiesSortChange", _sort.value);
-}
-</script>
-
-<style lang="scss" scoped>
-.oa-timeLine {
-  padding: 0px 15px;
-  padding-bottom: 15px;
-
-  .u-steps-item__wrapper {
-    background-color: #f1f1f1;
-  }
-
-  .oa-timeLine-btn {
-    margin: 0px -3.5px;
-    font-size: 13px;
-  }
-}
-
-.oa-timeLine-data {
-  padding: 0px 15px;
-  text-align: center;
-  color: #bdbdbd;
-  font-size: 14px;
-}
-</style>

+ 0 - 90
src/components/oa-touch/index.vue

@@ -1,90 +0,0 @@
-<template>
-  <view @touchstart="fingerstart" @touchend="fingerend">
-    <slot name="content"> </slot>
-  </view>
-</template>
-
-<script setup>
-import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
-import { ref, onMounted, inject, shallowRef, reactive, watchEffect, getCurrentInstance, toRefs } from "vue";
-
-const emit = defineEmits(["touchChange"]);
-const props = defineProps({});
-const {} = toRefs(props);
-
-const startData = ref({
-  clientX: "",
-  clientY: "",
-});
-const updDistance = ref(100);
-const lrDistance = ref(50);
-const topMed = ref("");
-const bottomMed = ref("");
-const leftMed = ref("");
-const rightMed = ref("");
-
-/**
- * @当按下去的时候
- */
-function fingerstart(e) {
-  // 记录 距离可视区域左上角 左边距 和 上边距
-  startData.value.clientX = e.changedTouches[0].clientX;
-  startData.value.clientY = e.changedTouches[0].clientY;
-}
-
-/**
- * @当抬起来的时候
- */
-function fingerend(e) {
-  // 当前位置 减去 按下位置 计算 距离
-  const subX = e.changedTouches[0].clientX - startData.value.clientX;
-  const subY = e.changedTouches[0].clientY - startData.value.clientY;
-  if (subY > updDistance.value || subY < -updDistance.value) {
-    if (subY > updDistance.value) {
-      bottomscroll(subY);
-    } else if (subY < -updDistance.value) {
-      topscroll(subY);
-    }
-  } else {
-    if (subX > lrDistance.value) {
-      rightscroll(subX);
-    } else if (subX < -lrDistance.value) {
-      leftscroll(subX);
-    } else {
-      console.log("无效操作");
-    }
-  }
-}
-/**
- * @上滑触发
- */
-function topscroll(dista) {
-  topMed.value ? (topMed.value = dista) : (topMed.value = null);
-  // console.log("触发了上滑方法!");
-  emit("change", "上滑");
-}
-/**
- * @下滑触发
- */
-function bottomscroll(dista) {
-  bottomMed.value ? (bottomMed.value = dista) : (bottomMed.value = null);
-  // console.log("触发了下滑方法!");
-  emit("change", "下滑");
-}
-/**
- * @右滑触发
- */
-function rightscroll(dista) {
-  rightMed.value ? (rightMed.value = dista) : (rightMed.value = null);
-  // console.log("触发了右滑方法!");
-  emit("change", "右滑");
-}
-/**
- * @左滑触发
- */
-function leftscroll(dista) {
-  leftMed.value ? (leftMed.value = dista) : (leftMed.value = null);
-  // console.log("触发了左滑方法!");
-  emit("change", "左滑");
-}
-</script>

+ 0 - 119
src/components/oa-transForm/index.vue

@@ -1,119 +0,0 @@
-<template>
-  <view
-    class="content-section"
-    :style="[
-      {
-        transform: coverTransform,
-        transition: coverTransition,
-      },
-    ]"
-    @touchstart="coverTouchstart"
-    @touchmove="coverTouchmove"
-    @touchend="coverTouchend"
-  >
-    <image class="mine-image" src="@/static/images/mine/arc.png"></image>
-    <slot name="content"></slot>
-  </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 state = reactive({
-  coverTransform: "translateY(0px)",
-  coverTransition: "0s",
-  moving: false,
-});
-
-const { coverTransform, coverTransition, moving } = toRefs(state);
-
-let startY = 0,
-  moveY = 0,
-  pageAtTop = true;
-
-/**
- * @触摸开始
- */
-function coverTouchstart(e) {
-  if (pageAtTop === false) {
-    return;
-  }
-  coverTransition.value = "transform .1s linear";
-  startY = e.touches[0].clientY;
-}
-
-/**
- * @触摸移动
- */
-function coverTouchmove(e) {
-  moveY = e.touches[0].clientY;
-  let moveDistance = moveY - startY;
-  if (moveDistance < 0) {
-    moving.value = false;
-    return;
-  }
-  moving.value = true;
-  if (moveDistance >= 80 && moveDistance < 100) {
-    moveDistance = 80;
-  }
-  if (moveDistance > 0 && moveDistance <= 80) {
-    coverTransform.value = `translateY(${moveDistance}px)`;
-  }
-}
-
-/**
- * @触摸结束
- */
-function coverTouchend() {
-  if (moving.value === false) {
-    return;
-  }
-  moving.value = false;
-  coverTransition.value = "transform 0.3s cubic-bezier(.21,1.93,.53,.64)";
-  coverTransform.value = "translateY(0px)";
-}
-
-onLoad((option) => {});
-</script>
-<style lang="scss" scoped>
-.content-section {
-  position: relative;
-  margin-top: -85px;
-  padding-bottom: 50.67px;
-  background-color: #f5f6f7;
-
-  .mine-image {
-    position: absolute;
-    left: 0;
-    top: -16px;
-    width: 100%;
-    height: 18px;
-  }
-
-  .mine-actions {
-    margin: 0.625rem 0.625rem;
-    padding: 20px 0px;
-    border-radius: 8px;
-    background-color: white;
-
-    .action-item {
-      .icon {
-        font-size: 28px;
-      }
-
-      .text {
-        display: block;
-        font-size: 13px;
-        margin: 8px 0px;
-      }
-    }
-  }
-}
-</style>

+ 0 - 70
src/components/oa-ttsAudio/index.vue

@@ -1,70 +0,0 @@
-<template></template>
-<script setup>
-import { onReady, onLoad, onUnload, onShow, onNavigationBarButtonTap, onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
-import { defineComponent, getCurrentInstance, inject, nextTick, onMounted, watchEffect, ref } from "vue";
-
-const emit = defineEmits(["onEnded", "onError"]);
-const props = defineProps({
-  //播放原地址
-  audioUrl: {
-    type: String,
-    defualt: "",
-  },
-  //是否开启
-  audioBool: {
-    type: Boolean,
-    defualt: "",
-  },
-});
-
-const isPlay = ref(false);
-const innerAudio = ref(null);
-
-function handleTTS() {
-  if (!audioBool) {
-    return;
-  }
-
-  if (innerAudio.value) {
-    try {
-      innerAudio.value.pause();
-      innerAudio.value.destroy();
-      innerAudio.value = null;
-    } catch (e) {
-      //TODO handle the exception
-    }
-  }
-
-  innerAudio.value = uni.createInnerAudioContext();
-  innerAudio.value.autoplay = true;
-  innerAudio.value.volume = 1;
-  innerAudio.value.src = props.audioUrl;
-  innerAudio.value.onPlay(() => {
-    console.log("开始播放");
-  });
-  innerAudio.value.onEnded((res) => {
-    console.log("音频播放结束");
-    isPlay.value = false;
-  });
-  innerAudio.value.onError((res) => {
-    console.log("音频播放出错" + res);
-    console.log(res.errCode);
-  });
-
-  innerAudio.value.play();
-}
-
-watchEffect(() => {
-  if (props.audioUrl) {
-    handleTTS();
-  }
-});
-
-onUnload(() => {
-  if (innerAudio.value) {
-    innerAudio.value.stop();
-    innerAudio.value.destroy();
-  }
-});
-</script>
-<style lang="scss" scoped></style>

+ 0 - 91
src/components/oa-ttsAudio/ttsAudio.js

@@ -1,91 +0,0 @@
-// 这个东西我都没执行yarn add crypto竟然能用,可能另一个项目安装了全局共享了,如报错找不到,执行一下yarn add crypto
-import crypto from 'crypto'
-
-export class AccessToken {
-    static encodeText(text) {
-        let encodedText = encodeURIComponent(text);
-        return encodedText.replace('+', '%20').replace('*', '%2A').replace('~', '%7E');
-    }
-
-    static encodeDict(dict) {
-        let keys = Object.keys(dict).sort();
-        return keys.map(key => `${this.encodeText(key)}=${this.encodeText(dict[key])}`).join('&');
-    }
-
-    static async createToken(accessKeyId, accessKeySecret) {
-        const parameters = {
-            AccessKeyId: accessKeyId,
-            Action: 'CreateToken',
-            Format: 'JSON',
-            RegionId: 'cn-shanghai',
-            SignatureMethod: 'HMAC-SHA1',
-            SignatureNonce: uuidv4(),
-            SignatureVersion: '1.0',
-            Timestamp: new Date().toISOString(),
-            Version: '2019-02-28'
-        };
-
-        const queryString = this.encodeDict(parameters);
-        console.log('Normalized request string:', queryString);
-
-        const stringToSign = `GET&${this.encodeText('/')}&${this.encodeText(queryString)}`;
-        console.log('String to sign:', stringToSign);
-
-        const hmac = crypto.createHmac('sha1', `${accessKeySecret}&`);
-        hmac.update(stringToSign);
-        const signature = hmac.digest('base64');
-        console.log('Signature:', signature);
-
-        const encodedSignature = this.encodeText(signature);
-        console.log('URL-encoded signature:', encodedSignature);
-
-        const fullUrl = `https://nls-meta.cn-shanghai.aliyuncs.com/?Signature=${encodedSignature}&${queryString}`;
-        console.log('URL:', fullUrl);
-
-        let resData =  await new Promise((resolve, reject) => {
-            uni.request({
-                url: fullUrl,
-                method: 'GET',
-                success: res => {
-                    const data = res.data
-                    resolve({
-                        token: data.Token.Id,
-                        expireTime: data.Token.ExpireTime
-                    })
-                },
-                fail: error => {
-                    console.log(error)
-                    reject(error)
-                }
-            })
-        })
-         console.log('res',resData)
-         if(resData){
-            return resData
-         }
-        // Using fetch for HTTP request
-        // const response = await fetch(fullUrl);
-        // if (response.ok) {
-        //     const jsonResponse = await response.json();
-        //     if (jsonResponse.Token) {
-        //         return {
-        //             token: jsonResponse.Token.Id,
-        //             expireTime: jsonResponse.Token.ExpireTime
-        //         };
-        //     }
-        // }
-        // console.error(await response.text());
-        return {
-            token: null,
-            expireTime: null
-        };
-    }
-}
-
-// Sample UUIDv4 function, or you could use a library like `uuid`
-function uuidv4() {
-    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
-        var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
-        return v.toString(16);
-    });
-}

+ 0 - 83
src/components/searchSelect/searchSelect.vue

@@ -1,83 +0,0 @@
-<template>
-  <view>
-    <view class="searchSelect shadow" v-if="flag">
-      <view class="cu-bar search bg-white">
-        <view class="search-form round" style="margin-top: 0">
-          <uni-easyinput type="text" v-model="searchInput" placeholder="" prefixIcon="search" @focus="InputFocus" @blur="InputBlur" @input="handleInput()" style="border: none" />
-          <text class="cuIcon-search"></text>
-        </view>
-      </view>
-      <view class="select-items">
-        <view class="select-item" v-for="(item, index) in searchList" @click="clickSelectItem(item, index)" :key="index">{{ item }}</view>
-      </view>
-    </view>
-  </view>
-</template>
-
-<script>
-export default {
-  name: "searchSelect",
-  props: {
-    flag: {
-      type: Boolean,
-      default: false,
-    },
-    searchList: {
-      type: Array,
-      // default: []
-    },
-    searchList2: {
-      type: Array,
-      // default: []
-    },
-  },
-  data() {
-    return {
-      searchInput: "",
-      // flag: false,
-      // searchList: [],
-      // searchList2: [],
-    };
-  },
-  onload() {
-    this.getSearchList();
-  },
-  methods: {
-    //请求
-    async getSearchList(ming = {}) {
-      const res = await this.$myRequest({
-        url: "Index/getSiteDropDownBox",
-        data: ming,
-      });
-      res.data.data.forEach((item) => {
-        this.searchList.push(item.siteName);
-        this.searchList2.push(item.siteName);
-      });
-    },
-    // 下拉选择
-    clickSelectItem(item, index) {
-      this.getSearchList({
-        siteName: item,
-      });
-      this.flag = false;
-    },
-    handleInput() {
-      var newlist = this.searchList2.filter((item) => item.indexOf(this.searchInput) > -1);
-      this.searchList = newlist;
-    },
-
-    InputFocus(e) {
-      this.InputBottom = e.detail.height;
-    },
-    InputBlur(e) {
-      this.InputBottom = 0;
-    },
-
-    changeTab(Inv) {
-      that.navIdx = Inv;
-    },
-  },
-};
-</script>
-
-<style></style>

+ 0 - 236
src/components/yealuo-select/yealuo-select.vue

@@ -1,236 +0,0 @@
-<template>
-	<view class="yealuo-select" >
-		<view class="yealuo-background" @tap="isShow=false" v-show="isShow"></view>
-		<view class="yealuo-con" :style="inputStyle" @tap='isShow=isShow?false:nowData.length'>
-			<slot name='left'></slot>
-			<uni-easyinput type="text" v-model="theValue" :placeholder="placeholder" prefixIcon="search" @input="theInput"  @focus="theFocus" @blur="theBlur" :disabled="theDisabled"/>
-			<slot name='right' v-if="selectIco">
-				<svg class="icon" v-if="!isShow" style="width: 1.5em; height: 1.5em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="530"><path d="M512 714.666667c-8.533333 0-17.066667-2.133333-23.466667-8.533334l-341.333333-341.333333c-12.8-12.8-12.8-32 0-44.8 12.8-12.8 32-12.8 44.8 0l320 317.866667 317.866667-320c12.8-12.8 32-12.8 44.8 0 12.8 12.8 12.8 32 0 44.8L533.333333 704c-4.266667 8.533333-12.8 10.666667-21.333333 10.666667z" p-id="531"></path></svg>
-				<svg class="icon" v-else style="width: 1.5em; height: 1.5em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1927"><path d="M904.533333 674.133333l-362.666666-362.666666c-17.066667-17.066667-42.666667-17.066667-59.733334 0l-362.666666 362.666666c-17.066667 17.066667-17.066667 42.666667 0 59.733334 17.066667 17.066667 42.666667 17.066667 59.733333 0L512 401.066667l332.8 332.8c8.533333 8.533333 19.2 12.8 29.866667 12.8s21.333333-4.266667 29.866666-12.8c17.066667-17.066667 17.066667-42.666667 0-59.733334z" p-id="1928"></path></svg>
-			</slot>
-		</view>
-		<view class="yealuo-select" v-show="show" :style="selectStyle">
-			<view class="data">
-				<radio-group v-if="checkType=='radio'"  @change="selectCheckbox">
-				<view class="select-item" :class="'item-'+overflow" v-for="(item, index) in nowData" :key="index" >
-					<label class="item-text" :class="{active: theValue==item.value}">
-					<radio name="name1" checked v-if="theValue==item.value" :value="item.value+'|'+item.id"></radio>
-					<radio name="name1" v-else :value="item.value+'|'+item.id"></radio>
-					{{item.value}}
-					</label>
-				</view>
-				</radio-group>
-				<checkbox-group v-else-if="checkType=='checkbox'" @change="selectCheckbox">
-				<view class="select-item" :class="'item-'+overflow" v-for="(item, index) in nowData" :key="index" >
-					<label class="item-text" :class="{active: theValue.indexOf(item.value)!=-1 }">
-					<checkbox name="name1" checked v-if="theValue.indexOf(item.value)!=-1 " :value="item.value+'|'+item.id"></checkbox>
-					<checkbox name="name1" v-else :value="item.value+'|'+item.id"></checkbox>
-					{{item.value}}
-					</label>
-				</view>
-				</checkbox-group>
-				<radio-group v-else  @change="selectCheckbox">
-				<view class="select-item" :class="'item-'+overflow" v-for="(item, index) in nowData" :key="index" >
-					<label class="item-text" :class="{active: theValue==item.value}">
-					<radio name="name1" style="display: none;" checked v-if="theValue==item.value" :value="item.value+'|'+item.id"></radio>
-					<radio name="name1" style="display: none;" v-else :value="item.value+'|'+item.id"></radio>
-					{{item.value}}
-					</label>
-				</view>
-				</radio-group>
-			</view>
-			<view class="item-close" @tap="isShow=false">收起</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	/**
-	 * v1.0.3
-	 * 最后修改: 2021.02.02
-	 * 创建: 2020.9.30
-	 * Author:yealuo.com
-	 * contact:470797533@qq.com
-	 */
-	let fontUnit = 'upx'
-	// #ifdef MP-WEIXIN
-	fontUnit = 'rpx'
-	// #endif
-	export default {
-		name: 'yealuoInputs',
-		props: {
-			placeholder: {
-				type: String,
-				default: ''
-			},
-			value: {
-				type: String,
-				default: ''
-			},
-			checkType: {
-				type: String,
-				default: ''
-			},
-			itemKey: {
-				type: String,
-				default: ''
-			},
-			width: {
-				type: String,
-				default: '600'
-			},
-			disabled: {
-				type: Boolean,
-				default: false
-			},
-			inputStyle: {
-				type: String,
-				default: ''
-			},
-			selectStyle: {
-				type: String,
-				default: ''
-			},
-			overflow: {
-				type: String,
-				default: 'auto'
-			},
-			tags: {
-				type: String,
-				default: ''
-			},
-			
-			binData:{
-				type:Array,
-				default: ''
-			},
-			selectIco:{
-				type: Boolean,
-				default: false
-			}
-		},
-		data() {
-			return {
-				odData:this.binData,
-				nowData:this.binData,
-				isShow: false,
-				theValue: this.value,
-				theDisabled: this.disabled
-			}
-		},
-		watch: {
-			value(val){
-				this.theValue = val;
-			},
-			//监听数据变化
-			nowData:{
-				handler:function(){
-				 this.nowData=this.binData;
-				},
-				deep:true
-			}
-			
-		},
-		computed: {
-			show(){
-				return this.isShow && this.nowData.length
-			}
-			
-		},
-		methods: {
-			//获取焦点
-			theFocus(e){
-				this.nowData=this.odData;
-			},
-			//失去焦点
-			theBlur(e){
-				this.$emit('blur',e)
-			},
-			//获取输入值
-			theInput(e) {
-				var val=e.detail.value;
-				let data = [];
-				var odData=this.odData;
-				for(var i=0;i<odData.length;i++){
-					var isHas=false;
-					if(odData[i].value.indexOf(val)!=-1){
-						data.push(odData[i])
-						if(odData[i].value==val){
-							isHas=true;
-							var arr=[];
-							arr.push(odData[i].value+"|"+odData[i].id)
-						  this.$emit('getBackVal',arr);
-						}
-					}
-					if(!isHas){
-						var arr=[];
-						arr.push(val)
-						 this.$emit('getBackVal',arr);
-					}
-				}
-				this.nowData=data;
-			},
-			//下拉选中
-			selectCheckbox(e){
-				var val=e.target.value;
-				var str=val;
-				if(typeof(str)!="string"){
-					str="";
-					for(var i=0;i<val.length;i++){
-						var vt=val[i].split("|");
-						str+=i>0?","+vt[0]:vt[0];
-					}
-				}
-				else{
-					this.isShow = false;
-					str=str.split("|")[0];
-				}
-				this.$emit('getBackVal',val+"|"+this.tags)
-				this.theValue = str;
-			}
-		},
-	}
-</script>
-
-<style lang="scss" scoped>
-.yealuo-select{
-	max-width: 100%;
-	position: relative;
-	.yealuo-background{position: fixed;top:0;left:0;width: 750upx;height: 100%;}
-	.yealuo-con{display: flex;align-items: center;justify-content: center;
-		input{flex: 1;margin: 0 6upx;}
-	}
-	
-	.yealuo-select {
-		border: 1px solid #f3f3f4;
-		position: absolute;
-		z-index: 999;
-		background: #fff;
-		width: 100%;
-		.data{
-			max-height: 600upx;
-			padding: 10upx;
-			overflow: auto;
-			.select-item {width: 100%;color:#666;
-				.item-text{ width:100%; display:block;}
-				.active{font-weight: bold;}
-			}
-			.item-auto{overflow: auto;
-				.item-text{width: max-content;}
-			}
-			.item-hide .item-text{
-				overflow: hidden;
-				text-overflow:ellipsis;
-				white-space: nowrap;
-			}
-		}
-		.item-close {
-			padding: 20upx;
-			text-align: center;
-			font-size: 32upx;
-			border-top: 1px solid #f3f3f4;
-			color:#8F8F94;
-		}
-	}
-}
-</style>

+ 0 - 115
src/components/zzlb-mutiselect/zzlb-mutiselect.vue

@@ -1,115 +0,0 @@
-<template>
-  <view class="" style="width: 100%">
-    <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="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;" />
-        <text
-          v-if="query"
-          class="cuIcon-close"
-          @click="
-            query = '';
-            onquery();
-          "
-        ></text>
-        <text v-if="visible" class="cu-btn sm" @click="onqueren">确认</text>
-      </view>
-    </view>
-    <view v-if="visible" class="fixed bg-white">
-      <!-- <view class="flex justify-between ">
-        <button class="cu-btn " @click="visible = 0">取消</button>
-        <button class="cu-btn " @click="onqueren">确认</button>
-      </view> -->
-      <picker-view class="picker-view" @change="(e) => (pvvalue = mlist[e.detail.value[0]])" indicator-style1="height:40px" :style1="{ height: (mlist.length > 6 ? 6 : mlist.length / 2) * 34 + 'px' }">
-        <picker-view-column>
-          <view class="item" v-for="(item, index) in mlist" :key="index">
-            <slot name="option" v-bind:item="item">{{ item }}</slot>
-          </view>
-        </picker-view-column>
-      </picker-view>
-    </view>
-  </view>
-</template>
-<script>
-export default {
-  props: {
-    url: { type: String, default: "" },
-    list: {
-      type: Array,
-      default: function () {
-        return [];
-      },
-    },
-    value: {
-      type: Array,
-      default: function () {
-        return [];
-      },
-    },
-  },
-  data() {
-    return {
-      visible: 0,
-      items: [],
-      query: "",
-      mlist: [],
-      pvvalue: [],
-    };
-  },
-  computed: {},
-  watch: {
-    value() {
-      this.items = this.value || [];
-    },
-  },
-  methods: {
-    onquery() {
-      console.log(this.query);
-      this.visible = 1;
-      this.pvvalue = this.mlist[0];
-
-      if (this.list && this.list.length > 0) {
-        const l = this.list.filter((f) => f.indexOf(this.query) > -1);
-        if (l.indexOf(this.pvvalue) === -1) {
-          this.pvvalue = l[0];
-        }
-        this.mlist = l;
-        return;
-      }
-      this.$http.get(this.url, { params: { title: this.query } }).then((r) => {
-        r.data.list;
-        this.mlist = r.data.list;
-        this.pvvalue = this.mlist[0];
-      });
-    },
-    onremove(index) {
-      this.items.splice(index, 1);
-      this.$emit("input", this.items);
-    },
-    onshuru() {
-      this.visible = 1;
-    },
-    onqueren() {
-      this.visible = 0;
-      if (this.pvvalue) this.items.push(this.pvvalue);
-      this.$emit("input", this.items);
-    },
-  },
-};
-</script>
-<style>
-.picker-view {
-  width: 100%;
-  height: 100px;
-  /* margin-top: 20rpx; */
-}
-.item {
-  /* height: 50px; */
-  align-items: center;
-  justify-content: center;
-  text-align: center;
-}
-</style>

+ 0 - 12
src/main.js

@@ -11,21 +11,14 @@ import JsonExcel from "vue-json-excel";
 import uviewPlus from "@/uni_modules/uview-plus";
 import oaCalendar from "@/components/oa-calendar/uni-calendar";
 import oaTabbar from "@/components/oa-tabbar/index";
-import oaTimeLine from "@/components/oa-timeLine/index"
-import oaTimeLineItem from "@/components/oa-timeLine-item/index"
 import oaUpload from "@/components/oa-upload/index"
 import oaScroll from "@/components/oa-scroll/index"
-import oaTouch from "@/components/oa-touch/index"
 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"
 import oaSteps from "@/components/oa-steps/index"
 
-
 // import hideHead from "./utils/hideHead.js";
-
 export function createApp() {
   const app = createSSRApp(App);
   // app.mixin(hideHead);// 隐藏头部双重标题
@@ -34,15 +27,10 @@ export function createApp() {
   //挂载全局组件
   app.component('oa-calendar', oaCalendar)
   app.component('oa-tabbar', oaTabbar)
-  app.component('oa-timeLine', oaTimeLine)
-  app.component('oa-timeLine-item', oaTimeLineItem)
   app.component('oa-upload', oaUpload)
   app.component('oa-scroll', oaScroll)
-  app.component('oa-touch', oaTouch)
   app.component('oa-dropdown', oaDropdown)
   app.component('oa-upgrade', oaUpgrade)
-  app.component('oa-transForm', oaTransForm)
-  app.component('oa-ttsAudio', oaTtsAudio)
   app.component('oa-weather', oaWeather)
   app.component('oa-steps', oaSteps)
 

+ 24 - 0
src/pages.json

@@ -36,6 +36,18 @@
                 }
             }
         },
+        {
+            "path": "pages/door/setting/public/index",
+            "style": {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false,
+                "navigationStyle": "custom",
+                "app-plus": {
+                    "bounce": "none",
+                    "titleNView": false
+                }
+            }
+        },
         {
             "path": "pages/door/setting/serve/index",
             "style": {
@@ -60,6 +72,18 @@
                 }
             }
         },
+        {
+            "path": "pages/door/setting/system/senior",
+            "style": {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false,
+                "navigationStyle": "custom",
+                "app-plus": {
+                    "bounce": "none",
+                    "titleNView": false
+                }
+            }
+        },
         {
             "path": "pages/face/index",
             "style": {

+ 20 - 23
src/pages/door/index.vue

@@ -42,35 +42,30 @@ const { version, webviewStyles } = toRefs(state);
 
 // 初始化
 function init() {
-  controlStore.initCamera();
-  // controlStore.initNfc();
-  controlStore.initData();
-  controlStore.initHandle();
-
-  if (!controlStore.inter.doorDom) {
-    controlStore.getDoorList("updateData");
-    controlStore.inter.doorDom = setInterval(() => {
-      controlStore.getDoorList("updateData");
-    }, 1000 * 3);
-  }
-}
-
-function close(event) {
-  controlStore.popup.show = event;
+  setTimeout(() => {
+    controlStore.initCamera(); //初始化摄像头
+    // controlStore.initNfc();//初始化NFC
+    controlStore.initData(); //初始化数据
+    controlStore.openInterval("door"); //开启门禁数据定时任务
+  }, 500);
 }
 
+// 密码开门组件确认事件
 function change(event) {
-  if (event == "628628") {
+  if (event == controlStore.form.door.password) {
     controlStore.popup.show = false;
-    controlStore.analysisData({
-      funcName: "点击开门",
-    });
+    controlStore.analysisData({ funcName: "点击开门" });
   } else {
     controlStore.popup.show = false;
     proxy.$modal.msg("密码错误");
   }
 }
 
+// 密码开门组件关闭事件
+function close(event) {
+  controlStore.popup.show = event;
+}
+
 /**
  * @接收子页面传过来的值
  */
@@ -86,13 +81,15 @@ window.onmessage = function (event) {
 onLoad((options) => {});
 
 onShow(() => {
-  setTimeout(() => {
-    init();
-  }, 500);
+  init();
+});
+
+onHide(() => {
+  controlStore.clearInterval("door"); //关闭门禁数据定时任务
 });
 
 onUnload(() => {
-  clearInterval(controlStore.inter.doorDom); //销毁之前定时器
+  controlStore.clearInterval("door"); //关闭门禁数据定时任务
 });
 </script>
 <style>

+ 118 - 0
src/pages/door/setting/index.scss

@@ -0,0 +1,118 @@
+.doorSetting-container,
+.doorSettingOther-container,
+.doorSettingServe-container,
+.doorSettingSystem-container,
+.doorSettingPublic-container {
+    // background: url(@/static/face/img/face_bg.png) no-repeat;
+    // background-size: 100% 100%;
+    background-color: #303133;
+    color: #ffffff;
+    padding: 16px;
+
+    .iconfont,
+    .oaIcon-left {
+        display: block;
+        margin-bottom: 30px;
+    }
+
+    .Grid {
+        display: flex;
+        justify-content: left;
+        /* 左对齐 */
+        flex-wrap: wrap;
+        /* 换行 */
+
+        &-item {
+            flex: 0 0 25%;
+            margin-bottom: 20px;
+
+            &-image {
+                display: block;
+                width: 40px;
+                height: 40px;
+                margin: auto;
+            }
+
+            &-lable {
+                text-align: center;
+                margin: auto;
+                margin-top: 16px;
+            }
+        }
+    }
+
+    :deep() {
+
+        .u-cell__value,
+        .u-cell__title-text {
+            color: white;
+        }
+
+        .u-cell__body {
+            padding: 10px 10px !important;
+            // background-color: #ffffff !important;
+
+            >.iconfont,
+            .u-iconfont {
+                margin: auto 0px;
+                color: white !important;
+                font-size: 16px !important;
+            }
+        }
+    }
+}
+
+@media (min-width: 500px) {
+
+    .doorSetting-container,
+    .doorSettingOther-container,
+    .doorSettingServe-container,
+    .doorSettingSystem-container,
+    .doorSettingPublic-container {
+        font-size: 0.6rem !important;
+        padding: 1rem !important;
+
+        .oaIcon-exit,
+        .oaIcon-left {
+            font-size: 1.5rem !important;
+            margin-bottom: 1.5rem !important;
+        }
+
+        .Grid {
+            &-item {
+                margin-bottom: 1.5rem !important;
+
+                &-image {
+                    width: 2.5rem;
+                    height: 2.5rem;
+                }
+
+                &-lable {
+                    margin-top: 0.5rem !important;
+                }
+            }
+        }
+
+        :deep() {
+            .u-cell {
+                .u-cell__title-text {
+                    font-size: 0.8rem !important;
+                }
+
+                .u-cell__value {
+                    font-size: 0.6rem !important;
+                }
+
+                .u-cell__body {
+                    padding: 0.8rem 10px !important;
+
+                    .iconfont,
+                    .u-iconfont {
+                        font-size: 0.8rem !important;
+                    }
+                }
+            }
+
+        }
+    }
+}

+ 24 - 72
src/pages/door/setting/index.vue

@@ -29,9 +29,16 @@
         </view>
         <view class="Grid-item" @click="handle('sysetm')">
           <image class="Grid-item-image" src="@/static/face/img/sysetmSetting.png"></image>
-          <view class="Grid-item-lable">系统配置</view>
+          <view class="Grid-item-lable">更多配置</view>
+        </view>
+        <view class="Grid-item" @click="handle('public')">
+          <image class="Grid-item-image" src="@/static/face/img/sysetmSetting.png"></image>
+          <view class="Grid-item-lable">公共设置</view>
+        </view>
+        <view class="Grid-item" @click="startActivity()">
+          <image class="Grid-item-image" src="@/static/face/img/sysetmSetting.png"></image>
+          <view class="Grid-item-lable">测试</view>
         </view>
-        <view class="Grid-item"></view>
       </view>
     </template>
   </oa-scroll>
@@ -42,13 +49,13 @@ import config from "@/config";
 import { onLoad, onShow, onReady, onHide, onLaunch, onUnload, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
 import { ref, reactive, computed, getCurrentInstance, toRefs, inject, nextTick, watch } from "vue";
 /*----------------------------------接口引入-----------------------------------*/
-import { doorApi } from "@/api/business/door.js";
 /*----------------------------------组件引入-----------------------------------*/
 /*----------------------------------store引入-----------------------------------*/
-import { controlStores } from "@/store/modules/index";
+import { controlStores, commonStores } from "@/store/modules/index";
 /*----------------------------------公共方法引入-----------------------------------*/
 const { proxy } = getCurrentInstance();
 const controlStore = controlStores();
+const commonStore = commonStores();
 /*----------------------------------公共变量-----------------------------------*/
 const state = reactive({});
 const {} = toRefs(state);
@@ -62,13 +69,24 @@ function handle(type) {
       return;
     }
     proxy.$tab.navigateTo("/pages/door/setting/other/index");
+  } else if (type == "public") {
+    proxy.$tab.navigateTo("/pages/door/setting/public/index");
   } else if (type == "sysetm") {
     proxy.$tab.navigateTo("/pages/door/setting/system/index");
   }
 }
 
 function handleExit() {
-  proxy.$tab.redirectTo("/pages/door/index");
+  proxy.$tab.navigateBack(1);
+}
+
+function startActivity() {
+  proxy.$sys.getEthernetIpAddress();
+
+  //#ifdef APP-PLUS
+  const phPlugin = uni.requireNativePlugin("phPlugin");
+  phPlugin.startActivity();
+  //#endif
 }
 
 onLoad((options) => {
@@ -76,71 +94,5 @@ onLoad((options) => {
 });
 </script>
 <style lang="scss">
-.doorSetting-container {
-  background: url(@/static/face/img/face_bg.png) no-repeat;
-  background-size: 100% 100%;
-  color: #ffffff;
-  padding: 16px;
-
-  .iconfont {
-    display: block;
-    margin-bottom: 16px;
-  }
-
-  .Grid {
-    display: flex;
-    justify-content: center; /* 左对齐 */
-    flex-wrap: wrap; /* 换行 */
-
-    &-item {
-      flex: 0 0 25%;
-
-      &-image {
-        display: block;
-        width: 40px;
-        height: 40px;
-        margin: auto;
-      }
-
-      &-lable {
-        text-align: center;
-        margin: auto;
-        margin-top: 16px;
-      }
-    }
-  }
-}
-
-@media (min-width: 500px) {
-  .doorSetting-container {
-    font-size: 0.6rem !important;
-    padding: 1rem !important;
-
-    .iconfont {
-      font-size: 1.5rem !important;
-      margin-bottom: 1.5rem !important;
-    }
-
-    .Grid {
-      display: flex;
-      justify-content: center; /* 左对齐 */
-      flex-wrap: wrap; /* 换行 */
-
-      &-item {
-        flex: 0 0 25%;
-        // justify-content: center;
-        // margin: auto;
-
-        &-image {
-          width: 2.5rem;
-          height: 2.5rem;
-        }
-
-        &-lable {
-          margin-top: 0.5rem !important;
-        }
-      }
-    }
-  }
-}
+@import "./index.scss";
 </style>

+ 7 - 28
src/pages/door/setting/other/index.vue

@@ -21,7 +21,7 @@
       <view class="mb10">绑定门禁</view>
       <view>
         <u-input
-          v-model="controlStore.form.doorList.name"
+          v-model="controlStore.form.door.name"
           placeholder="门禁(必选)"
           suffixIcon="arrow-right"
           suffixIconStyle="color: white"
@@ -68,6 +68,7 @@ function handleExit() {
   if (controlStore.isDataChange) {
     proxy.$modal.loading("保存中");
     uni.setStorageSync("storage_face", controlStore.form);
+    controlStore.initData(); //初始化数据
     setTimeout(() => {
       proxy.$tab.navigateBack(1);
       proxy.$modal.closeLoading();
@@ -77,36 +78,14 @@ function handleExit() {
   }
 }
 
-onShow(() => {
-  controlStore.getDoorList();
-});
-
 onLoad((options) => {
   controlStore.initData(); //初始化数据
 });
+
+onShow(() => {
+  controlStore.getDoorList();
+});
 </script>
 <style lang="scss">
-.doorSettingOther-container {
-  background: url(@/static/face/img/face_bg.png) no-repeat;
-  background-size: 100% 100%;
-  color: #ffffff;
-  padding: 16px;
-
-  .iconfont {
-    display: block;
-    margin-bottom: 16px;
-  }
-}
-
-@media (min-width: 500px) {
-  .doorSettingOther-container {
-    font-size: 0.6rem !important;
-    padding: 1rem !important;
-
-    .iconfont {
-      font-size: 1.5rem !important;
-      margin-bottom: 1.5rem !important;
-    }
-  }
-}
+@import "../index.scss";
 </style>

+ 73 - 0
src/pages/door/setting/public/index.vue

@@ -0,0 +1,73 @@
+<template>
+  <oa-scroll
+    customClass="doorSettingPublic-container scroll-height"
+    :customStyle="{
+      //#ifdef APP-PLUS || MP-WEIXIN
+      height: `calc(100vh - (0px))`,
+      //#endif
+      //#ifdef H5
+      height: `calc(100vh - (0px))`,
+      //#endif
+    }"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherDefaultStyle="'none'"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
+      <text class="iconfont oaIcon-left" @click="handleExit()"></text>
+      <u-cell-group>
+        <!-- #ifdef APP-PLUS -->
+        <u-cell title="WiFi管理" :value="1">
+          <template #value> <view class="u-cell__value">点击设置</view> <u-icon class="iconfont" name="arrow-right"></u-icon> </template>
+        </u-cell>
+        <u-cell title="IP地址">
+          <template #value> </template>
+        </u-cell>
+        <!-- #endif -->
+      </u-cell-group>
+    </template>
+  </oa-scroll>
+
+  <oa-upgrade ref="oaUpgradeRef" :themesColor="proxy.$settingStore.themeColor.color" />
+</template>
+<script setup>
+/*----------------------------------依赖引入-----------------------------------*/
+import config from "@/config";
+import { onLoad, onShow, onReady, onHide, onLaunch, onUnload, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
+import { ref, reactive, computed, getCurrentInstance, toRefs, inject, nextTick, watch } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+import { controlStores, commonStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+const { proxy } = getCurrentInstance();
+const controlStore = controlStores();
+const commonStore = commonStores();
+/*----------------------------------公共变量-----------------------------------*/
+const state = reactive({
+  version: computed(() => {
+    return config.appInfo.version;
+  }),
+});
+const { version } = toRefs(state);
+
+// 按钮点击事件
+function handleToSetting(type) {
+  if (type == "senior") {
+    proxy.$tab.navigateTo("/pages/door/setting/system/senior");
+  }
+}
+
+function handleExit() {
+  proxy.$tab.navigateBack(1);
+}
+
+onLoad((options) => {
+  controlStore.initData(); //初始化数据
+});
+</script>
+<style lang="scss" scoped>
+@import "../index.scss";
+</style>

+ 1 - 23
src/pages/door/setting/serve/index.vue

@@ -67,27 +67,5 @@ onLoad((options) => {
 });
 </script>
 <style lang="scss">
-.doorSettingServe-container {
-  background: url(@/static/face/img/face_bg.png) no-repeat;
-  background-size: 100% 100%;
-  color: #ffffff;
-  padding: 16px;
-
-  .iconfont {
-    display: block;
-    margin-bottom: 16px;
-  }
-}
-
-@media (min-width: 500px) {
-  .doorSettingServe-container {
-    font-size: 0.6rem !important;
-    padding: 1rem !important;
-
-    .iconfont {
-      font-size: 1.5rem !important;
-      margin-bottom: 1.5rem !important;
-    }
-  }
-}
+@import "../index.scss";
 </style>

+ 29 - 88
src/pages/door/setting/system/index.vue

@@ -17,28 +17,27 @@
   >
     <template #default>
       <text class="iconfont oaIcon-left" @click="handleExit()"></text>
-
       <u-cell-group>
-        <!-- <u-cell title="导航栏显示">
-            <template #value>
-              <u-switch v-model="setting.navBarNew" size="15" @change="navBarNewChange"></u-switch>
-            </template>
-          </u-cell> -->
+        <!-- #ifdef APP-PLUS || H5 -->
         <u-cell title="软件版本号" :value="version"></u-cell>
-        <!-- <u-cell title="设备型号" :value="getAndroidModle()"></u-cell>
-          <u-cell title="设备序列号" :value="getSerialno()"></u-cell> -->
-        <u-cell title="清除缓存" @click="removeToken()">
-          <template #value> <view class="iconfont oaIcon-qingchu" style="color: white; margin: auto 0px"></view> </template>
+        <u-cell title="清除缓存" @click="proxy.$setting.clearCache()">
+          <template #value> <view class="iconfont oaIcon-qingchu"></view> </template>
         </u-cell>
         <u-cell title="检查更新" @click="handleToUpgrade()">
-          <template #value> <view class="iconfont oaIcon-jianchagengxin" style="color: white; margin: auto 0px"></view> </template>
+          <template #value> <view class="iconfont oaIcon-jianchagengxin"></view> </template>
+        </u-cell>
+        <!-- #endif -->
+        <!-- #ifdef APP-PLUS -->
+        <u-cell title="设备型号" :value="proxy.$sys.getModel()"></u-cell>
+        <u-cell title="系统版本" :value="proxy.$sys.getVersion()"></u-cell>
+        <u-cell title="设备序列号" :value="proxy.$sys.getSerial()"></u-cell>
+        <u-cell title="高级" @click="handleToSetting('senior')">
+          <template #value> <view class="u-cell__value">点击设置</view> <u-icon class="iconfont" name="arrow-right"></u-icon> </template>
         </u-cell>
-        <u-cell title="退出应用" @click="controlStores.modalCancel()">
-          <template #value> <view class="iconfont oaIcon-exit" style="color: white; margin: auto 0px"></view> </template>
+        <u-cell title="设备重启" @click="proxy.$ph.reboot()">
+          <template #value> <view class="iconfont oaIcon-zhongqi1"></view> </template>
         </u-cell>
-        <!-- <u-cell title="设备重启" @click="rebootNow()">
-            <template #value> <u-icon name="reload" color="#2979ff" size="20"></u-icon> </template>
-          </u-cell> -->
+        <!-- #endif -->
       </u-cell-group>
     </template>
   </oa-scroll>
@@ -48,16 +47,16 @@
 <script setup>
 /*----------------------------------依赖引入-----------------------------------*/
 import config from "@/config";
-import { getToken, setToken, removeToken } from "@/utils/auth";
 import { onLoad, onShow, onReady, onHide, onLaunch, onUnload, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
 import { ref, reactive, computed, getCurrentInstance, toRefs, inject, nextTick, watch } from "vue";
 /*----------------------------------接口引入-----------------------------------*/
 /*----------------------------------组件引入-----------------------------------*/
 /*----------------------------------store引入-----------------------------------*/
-import { controlStores } from "@/store/modules/index";
+import { controlStores, commonStores } from "@/store/modules/index";
 /*----------------------------------公共方法引入-----------------------------------*/
 const { proxy } = getCurrentInstance();
 const controlStore = controlStores();
+const commonStore = commonStores();
 /*----------------------------------公共变量-----------------------------------*/
 const state = reactive({
   version: computed(() => {
@@ -66,10 +65,6 @@ const state = reactive({
 });
 const { version } = toRefs(state);
 
-function handleExit() {
-  proxy.$tab.redirectTo("/pages/door/setting/index");
-}
-
 /**
  * @检查更新
  */
@@ -83,75 +78,21 @@ function handleToUpgrade() {
   });
 }
 
-onLoad((options) => {
-  controlStore.initData(); //初始化数据
-
-  //#ifdef APP-PLUS
-  // const myActivityClass = plus.android.importClass("com.example.serialPort.UniSerialPort"); // 替换为你的包名和Activity名
-  // const myActivity = new myActivityClass(); // 创建插件类的实例
-
-  // console.log(myActivity);
-
-  // myActivity.test();
-
-  // myActivity.open((res) => {
-  //   console.log("open", res);
-  // });
-
-  // myActivity.onMessage((res) => {
-  //   console.log(res);
-  // });
+// 按钮点击事件
+function handleToSetting(type) {
+  if (type == "senior") {
+    proxy.$tab.navigateTo("/pages/door/setting/system/senior");
+  }
+}
 
-  // myActivity.getAllDeviceList((res) => {
-  //   console.log("getAllDeviceList", res);
-  // });
+function handleExit() {
+  proxy.$tab.navigateBack(1);
+}
 
-  // console.log(myActivity.isOpen());
-  //#endif
+onLoad((options) => {
+  controlStore.initData(); //初始化数据
 });
 </script>
 <style lang="scss" scoped>
-.doorSettingSystem-container {
-  background: url(@/static/face/img/face_bg.png) no-repeat;
-  background-size: 100% 100%;
-  color: #ffffff;
-  padding: 16px;
-
-  .oaIcon-left {
-    display: block;
-    margin-bottom: 16px;
-  }
-
-  :deep() {
-    .u-cell__value,
-    .u-cell__title-text {
-      color: white;
-    }
-  }
-}
-
-@media (min-width: 500px) {
-  .doorSettingSystem-container {
-    font-size: 0.6rem !important;
-    padding: 1rem !important;
-
-    .oaIcon-left {
-      font-size: 1.5rem !important;
-      margin-bottom: 1.5rem !important;
-    }
-
-    :deep() {
-      .u-cell__value,
-      .u-cell__title-text {
-        font-size: 0.8rem !important;
-      }
-
-      .u-cell__body {
-        > .iconfont {
-          font-size: 0.8rem !important;
-        }
-      }
-    }
-  }
-}
+@import "../index.scss";
 </style>

+ 92 - 0
src/pages/door/setting/system/senior.vue

@@ -0,0 +1,92 @@
+<template>
+  <oa-scroll
+    customClass="doorSettingSystem-container scroll-height"
+    :customStyle="{
+      //#ifdef APP-PLUS || MP-WEIXIN
+      height: `calc(100vh - (0px))`,
+      //#endif
+      //#ifdef H5
+      height: `calc(100vh - (0px))`,
+      //#endif
+    }"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherDefaultStyle="'none'"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
+      <text class="iconfont oaIcon-left" @click="handleExit()"></text>
+      <u-cell-group>
+        <u-cell title="测试内置硬件" @click="text()"></u-cell>
+        <u-cell title="继电器">
+          <template #value>
+            <u-switch v-model="commonStore.doorArray.systemSeeting.relayControl" size="15" @change="proxy.$ph.relayControl"></u-switch>
+          </template>
+        </u-cell>
+        <u-cell title="隐藏导航栏">
+          <template #value>
+            <u-switch v-model="commonStore.doorArray.systemSeeting.navBarNew" size="15" @change="proxy.$ph.navigationBar"></u-switch>
+          </template>
+        </u-cell>
+        <u-cell title="隐藏状态栏">
+          <template #value>
+            <u-switch v-model="commonStore.doorArray.systemSeeting.statusBar" size="15" @change="proxy.$ph.statusBar"></u-switch>
+          </template>
+        </u-cell>
+        <u-cell title="禁止状态栏下拉">
+          <template #value>
+            <u-switch v-model="commonStore.doorArray.systemSeeting.statusBarDrop" size="15" @change="proxy.$ph.statusBarDrop"></u-switch>
+          </template>
+        </u-cell>
+        <u-cell title="退出应用" @click="Cancel()">
+          <template #value> <u-icon class="iconfont" name="arrow-rightward"></u-icon></template>
+        </u-cell>
+      </u-cell-group>
+    </template>
+  </oa-scroll>
+</template>
+<script setup>
+/*----------------------------------依赖引入-----------------------------------*/
+import config from "@/config";
+import { onLoad, onShow, onReady, onHide, onLaunch, onUnload, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
+import { ref, reactive, computed, getCurrentInstance, toRefs, inject, nextTick, watch } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+import { controlStores, commonStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------zhe------------*/
+const { proxy } = getCurrentInstance();
+const controlStore = controlStores();
+const commonStore = commonStores();
+/*----------------------------------公共变量-----------------------------------*/
+const state = reactive({
+  version: computed(() => {
+    return config.appInfo.version;
+  }),
+});
+const { version } = toRefs(state);
+
+function text() {
+  const phPlugin = uni.requireNativePlugin("phPlugin");
+  phPlugin.text();
+}
+
+function handleExit() {
+  proxy.$tab.navigateBack(1);
+}
+
+// 应用退出按钮事件
+function Cancel() {
+  //#ifdef APP-PLUS
+  proxy.$keyListen.quitApp();
+  //#endif
+}
+
+onLoad((options) => {
+  controlStore.initData(); //初始化数据
+});
+</script>
+<style lang="scss" scoped>
+@import "../index.scss";
+</style>

+ 33 - 204
src/pages/face/index.vue

@@ -19,45 +19,20 @@
     :showConfirmButton="true"
     :showCancelButton="true"
     :closeOnClickOverlay="true"
-    @confirm="controlStore.modalConfirm(), getMeetingRoomReservationList()"
-    @cancel="controlStore.modalCancel()"
-    @close="controlStore.modalClose()"
+    @confirm="controlStore.handleModal('Confirm')"
+    @cancel="controlStore.handleModal('Cancel')"
+    @close="controlStore.handleModal('Close')"
   >
     <view class="slot-content">
+      <!-- <view @click="startActivity()">测试startActivity</view> -->
+
       <u-subsection class="mb20" :list="controlStore.subsection.list" :current="controlStore.subsection.value" @change="controlStore.sectionChange"></u-subsection>
 
       <view v-if="controlStore.subsection.value == 0">
-        <view class="mb10 required">服务器地址</view>
-        <view class="mb20">
-          <u-input v-model="controlStore.form.linkUrl" placeholder="服务器地址(必填)" border="bottom" style="padding: 6px 0px" />
-        </view>
-
-        <view class="mb10">服务器端口</view>
-        <view class="mb20">
-          <u-input v-model="controlStore.form.port" placeholder="服务器端口(非必填)" border="bottom" style="padding: 6px 0px" />
-        </view>
-      </view>
-
-      <view v-if="controlStore.subsection.value == 1">
-        <view class="mb10 required">绑定会议室</view>
-        <view class="mb20">
-          <u-input
-            v-model="controlStore.form.meetingName"
-            placeholder="会议室(必选)"
-            suffixIcon="arrow-right"
-            suffixIconStyle="color: #909399"
-            border="bottom"
-            style="padding: 6px 0px"
-            disabledColor="transparent"
-            disabled
-            @click="controlStore.handlePicker('绑定会议室')"
-          />
-        </view>
-
         <view class="mb10 required">绑定门禁</view>
         <view>
           <u-input
-            v-model="controlStore.form.doorList.name"
+            v-model="controlStore.form.door.name"
             placeholder="门禁(必选)"
             suffixIcon="arrow-right"
             suffixIconStyle="color: #909399"
@@ -69,15 +44,16 @@
         </view>
       </view>
 
-      <u-cell-group v-if="controlStore.subsection.value == 2">
+      <u-cell-group v-if="controlStore.subsection.value == 1">
         <u-cell title="导航栏显示">
           <template #value>
             <u-switch v-model="setting.navBarNew" size="15" @change="navBarNewChange"></u-switch>
           </template>
         </u-cell>
         <u-cell title="软件版本号" :value="version"></u-cell>
-        <u-cell title="设备型号" :value="getAndroidModle()"></u-cell>
-        <u-cell title="设备序列号" :value="getSerialno()"></u-cell>
+        <u-cell title="IP" :value="setting.ipAddress || '-'"></u-cell>
+        <u-cell title="设备型号" :value="sysPlugins.getDeviceInfo().model || '-'"></u-cell>
+        <u-cell title="设备序列号" :value="sysPlugins.getDeviceInfo().serial || '-'"></u-cell>
         <u-cell title="检查更新" @click="handleToUpgrade()">
           <template #value> <view class="iconfont oaIcon-jianchagengxin menu-item-icon mr2" style="color: #2979ff"></view> </template>
         </u-cell>
@@ -109,11 +85,11 @@ import config from "@/config";
 import { onLoad, onShow, onReady, onHide, onLaunch, onUnload, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
 import { ref, reactive, computed, getCurrentInstance, toRefs, inject, nextTick, watch } from "vue";
 /*----------------------------------接口引入-----------------------------------*/
-import { meetingApi, signOnOut } from "@/api/business/meeting.js";
 /*----------------------------------组件引入-----------------------------------*/
 /*----------------------------------store引入-----------------------------------*/
 import { controlStores } from "@/store/modules/index";
 /*----------------------------------公共方法引入-----------------------------------*/
+import sysPlugins from "@/plugins/device/sys.plugins";
 /*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
 const controlStore = controlStores();
@@ -133,154 +109,30 @@ const state = reactive({
 
   setting: {
     navBarNew: true,
-    serialno: "", //设备序列号
+    ipAddress: "",
   },
 });
 const { version, webviewStyles, inter, setting } = toRefs(state);
 
 // 初始化
 function init() {
+  setInterval(() => {
+    sysPlugins.getIpAddress({
+      success: (res) => {
+        state.setting.ipAddress = res;
+      },
+      error: (res) => {
+        state.setting.ipAddress = "";
+      },
+    });
+  }, 2000);
+
   controlStore.pageFunction = ["门禁", "会议"];
   controlStore.initCamera();
   // controlStore.initNfc();
   controlStore.initData();
-  if (!inter.meeting) {
-    getMeetingRoomReservationList();
-    inter.meeting = setInterval(() => {
-      getMeetingRoomReservationList();
-    }, 1000 * 3);
-  }
+  controlStore.openInterval("meeting");
 
-  timingRebootNow(); //调用定时重启
-}
-
-/**
- * @会议室详情列表
- */
-function getMeetingRoomReservationList() {
-  controlStore.meetingTimeList = [];
-  controlStore.meetingReservaList.thisVenueData = [];
-  controlStore.meetingReservaList.thisVenueTime = {};
-  controlStore.meetingReservaList.nextSceneData = [];
-  controlStore.meetingReservaList.nextSceneTime = {};
-
-  for (let i = 0; i <= 23.5; i += 0.5) {
-    var time = "";
-    if (i % 1 === 0.5) {
-      if (i < 10) {
-        time = "0" + (i - 0.5) + ":30";
-      } else {
-        time = i - 0.5 + ":30";
-      }
-    } else {
-      if (i < 10) {
-        time = "0" + i + ":00";
-      } else {
-        time = i + ":00";
-      }
-    }
-
-    controlStore.meetingTimeList.push({
-      startTime: time,
-      endTime: time,
-      isEnd: 0,
-      isHave: 0,
-      isReservation: 0,
-    });
-  }
-
-  meetingApi()
-    .GetMeetingRoomReservationList({
-      domain: controlStore.form.domain,
-      meetingRoomId: controlStore.form.meetingId,
-      date: proxy.$dayjs().format("YYYY-MM-DD") + " 00:00:00",
-    })
-    .then((requset) => {
-      if (requset.data.length > 0) {
-        controlStore.meetingReservaList.dataAll = requset.data[0];
-        controlStore.meetingReservaList.dataAll.dmMeetingList.forEach((e, index) => {
-          //判断开始时间和结束时间是否包含当前时间
-          if (proxy.$dayjs().isBetween(e.startDate, e.endDate, null, "[]")) {
-            controlStore.meetingReservaList.thisVenueData.push(e);
-            controlStore.meetingReservaList.thisVenueTime = proxy.$time.timeRestructuring(controlStore.meetingReservaList.dataAll.meetingRoomUsage[index]);
-          }
-          //判断当前时间是否相同或在其之前
-          if (proxy.$dayjs().isSameOrBefore(e.startDate) && controlStore.meetingReservaList.nextSceneData.length < 1) {
-            controlStore.meetingReservaList.nextSceneData.push(e);
-            controlStore.meetingReservaList.nextSceneTime = proxy.$time.timeRestructuring(controlStore.meetingReservaList.dataAll.meetingRoomUsage[index]);
-          }
-        });
-
-        controlStore.meetingReservaList.timeList = showTimeSegments(controlStore.meetingTimeList);
-        controlStore.handleChildren({
-          funcName: "初始化数据",
-          data: JSON.stringify(controlStore.meetingReservaList),
-        });
-      } else {
-        controlStore.meetingReservaList.timeList = controlStore.meetingTimeList;
-        controlStore.handleChildren({
-          funcName: "初始化数据",
-          data: JSON.stringify(controlStore.meetingReservaList),
-        });
-      }
-    })
-    .catch((err) => {});
-}
-
-// 显示时间段的函数
-function showTimeSegments(times) {
-  const timesXleList = JSON.parse(JSON.stringify(times));
-
-  for (var i = 0; i < timesXleList.length; i++) {
-    const timeValue = new Date(`${proxy.$dayjs().format("YYYY-MM-DD")}T${timesXleList[i].startTime}`);
-
-    controlStore.meetingReservaList.dataAll.meetingRoomUsage.forEach((item) => {
-      const timeList = proxy.$time.timeRestructuring(item);
-      const startValue = new Date(`${proxy.$dayjs().format("YYYY-MM-DD")}T${timeList.startTime}`);
-      const endValue = new Date(`${proxy.$dayjs().format("YYYY-MM-DD")}T${timeList.endTime}`);
-
-      if (timeValue.getTime() >= startValue.getTime() && timeValue.getTime() < endValue.getTime()) {
-        timesXleList.splice(i--, 1);
-      }
-    });
-  }
-
-  controlStore.meetingReservaList.dataAll.meetingRoomUsage.forEach((item) => {
-    const timeList = proxy.$time.timeRestructuring(item);
-    const startValue = new Date(`${proxy.$dayjs().format("YYYY-MM-DD")}T${timeList.startTime}`);
-    const endValue = new Date(`${proxy.$dayjs().format("YYYY-MM-DD")}T${timeList.endTime}`);
-
-    if (proxy.$dayjs().isBetween(startValue, endValue, null, "[]")) {
-      timesXleList.push({
-        ...timeList,
-        isEnd: 0,
-        isHave: 1,
-        isReservation: 0,
-      });
-    } else {
-      if (proxy.$dayjs().isSameOrAfter(startValue)) {
-        timesXleList.push({
-          ...timeList,
-          isEnd: 1,
-          isHave: 0,
-          isReservation: 0,
-        });
-      }
-      if (proxy.$dayjs().isSameOrBefore(startValue)) {
-        timesXleList.push({
-          ...timeList,
-          isEnd: 0,
-          isHave: 0,
-          isReservation: 1,
-        });
-      }
-    }
-  });
-
-  var newTimesXleList = proxy.$common
-    .uniq(timesXleList, "startTime")
-    .sort((a, b) => new Date(`${proxy.$dayjs().format("YYYY-MM-DD")}T${a.startTime}`) - new Date(`${proxy.$dayjs().format("YYYY-MM-DD")}T${b.startTime}`));
-  return newTimesXleList;
 }
 
 /**
@@ -295,47 +147,19 @@ window.onmessage = function (event) {
 };
 // #endif
 
-function handleButton(value) {
-  //#ifdef APP-PLUS
-  const myActivityClass = plus.android.importClass("com.example.yxDevice.test"); // 替换为你的包名和Activity名
-  const myActivity = new myActivityClass(); // 创建插件类的实例
-  myActivity.setLed(value);
-  //#endif
-}
-
-// 获取设备序列号
-function getAndroidModle() {
-  //#ifdef APP-PLUS
-  const myActivityClass = plus.android.importClass("com.example.yxDevice.test"); // 替换为你的包名和Activity名
-  const myActivity = new myActivityClass(); // 创建插件类的实例
-  return myActivity.getAndroidModle();
-  //#endif
-}
-
-// 获取设备序列号
-function getSerialno() {
-  //#ifdef APP-PLUS
-  const myActivityClass = plus.android.importClass("com.example.yxDevice.test"); // 替换为你的包名和Activity名
-  const myActivity = new myActivityClass(); // 创建插件类的实例
-  return myActivity.getSerialno();
-  //#endif
-}
-
 // 隐藏导航栏
 function navBarNewChange(value) {
   //#ifdef APP-PLUS
-  const myActivityClass = plus.android.importClass("com.example.yxDevice.test"); // 替换为你的包名和Activity名
-  const myActivity = new myActivityClass(); // 创建插件类的实例
-  myActivity.setNavBarNew(value);
+  const yxPlugin = uni.requireNativePlugin("yxPlugin");
+  yxPlugin.setNavBarNew(value);
   //#endif
 }
 
 // 设备重启
 function rebootNow() {
   //#ifdef APP-PLUS
-  const myActivityClass = plus.android.importClass("com.example.yxDevice.test"); // 替换为你的包名和Activity名
-  const myActivity = new myActivityClass(); // 创建插件类的实例
-  myActivity.rebootNow();
+  const yxPlugin = uni.requireNativePlugin("yxPlugin");
+  yxPlugin.rebootNow();
   //#endif
 }
 
@@ -375,6 +199,11 @@ function handleToUpgrade() {
   });
 }
 
+function startActivity() {
+  const yxPlugin = uni.requireNativePlugin("yxPlugin");
+  yxPlugin.startActivity();
+}
+
 onLoad((options) => {
   setTimeout(() => {
     init();

+ 0 - 97
src/plugins/constData.plugins.js

@@ -32,100 +32,6 @@ let homeTabbar = [
 	},
 ]
 
-// 工作报告底部导航栏
-let projectTabbar = [
-	{
-		pagePath: "/pages/business/common/projectMange/record/index",
-		iconClass: "oaIcon-tab-reportRecord",
-		iconPath: "",
-		selectedIconPath: "",
-		text: "报告记录",
-		dot: false,
-	},
-	{
-		pagePath: "/pages/business/common/projectMange/write/index",
-		iconClass: "oaIcon-tab-reportInsert",
-		iconPath: "",
-		selectedIconPath: "",
-		text: "报告填写",
-		dot: false,
-	},
-	{
-		pagePath: "/pages/business/common/projectMange/statistics/index",
-		iconClass: "oaIcon-tab-reportCount",
-		iconPath: "",
-		selectedIconPath: "",
-		text: "报告统计",
-		dot: false,
-	},
-	{
-		pagePath: "/pages/business/common/projectMange/list/index",
-		iconClass: "oaIcon-tab-projectsList",
-		iconPath: "",
-		selectedIconPath: "",
-		text: "项目列表",
-		dot: false,
-	},
-	// {
-	// 	pagePath: "/pages/mine",
-	//  iconClass: "oaIcon-tab-reportInsert",
-	// 	iconPath: "/static/images/tabBar/tab-my.png",
-	// 	selectedIconPath: "/static/images/tabBar/tab-my-blue.png",
-	// 	text: "统计导出",
-	// 	dot: false,
-	// },
-	// {
-	// 	pagePath: "/pages/info",
-	//  iconClass: "oaIcon-tab-reportInsert",
-	// 	iconPath: "/static/images/tabBar/tab-info.png",
-	// 	selectedIconPath: "/static/images/tabBar/tab-info-blue.png",
-	// 	text: "模板管理",
-	// 	dot: false,
-	// },
-]
-
-// OA-我的申请导航栏
-let oaApprovalTabbar = [
-	{
-		pagePath: "/pages/business/oa/approval/index",
-		iconClass: "oaIcon-tab-reportRecord",
-		iconPath: "/static/images/tabBar/tab-approval-gray.png",
-		selectedIconPath: "/static/images/tabBar/tab-approval-blue.png",
-		text: "我的申请",
-		dot: false,
-	},
-	{
-		pagePath: "/pages/business/oa/toDo/index",
-		iconClass: "oaIcon-tab-reportInsert",
-		iconPath: "/static/images/tabBar/tab-toDo-gray.png",
-		selectedIconPath: "/static/images/tabBar/tab-toDo-blue.png",
-		text: "我的待办",
-		dot: false,
-	}
-]
-
-
-// 门禁管理底部导航栏
-let doorTabbar = [
-	{
-		pagePath: "/pages/business/doorManage/list/index",
-		iconClass: "oaIcon-tab-projectsList",
-		iconPath: "",
-		selectedIconPath: "",
-		text: "首页",
-		dot: false,
-	},
-	{
-		pagePath: "/pages/business/doorManage/record/index",
-		iconClass: "oaIcon-tab-reportRecord",
-		iconPath: "",
-		selectedIconPath: "",
-		text: "记录",
-		dot: false,
-	},
-]
-
-
 export default {
 	// 主题列表
 	themeList: [
@@ -271,7 +177,4 @@ export default {
 		}
 	],
 	homeTabbar: homeTabbar,
-	projectTabbar: projectTabbar,
-	oaApprovalTabbar:oaApprovalTabbar,
-	doorTabbar:doorTabbar
 };

+ 58 - 0
src/plugins/device/ph.plugins.js

@@ -0,0 +1,58 @@
+import modal from "../modal.plugins";
+
+/**
+ * @海清硬件api
+ */
+export default {
+    /**
+     * @继电器控制
+     * @param {状态值} status true/false
+     */
+    relayControl(status) {
+        //#ifdef APP-PLUS
+        const phPlugin = uni.requireNativePlugin("phPlugin");
+        phPlugin.relay_Control(status);
+        //#endif
+    },
+    /**
+     * @导航栏显示隐藏
+     * @param {状态值} status true/false
+     */
+    navigationBar(status) {
+        //#ifdef APP-PLUS
+        const phPlugin = uni.requireNativePlugin("phPlugin");
+        phPlugin.navigationBar(status);
+        //#endif
+    },
+    /**
+     * @状态显示隐藏控制
+     * @param {状态值} status true/false
+     */
+    statusBar(status) {
+        //#ifdef APP-PLUS
+        const phPlugin = uni.requireNativePlugin("phPlugin");
+        phPlugin.statusBar(status);
+        //#endif
+    },
+    /**
+     * @状态面板下拉控制
+     * @param {状态值} status true/false
+     */
+    statusBarDrop(status) {
+        //#ifdef APP-PLUS
+        const phPlugin = uni.requireNativePlugin("phPlugin");
+        phPlugin.statusBarDrop(status);
+        //#endif
+    },
+    /**
+    * @设备重启
+    */
+    reboot() {
+        //#ifdef APP-PLUS
+        modal.confirm("是否重启设备?").then((e) => {
+            const phPlugin = uni.requireNativePlugin("phPlugin");
+            phPlugin.reboot();
+        })
+        //#endif
+    },
+};

+ 108 - 0
src/plugins/device/sys.plugins.js

@@ -0,0 +1,108 @@
+import modal from "../modal.plugins";
+import config from "../../config";
+
+/**
+ * @系统硬件api
+ */
+export default {
+    /**
+     * 离线开门
+     * @isOpen  开关门(1开、2常闭、3常开)
+     */
+    openDoor(isOpen, timeout) {
+        // 智能会议
+        if (config.appInfo.appid === "__UNI__F3963F8") {
+            //#ifdef APP-PLUS
+            const yxPlugin = uni.requireNativePlugin("yxPlugin");
+            if (isOpen == 1) {
+                yxPlugin.setDoor("开");
+                setTimeout(() => {
+                    yxPlugin.setDoor("关");
+                }, timeout);
+            } else if (isOpen == 2) {
+                yxPlugin.setDoor("关");
+            } else if (isOpen == 3) {
+                yxPlugin.setDoor("开");
+            }
+            //#endif
+        }
+        // 智能门禁
+        else if (config.appInfo.appid === "__UNI__8D6E9FD") {
+            //#ifdef APP-PLUS
+            const phPlugin = uni.requireNativePlugin("phPlugin");
+            if (isOpen == 1) {
+                phPlugin.relay_Control(true);
+                setTimeout(() => {
+                    phPlugin.relay_Control(false);
+                }, timeout);
+            } else if (isOpen == 2) {
+                phPlugin.relay_Control(false);
+            } else if (isOpen == 3) {
+                phPlugin.relay_Control(true);
+            }
+            //#endif
+        }
+    },
+    /**
+     * @获取有线网的IP地址
+     */
+    getEthernetIpAddress() {
+        //#ifdef APP-PLUS
+        const sysPlugin = uni.requireNativePlugin("sysPlugin");
+        sysPlugin.initWithContext((code) => {
+            if (code == 'SUCCESS') {
+                console.log(sysPlugin.getEthernetIpAddress())
+
+                return sysPlugin.getEthernetIpAddress();
+            } else {
+                modal.msg(code)
+            }
+        })
+        //#endif
+    },
+    /**
+     * @获取设备序列号
+     */
+    getSerial() {
+        //#ifdef APP-PLUS
+        const sysPlugin = uni.requireNativePlugin("sysPlugin");
+        return sysPlugin.getSerial();
+        //#endif
+    },
+    /**
+     * @获取设备型号
+     */
+    getModel() {
+        //#ifdef APP-PLUS
+        const sysPlugin = uni.requireNativePlugin("sysPlugin");
+        return sysPlugin.getModel();
+        //#endif
+    },
+    /**
+     * @获取厂商
+     */
+    getManufacturer() {
+        //#ifdef APP-PLUS
+        const sysPlugin = uni.requireNativePlugin("sysPlugin");
+        return sysPlugin.getManufacturer();
+        //#endif
+    },
+    /**
+     * @获取系统版本
+     */
+    getVersion() {
+        //#ifdef APP-PLUS
+        const sysPlugin = uni.requireNativePlugin("sysPlugin");
+        return sysPlugin.getVersion();
+        //#endif
+    },
+    /**
+     * @获取SDK版本
+     */
+    getSdk() {
+        //#ifdef APP-PLUS
+        const sysPlugin = uni.requireNativePlugin("sysPlugin");
+        return sysPlugin.getSdk();
+        //#endif
+    }
+};

+ 41 - 0
src/plugins/device/yx.plugins.js

@@ -0,0 +1,41 @@
+import modal from "../modal.plugins";
+
+/**
+ * @武汉智联硬件api
+ */
+export default {
+    /**
+     * 离线开门
+     * @isOpen  开关门(1开、2常闭、3常开)
+     */
+    openDoor(isOpen) {
+        const yxPlugin = uni.requireNativePlugin("yxPlugin");
+        if (isOpen == '1') {
+            yxPlugin.setDoor("开");
+            setTimeout(() => {
+                yxPlugin.setDoor("关");
+            }, 2000);
+        } else if (isOpen == '2') {
+            yxPlugin.setDoor("关");
+        } else if (isOpen == '3') {
+            yxPlugin.setDoor("开");
+        }
+    },
+    /**
+     * @设置灯光
+     * @param {        
+     *  // 蓝色:io20/io21亮灭 
+     *  // 红色:io30/io31亮灭
+     *  // 绿色:io40/io41亮灭
+     *  // 紫色:I020+I030/I021+I031亮灭
+     *  // 青色:I020+I040/I021+I041亮灭
+     *  // 黄色:I030+I040/I031+I041亮灭
+     * } value 
+     */
+    setLed(value) {
+        //#ifdef APP-PLUS
+        const yxPlugin = uni.requireNativePlugin("yxPlugin");
+        yxPlugin.setLed(value);
+        //#endif
+    }
+};

+ 16 - 0
src/plugins/index.js

@@ -8,6 +8,9 @@ import constData from "./constData.plugins.js";
 import nfc from "./nfc.plugins.js";
 import keyListen from "./keyListen.plugins.js";
 import permission from "./permission.plugins.js";
+import yx from "./device/yx.plugins.js";
+import ph from "./device/ph.plugins.js";
+import sys from "./device/sys.plugins.js";
 
 import config from "@/config"; // config
 import { useDict } from '@/utils/dict'
@@ -67,5 +70,18 @@ export default {
     // App权限判断
     app.provide("$permission", permission);
     app.config.globalProperties.$permission = permission;
+
+
+
+
+    // 武汉智联硬件api
+    app.provide("$yx", yx);
+    app.config.globalProperties.$yx = yx;
+    // 海清硬件api
+    app.provide("$ph", ph);
+    app.config.globalProperties.$ph = ph;
+    // 系统硬件api
+    app.provide("$sys", sys);
+    app.config.globalProperties.$sys = sys;
   },
 };

+ 9 - 10
src/plugins/keyListen.plugins.js

@@ -6,13 +6,13 @@ const SYSTEM_RECENT_APPS = "recentapps";
 
 let receiver, Intent = false;
 export default {
-    startListen: function (needStopSystem = false) {//开始监听,初始化
+    startListen: function (event) {//开始监听,初始化
         //参数needStopSystem默认不阻止系统响应,如需阻止调用startListen(true)
         /*特别提醒,全面屏手势Home和recent部分机型是监听不到的,自行测试,如遇卡死电脑控制台直接重新运行项目即可解决!*/
         let that = this;
         let main = plus.android.runtimeMainActivity();
-        that.openListen();
-        if (needStopSystem) {
+        that.openListen(event);
+        if (event.needStopSystem) {
             plus.key.addEventListener("backbutton", function (e) {
                 // main.stopLockTask()//按返回键恢复
                 // main.startLockTask()//阻止系统home建和近期任务键
@@ -21,9 +21,8 @@ export default {
             });
         } else {
         }
-
     },
-    openListen: function () {//注册监听
+    openListen: function (event) {//注册监听
         let that = this;
         try {
             let main = plus.android.runtimeMainActivity();
@@ -51,12 +50,12 @@ export default {
                             if (systemReason == SYSTEM_HOME_KEY) {
                                 // System.out.println("按下HOME键");
                                 console.log('按下HOME键')
-                                that.launchApp();//启动APP
+                                that.launchApp(event);//启动APP
 
                             } else if (systemReason == SYSTEM_RECENT_APPS) {
                                 // System.out.println("按下多任务键");
                                 console.log('按下多任务键')
-                                that.launchApp();//启动APP
+                                that.launchApp(event);//启动APP
                             }
                         }
                     }
@@ -92,17 +91,17 @@ export default {
         main.startLockTask()//阻止系统home建和近期任务键
     },
     // 启动APP
-    launchApp() {
+    launchApp(event) {
         var isApp = plus.runtime.isApplicationExist({
             //查看安卓系统手机有没有下载这款app
-            pname: 'android.dcloud.uskyMobile' //本地浏览器的包名
+            pname: event.packageName //本地浏览器的包名
         })
 
         if (isApp) {
             //安装了app则运行
             plus.runtime.launchApplication(
                 {
-                    pname: "android.dcloud.uskyMobile",
+                    pname: event.packageName,
                     newTask: false
                 },
                 (e) => {

+ 17 - 0
src/plugins/setting.plugins.js

@@ -1,4 +1,5 @@
 import { settingStores } from "@/store/modules/index";
+import { getToken, setToken, removeToken } from "@/utils/auth";
 
 /**
  * @获取缓存
@@ -28,6 +29,8 @@ const formatSize = () => {
  * @清理缓存
  */
 const clearCache = () => {
+
+  //#ifdef APP-PLUS
   let os = plus.os.name;
   if (os == "Android") {
     let main = plus.android.runtimeMainActivity();
@@ -84,6 +87,20 @@ const clearCache = () => {
       formatSize();
     });
   }
+  //#endif
+
+  //#ifdef H5
+  uni.showToast({
+    title: "缓存清理完成",
+    duration: 2000,
+    mask: true,
+  });
+  //#endif
+
+
+  if (getToken()) {
+    removeToken();
+  }
 };
 
 export default {

+ 67 - 57
src/plugins/time.plugins.js

@@ -1,3 +1,5 @@
+import dayjs from 'dayjs'
+
 export default {
     /**
      * @param {时间处理(今日,昨日)} 
@@ -137,81 +139,89 @@ export default {
      * @获取年月日星期几
      */
     getDate() {
-        var date = new Date();
-        var year = date.getFullYear(); //  返回的是年份
-        var month = date.getMonth() + 1; //  返回的月份上个月的月份,记得+1才是当月
-        if (month < 10) {
-            month = "0" + month;
-        }
-        var dates = date.getDate(); //  返回的是几号
-        if (dates < 10) {
-            dates = "0" + dates;
-        }
-        var day = date.getDay(); //  周一返回的是1,周六是6,但是周日是0
-        var arr = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
-        return { year, month, dates, day, arr, };
+        const now = dayjs();
+
+        const year = now.year();
+        const month = now.month() + 1; // dayjs月份也是0开始,需+1
+        const dates = now.date();
+        const day = now.day(); // 0-6,0是星期日
+
+        // 星期几的文本映射
+        const arr = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
+
+        return {
+            year,
+            // 自动补零处理,使用String.prototype.padStart更简洁
+            month: String(month).padStart(2, '0'),
+            dates: String(dates).padStart(2, '0'),
+            day,
+            arr
+        };
     },
     /**
      * @获取当前周开始结束日期
      */
     getCurrentWeekDate() {
-        const now = new Date();
-        const startOfWeek = new Date(now.getFullYear(), now.getMonth(), now.getDate() - now.getDay() + 1); // 本周开始日期
-        const endOfWeek = new Date(startOfWeek);
-        endOfWeek.setDate(endOfWeek.getDate() + 6); // 本周结束日期
+        const now = dayjs();
 
-        const startDate = this.getFormatterDate(startOfWeek).split(' ')[0];
-        const endDate = this.getFormatterDate(endOfWeek).split(' ')[0];
+        const startOfWeek = now.subtract(now.day() === 0 ? 6 : now.day() - 1, 'day');
+        const endOfWeek = startOfWeek.add(6, 'day');
 
-        return {
-            startDate: startDate,
-            endDate: endDate
-        }
+        const startDate = startOfWeek.format('YYYY-MM-DD');
+        const endDate = endOfWeek.format('YYYY-MM-DD');
+
+        return { startDate, endDate };
     },
     /**
      * @时间重组
      * @param { 时间段 } chooseTime 
      */
     timeRestructuring(chooseTime) {
-        var startTime = "";
-        var endTime = "";
-        let start = chooseTime[0];
-        let end = chooseTime[1];
-
-        if (start == 0 && end == 0) {
-            startTime = "00:00";
-            endTime = "00:30";
-        }
+        // 解构获取开始和结束时间
+        const [start, end] = chooseTime;
 
-        if ((!start && start !== 0) || !end) {
-            startTime = "";
-            endTime = "";
-            return;
+        // 处理无效输入
+        if ((start === undefined || start === null) && start !== 0 ||
+            end === undefined || end === null) {
+            return { startTime: "", endTime: "" };
         }
 
-        if (start % 1 === 0.5) {
-            start = (start - 0.5 < 10 ? "0" : "") + (start - 0.5) + ":30";
-        } else {
-            start = (start < 10 ? "0" : "") + start + ":00";
+        // 特殊情况处理:开始和结束都为0
+        if (start === 0 && end === 0) {
+            return { startTime: "00:00", endTime: "00:30" };
         }
 
-        if (Number.isInteger(end)) {
-            if (end === 24) {
-                end = "23:30";
-            } else {
-                end = (end - 0.5 < 10 ? "0" : "") + end + ":00";
-            }
-        } else {
-            if (end === 24) {
-                end = "23:30";
-            } else {
-                end = (end < 10 ? "0" : "") + (end - 0.5) + ":30";
-            }
-        }
+        // 使用dayjs处理开始时间格式化
+        const startTime = dayjs()
+            .hour(Math.floor(start))          // 设置小时
+            .minute(start % 1 === 0.5 ? 30 : 0)  // 设置分钟(0.5小时对应30分钟)
+            .format("HH:mm");                // 格式化为HH:mm格式
 
-        return {
-            startTime: start,
-            endTime: end,
-        };
+        // 处理结束时间的特殊情况(24点转换为23:30)
+        const endValue = end === 24 ? 23.5 : end;
+
+        // 使用dayjs处理结束时间格式化
+        const endTime = dayjs()
+            .hour(Math.floor(endValue))       // 设置小时
+            .minute(endValue % 1 === 0.5 ? 30 : 0)  // 设置分钟
+            .format("HH:mm");                // 格式化为HH:mm格式
+
+        return { startTime, endTime };
+    },
+    /**
+     * @判断当前时间是否在目标区间内
+     * @param {*} startDate 
+     * @param {*} endDate 
+     */
+    isInRange(startDate, endDate) {
+        // 获取当前时间
+        const now = dayjs();
+
+        // 定义当天8点和18点
+        const start = dayjs().hour(startDate).minute(0).second(0).millisecond(0); // 8:00:00.000
+        const end = dayjs().hour(endDate).minute(0).second(0).millisecond(0); // 18:00:00.000
+
+        // 判断当前时间是否在8-18点之间
+        return now.isAfter(start) && now.isBefore(end);
     }
 }

+ 10 - 1
src/static/face/css/door_homeCardCenter.css

@@ -21,10 +21,19 @@
 }
 
 .home-card-center>.date .remark {
-    width: 80%;
+    width: 100%;
     font-size: 1rem;
     text-align: center;
+    margin: 0 auto 1.5rem auto;
+    padding: 0 2rem;
+}
+
+.home-card-center>.date .workStatus {
+    font-size: 1.5rem;
     margin: 0 auto;
+    padding: 5px 15px;
+    color: white;
+    border-radius: 10px;
 }
 
 video,

+ 42 - 22
src/static/face/door.html

@@ -38,6 +38,18 @@
             margin-left: 1rem;
         }
 
+        .workRed {
+            background-color: #f11e16;
+        }
+
+        .workYellow {
+            background-color: #E6A23C;
+        }
+
+        .workGreen {
+            background-color: #67C23A;
+        }
+
         @media (min-width: 768px) {
             .home-card-top {
                 width: calc(100% - 5rem) !important;
@@ -68,6 +80,12 @@
 
             .home-card-center>.date .remark {
                 font-size: 2rem;
+                margin-bottom: 5rem;
+            }
+
+            .home-card-center>.date .workStatus {
+                font-size: 3rem;
+                padding: 10px 30px;
             }
 
             .home-card-footer {
@@ -111,15 +129,16 @@
                 <span class="time1">{{ state.dateTime }}</span>
                 <span class="time2">{{ state.date }}</span>
             </div>
-            <div v-if="state.openMode?.includes('人脸')" class="title">{{ state.doorName || '未绑定门禁' }}</div>
+            <div class="title" v-if="state.openMode.includes('人脸')">{{ state.doorName || '未绑定门禁' }}</div>
         </div>
         <!-- 人脸内容区域 -->
-        <div class="home-card-center" id="home-card-center">
-            <div v-if="!state.openMode?.includes('人脸')" class="date" id="configDialog1">
+        <div class="home-card-center">
+            <div class="date" id="configDialog1" v-if="!state.openMode.includes('人脸')">
                 <div class="title">{{ state.doorName || '未绑定门禁' }}</div>
-                <div class="remark">{{state.remark || ""}}</div>
+                <div class="remark" v-if="state.remark">{{ state.remark }}</div>
+                <div class="workStatus" :class="state.workClass">{{ state.workName }}</div>
             </div>
-            <div v-if="state.openMode?.includes('人脸')" class="face">
+            <div class="face" v-if="state.openMode.includes('人脸')">
                 <!-- height="1564" -->
                 <video id="video" width="300" height="300" style="width:40vh;height:40vh" preload autoplay loop
                     muted></video>
@@ -130,14 +149,9 @@
         </div>
         <!-- 底部内容区域 -->
         <div class="home-card-footer">
-            <!-- <div class="qrCode">
-                <div class="buttom" @click="parentMessage('密码')" v-if="state.openMode?.includes('密码')">密码</div>
-                <div class="buttom" @click="parentMessage('点击开门')" v-if="state.openMode?.includes('点击开门')">点击开门</div>
-            </div> -->
             <div class="btnArea">
-                <i class="iconfont oa-dianji" @click="parentMessage('点击开门')"
-                    v-if="state.openMode?.includes('点击开门')"></i>
-                <i class="iconfont oa-mima" @click="parentMessage('密码')" v-if="state.openMode?.includes('密码')"></i>
+                <i class="iconfont oa-dianji" @click="parentMessage('点击开门')" v-if="state.openMode.includes('点击开门')"></i>
+                <i class="iconfont oa-mima" @click="parentMessage('密码')" v-if="state.openMode.includes('密码')"></i>
             </div>
         </div>
     </div>
@@ -158,13 +172,21 @@
                         dateTime: null,
                         doorName: null,
                         imgPath: null,
-                        openMode: null,
-                        remark: null,
+                        openMode: "",
+                        remark: "",
+                        workName: "",
+                        workClass: ""
                     },
                     timeOutEvent: 0,
                     inter: {
                         dateDom: null
                     },
+                    workStatusData: [
+                        { label: "办公", value: 1, class: 'workRed' },
+                        { label: "会客", value: 2, class: 'workRed' },
+                        { label: "外出", value: 3, class: 'workGreen' },
+                        { label: "勿扰", value: 4, class: 'workRed' },
+                    ],
                 };
             },
             computed: {},
@@ -176,6 +198,8 @@
                     that.state.imgPath = event.imgPath
                     that.state.openMode = event.openMode
                     that.state.remark = event.remark
+                    that.state.workName = that.workStatusData.filter(item => item.value == event.workStatus)[0].label;
+                    that.state.workClass = that.workStatusData.filter(item => item.value == event.workStatus)[0].class;
 
                     if (event.openMode.includes("人脸")) {
                         that.tracker == null ? that.initVido() : undefined
@@ -190,7 +214,8 @@
                     $("#configDialog1,#configDialog2").on({
                         touchstart: function (e) {
                             that.timeOutEvent = setTimeout(() => {
-                                that.longPress()
+                                that.parentMessage('打开门禁配置')
+                                that.timeOutEvent = 0
                             }, 1000);
                             e.preventDefault();
                         },
@@ -320,8 +345,6 @@
                     if ("funcName" in event) {
                         if (event.funcName == "初始化数据") {
                             this.initData(JSON.parse(event.data));
-                        } else if (event.funcName == "初始化事件") {
-                            this.initHandle()
                         } else if (event.funcName == "开启摄像头" && document.getElementById("video")) {
                             this.initVido();//调用初始化摄像头
                         } else if (event.funcName == "关闭摄像头") {
@@ -331,11 +354,6 @@
                         }
                     }
                 },
-                // 长按事件
-                longPress() {
-                    this.parentMessage('打开配置')
-                    this.timeOutEvent = 0
-                },
                 // 监听页面是否隐藏
                 handleVisibilityChange() {
                     if (document.visibilityState === 'visible') {
@@ -395,6 +413,8 @@
                         this.state.dateTime = this.getFormatterDate(new Date()).split(' ')[1]
                     }, 1000);
                 }
+
+                this.initHandle();//初始化事件dom
             },
             beforeDestroy() {
                 // 移除window方法

BIN
src/static/face/img/face_bg.png


+ 39 - 35
src/static/face/meeting.html

@@ -276,7 +276,38 @@
             computed: {},
             methods: {
                 // 初始化数据
-                initData() { },
+                initData(event) {
+                    this.state.dataAll = event.dataAll
+                    this.state.thisVenueData = event.thisVenueData
+                    this.state.thisVenueTime = event.thisVenueTime
+                    this.state.nextSceneData = event.nextSceneData
+                    this.state.nextSceneTime = event.nextSceneTime
+                    this.state.timeList = event.timeList
+                },
+                // 初始化事件
+                initHandle() {
+                    var that = this;
+                    $("#home-card-left-image").on({
+                        touchstart: function (e) {
+                            that.timeOutEvent = setTimeout(() => {
+                                that.parentMessage('打开会议配置')
+                                that.timeOutEvent = 0
+                            }, 1000);
+                            e.preventDefault();
+                        },
+                        touchmove: function () {
+                            clearTimeout(that.timeOutEvent);
+                            that.timeOutEvent = 0;
+                        },
+                        touchend: function () {
+                            clearTimeout(that.timeOutEvent);
+                            if (that.timeOutEvent != 0) {
+                                console.log("你这是点击,不是长按");
+                            }
+                            return false;
+                        }
+                    })
+                },
                 // 初始化摄像头
                 initVido() {
                     var that = this;
@@ -322,25 +353,7 @@
                         }
                     });
 
-                    $("#home-card-left-image").on({
-                        touchstart: function (e) {
-                            that.timeOutEvent = setTimeout(() => {
-                                that.longPress()
-                            }, 1000);
-                            e.preventDefault();
-                        },
-                        touchmove: function () {
-                            clearTimeout(that.timeOutEvent);
-                            that.timeOutEvent = 0;
-                        },
-                        touchend: function () {
-                            clearTimeout(that.timeOutEvent);
-                            if (that.timeOutEvent != 0) {
-                                console.log("你这是点击,不是长按");
-                            }
-                            return false;
-                        }
-                    })
+
                 },
                 // 向父页面推送数据
                 parentMessage(type, data) {
@@ -378,14 +391,8 @@
                     console.log(event.funcName)
                     if ("funcName" in event) {
                         if (event.funcName == "初始化数据") {
-                            this.state.dataAll = JSON.parse(event.data).dataAll
-                            this.state.thisVenueData = JSON.parse(event.data).thisVenueData
-                            this.state.thisVenueTime = JSON.parse(event.data).thisVenueTime
-                            this.state.nextSceneData = JSON.parse(event.data).nextSceneData
-                            this.state.nextSceneTime = JSON.parse(event.data).nextSceneTime
-                            this.state.timeList = JSON.parse(event.data).timeList
-                            this.initData();
-                        } else if (event.funcName == "开启摄像头") {
+                            this.initData(JSON.parse(event.data));
+                        } else if (event.funcName == "开启摄像头" && document.getElementById("video")) {
                             this.initVido();//调用初始化摄像头
                         } else if (event.funcName == "关闭摄像头") {
                             this.closeFace();
@@ -394,21 +401,16 @@
                         }
                     }
                 },
-                // 长按事件
-                longPress() {
-                    this.parentMessage('打开配置')
-                    this.timeOutEvent = 0
-                },
                 // 监听页面是否隐藏
                 handleVisibilityChange() {
                     if (document.visibilityState === 'visible') {
                         // 页面变为可见时的处理逻辑
                         console.log('页面变为可见');
-                        this.initVido();
+                        this.tracker == null && document.getElementById("video") ? this.initVido() : undefined
                     } else if (document.visibilityState === 'hidden') {
                         // 页面变为不可见时的处理逻辑
                         console.log('页面变为不可见');
-                        this.closeFace();
+                        this.tracker != null && document.getElementById("video") ? this.closeFace() : undefined
                     }
                 },
                 closeFace() {
@@ -433,6 +435,8 @@
                 });
             },
             mounted() {
+                this.initHandle();
+
                 document.addEventListener('visibilitychange', this.handleVisibilityChange);
             },
             beforeDestroy() {

+ 14 - 6
src/static/iconfont/iconfont.css

@@ -1,9 +1,8 @@
 @font-face {
-  font-family: "iconfont";
-  /* Project id 4510027 */
-  src: url('https://at.alicdn.com/t/c/font_4510027_ui8qcchtgh.woff2?t=1741325910411') format('woff2'),
-    url('https://at.alicdn.com/t/c/font_4510027_ui8qcchtgh.woff?t=1741325910411') format('woff'),
-    url('https://at.alicdn.com/t/c/font_4510027_ui8qcchtgh.ttf?t=1741325910411') format('truetype');
+  font-family: 'iconfont';  /* Project id 4510027 */
+  src: url('https://at.alicdn.com/t/c/font_4510027_fw2gi1ie3y4.woff2?t=1751427779485') format('woff2'),
+       url('https://at.alicdn.com/t/c/font_4510027_fw2gi1ie3y4.woff?t=1751427779485') format('woff'),
+       url('https://at.alicdn.com/t/c/font_4510027_fw2gi1ie3y4.ttf?t=1751427779485') format('truetype');
 }
 
 .iconfont {
@@ -14,6 +13,14 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.oaIcon-zhongqi1:before {
+  content: "\e8d7";
+}
+
+.oaIcon-mima:before {
+  content: "\e8b2";
+}
+
 .oaIcon-left:before {
   content: "\e62b";
 }
@@ -216,4 +223,5 @@
 
 .oaIcon-qingchu:before {
   content: "\e61f";
-}
+}
+

BIN
src/static/iconfont/iconfont.ttf


BIN
src/static/images/common/alarmMessage.png


BIN
src/static/images/common/alarmMessage1.png


BIN
src/static/images/common/appMessage.png


BIN
src/static/images/common/informMessage.png


BIN
src/static/images/common/inspectionMessage.png


BIN
src/static/images/common/meetingMessage.png


BIN
src/static/images/common/noticeMessage.png


BIN
src/static/images/common/reportMessage.png


BIN
src/static/images/common/ydkd.png


BIN
src/static/images/mine/arc.png


BIN
src/static/images/mine/arc1.png


BIN
src/static/images/mine/missing-face.png


BIN
src/static/images/mine/user-bg.png


BIN
src/static/images/mine/vip-card.png


+ 9 - 58
src/store/modules/common.js

@@ -34,67 +34,18 @@ const commonStore = defineStore("common", {
       " 23:59:59",
     ],
 
-    mhjz: [
-      { streetTown: "全区", id: 12, x: 121.4175597, y: 31.119248 },
-      { streetTown: "江川路街道", id: 1201, x: 121.399126538181, y: 31.0099719391863 },
-      { streetTown: "新虹街道", id: 1217, x: 121.319329296294, y: 31.1983901916889 },
-      { streetTown: "古美路街道", id: 1206, x: 121.388451866936, y: 31.1478233480159 },
-      { streetTown: "浦锦街道", id: 1218, x: 121.483929120352, y: 31.089967318558 },
-      { streetTown: "浦江镇", id: 1215, x: 121.524058543447, y: 31.0540039472667 },
-      { streetTown: "吴泾镇", id: 1213, x: 121.454076463728, y: 31.04860402113 },
-      { streetTown: "马桥镇", id: 1214, x: 121.352680027718, y: 31.0213512298508 },
-      { streetTown: "颛桥镇", id: 1209, x: 121.40607138504, y: 31.0612972443508 },
-      { streetTown: "莘庄镇", id: 1207, x: 121.37064864047, y: 31.1154549548722 },
-      { streetTown: "梅陇镇", id: 1212, x: 121.421346814491, y: 31.1069718313722 },
-      { streetTown: "七宝镇", id: 1208, x: 121.350366186317, y: 31.1553292680362 },
-      { streetTown: "虹桥镇", id: 1211, x: 121.37956256207, y: 31.1806219953212 },
-      { streetTown: "华漕镇", id: 1210, x: 121.277541517147, y: 31.2289121171624 },
-      { streetTown: "莘庄工业区", id: 1216, x: 121.376508452784, y: 31.0678185611843 },
-    ],
-
-    deviceDetailsArray: {}, //设备详情页面-数据存储
+    doorArray: {
+      systemSeeting: {
+        relayControl: false,//继电器开关状态
+        navBarNew: false,//导航栏显示隐藏
+        statusBar: false,//状态显示隐藏
+        statusBarDrop: false,//状态面板下拉
+      },//系统配置数据存储
+    },//门禁系统配置数据存储
 
-    facilitiesGatherType: "", //设施采集类型-数据存储
-    facilitiesGatherArray: {
-      department: "", //所属部门
-      facilityType: "", //设施类型
-      facilityTypeName: "", //设施类型名称
-      facilityName: "", //设施名称
-      status: "0", //设施状态
-      address: "", //设施地址
-      longitude: "", //经度
-      latitude: "", //纬度
-      province: "", //省
-      city: "", //市
-      area: "", //区(县)
-      facilityAddress: "", //详细地址
-      streetTown: null, //所属街镇
-      gpsAreas: [], //经纬度集合
-      contact: "", //联系人
-      contactPhone: "", //联系方式
-      imagesUrl: "", //图⽚地址URL
-      facilityDesc: "", //备注
-      extendData: [], //扩展属性
-      recordPictureList: [],
-      typeGuise: "", //点线面类型
-    }, //设施采集页面-数据存储
   }),
+  unistorage: true,
   actions: {
-    /**
-     * @计算当前坐标和G点坐标的偏差值
-     * @returns
-     */
-    caculateLL(lat1, lng1, lat2, lng2) {
-      var radLat1 = (lat1 * Math.PI) / 180.0;
-      var radLat2 = (lat2 * Math.PI) / 180.0;
-      var a = radLat1 - radLat2;
-      var b = (lng1 * Math.PI) / 180.0 - (lng2 * Math.PI) / 180.0;
-      var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
-      s = s * 6378.137;
-      s = Math.round(s * 10000) / 10;
-      console.log(s);
-      return s;
-    },
     /**
      * @公共添加服务器列表
      */

+ 70 - 24
src/store/modules/control.js

@@ -10,6 +10,8 @@ import nfc from "@/plugins/nfc.plugins.js";
 import modal from "@/plugins/modal.plugins.js";
 import keyListen from "@/plugins/keyListen.plugins.js";
 import permission from "@/plugins/permission.plugins.js";
+import time from "@/plugins/time.plugins.js";
+import sysPlugins from "@/plugins/device/sys.plugins";
 
 const controlStore = defineStore("control", {
     state: () => ({
@@ -20,7 +22,7 @@ const controlStore = defineStore("control", {
             linkUrl: "",
             port: "",
             domain: undefined,
-            doorList: {
+            door: {
                 id: undefined,
                 name: undefined,
             },
@@ -56,6 +58,7 @@ const controlStore = defineStore("control", {
 
         inter: {
             doorDom: null,
+            meeting: null,
         },
     }),
     actions: {
@@ -72,9 +75,9 @@ const controlStore = defineStore("control", {
                 that.form.port = storage.port ? storage.port : "";
                 that.form.meetingId = storage.meetingId || undefined;
                 that.form.meetingName = storage.meetingName || undefined;
-                that.form.doorList = {
-                    id: storage.doorList.id || undefined,
-                    name: storage.doorList.name || undefined,
+                that.form.door = {
+                    id: storage.door.id || undefined,
+                    name: storage.door.name || undefined,
                 }
             }
         },
@@ -102,12 +105,6 @@ const controlStore = defineStore("control", {
             });
             //#endif
         },
-        /**
-         * @初始化事件
-         */
-        initHandle() {
-            this.handleChildren({ funcName: "初始化事件", data: {} })
-        },
         /**
          * @服务器配置保存事件
          */
@@ -131,6 +128,36 @@ const controlStore = defineStore("control", {
             }
             uni.setStorageSync("storage_face", this.form);
         },
+        /**
+         * @开启定时任务
+         */
+        openInterval(type) {
+            if (type == "door") {
+                if (this.inter.doorDom) return;
+                this.getDoorList("updateData");
+                this.inter.doorDom = setInterval(() => {
+                    this.getDoorList("updateData");
+                }, 1000 * 3);
+            } else if (type == "meeting") {
+                if (this.inter.meeting) return;
+                getMeetingRoomReservationList();
+                this.inter.meeting = setInterval(() => {
+                    getMeetingRoomReservationList();
+                }, 1000 * 3);
+            }
+        },
+        /**
+         * @关闭定时任务
+         */
+        clearInterval(type) {
+            if (type == "door") {
+                clearInterval(this.inter.doorDom); //销毁之前定时器
+                this.inter.doorDom = null;
+            } else if (type == "meeting") {
+                clearInterval(this.inter.meeting); //销毁之前定时器
+                this.inter.meeting = null;
+            }
+        },
         /**
          * @弹窗确定按钮事件
          */
@@ -150,7 +177,7 @@ const controlStore = defineStore("control", {
                 return;
             }
 
-            if (!this.form.doorList.name && this.pageFunction.includes('门禁')) {
+            if (!this.form.door.name && this.pageFunction.includes('门禁')) {
                 modal.msg("请选择绑定门禁");
                 return;
             }
@@ -234,13 +261,12 @@ const controlStore = defineStore("control", {
                 this.form.meetingId = e.value[0].value;
                 this.form.meetingName = e.value[0].name;
             } else if (this.picker.title == "绑定门禁") {
-                this.form.doorList.id = e.value[0].value;
-                this.form.doorList.name = e.value[0].name;
+                this.form.door.id = e.value[0].value;
+                this.form.door.name = e.value[0].name;
             }
             this.picker.show = false;
             this.isDataChange = true
         },
-
         /**
          * @会议室下拉列表
          */
@@ -272,7 +298,7 @@ const controlStore = defineStore("control", {
                 return;
             }
 
-            if (type == 'updateData' && !this.form.doorList.name) {
+            if (type == 'updateData' && !this.form.door.id) {
                 return;
             }
 
@@ -281,7 +307,7 @@ const controlStore = defineStore("control", {
                     current: 1, //页数
                     size: 2000, //条数
                     domain: this.form.domain, //域名
-                    deviceName: type == 'updateData' && !this.form.doorList.name ? this.form.doorList.name : undefined
+                    deviceUuid: type == 'updateData' ? this.form.door.id : undefined
                 })
                 .then((requset) => {
                     if (requset.data.records.length <= 0) {
@@ -289,10 +315,19 @@ const controlStore = defineStore("control", {
                     }
 
                     if (type == "updateData") {
+                        let data = requset.data.records[0]
+                        if (!time.isInRange(8, 18)) {
+                            data.openMode = this.removeSegmentWithTarget(data.openMode, "点击开门")
+                        }
+
                         this.handleChildren({
                             funcName: "初始化数据",
-                            data: JSON.stringify(requset.data.records[0]),
+                            data: JSON.stringify(data),
                         });
+
+                        delete data.id
+                        Object.assign(this.form.door, data)
+                        uni.setStorageSync("storage_face", this.form);
                     } else {
                         requset.data.records.forEach((e) => {
                             this.doooList.push({
@@ -309,7 +344,7 @@ const controlStore = defineStore("control", {
         openDoor(event) {
             var that = this
 
-            if (!this.form.doorList.name) {
+            if (!this.form.door.name) {
                 modal.msg("请先绑定门禁!");
                 return;
             }
@@ -327,7 +362,7 @@ const controlStore = defineStore("control", {
                     userId: !getToken() ? event.userId : undefined,
                     userName: !getToken() ? event.userName : undefined,
                     productCode: "502_USKY",
-                    deviceUuid: !getToken() ? this.form.doorList.id : event.deviceUuid,
+                    deviceUuid: !getToken() ? this.form.door.id : event.deviceUuid,
                     commandCode: "door_onoff",
                     commandValue: 1,
                 })
@@ -339,7 +374,6 @@ const controlStore = defineStore("control", {
                     that.insertDoorRecord(event, "成功");
                 })
                 .catch((err) => {
-                    console.log(err);
                     setTimeout(() => {
                         this.isClicked = false;
                     }, 2000);
@@ -354,7 +388,7 @@ const controlStore = defineStore("control", {
                 .RecordInsert({
                     domain: !getToken() ? this.form.domain : undefined, //域名
                     userName: event.userName, //用户姓名
-                    deviceUuid: !getToken() ? this.form.doorList.id : event.deviceUuid,//设备Uuid
+                    deviceUuid: !getToken() ? this.form.door.id : event.deviceUuid,//设备Uuid
                     passType: 3, //通行方式(1、人脸 2、刷卡 3、手机)
                     passTime: dayjs().format("YYYY-MM-DDTHH:mm:ss"), //通行时间
                     passResult: msg, //通行结果
@@ -400,7 +434,6 @@ const controlStore = defineStore("control", {
                     that.handleChildren({ funcName: "人脸冷却", data: {} });
                 });
         },
-
         /**
          * @会议验证
          */
@@ -440,9 +473,11 @@ const controlStore = defineStore("control", {
          */
         analysisData(event) {
             if ("funcName" in event) {
-                if (event.funcName == "打开配置") {
+                if (event.funcName == "打开门禁配置") {
                     this.handleChildren({ funcName: "关闭摄像头", data: {} });
                     tab.navigateTo("/pages/door/setting/index")
+                } else if (event.funcName == "打开会议配置") {
+                    this.handleChildren({ funcName: "关闭摄像头", data: {} });
                     this.modal.show = true;
                 } else if (event.funcName == "人脸识别") {
                     this.faceVerify(event.data.imageBase);
@@ -472,8 +507,19 @@ const controlStore = defineStore("control", {
             var iframe = document.getElementById("faceView");
             iframe.contentWindow.postMessage(data, "*");
             // #endif
+        },
+        /**
+         * @移除包含目标字符串
+         */
+        removeSegmentWithTarget(originalStr, targetStr) {
+            if (originalStr.includes(targetStr)) {
+                // 假设要移除“包含目标的连续数字片段”(正则匹配数字片段)
+                // 这里的正则表示:匹配包含targetStr的连续数字(0-9)
+                const regex = new RegExp(`\\d*${targetStr}\\d*`, 'g');
+                return originalStr.replace(regex, '');
+            }
+            return originalStr;
         }
-
     },
 });
 

+ 8 - 6
src/utils/request.js

@@ -12,6 +12,12 @@ let timeout = 10000;
  * @param {控制台打印} reject 
  */
 function verification(res, resolve, reject) {
+  if (res.error) {
+    modal.msg("后端接口连接异常");
+    reject("后端接口连接异常");
+    return;
+  }
+
   const data = typeof res.data === "string" ? JSON.parse(res.data) : res.data;
   const code = data.code || 200;
 
@@ -60,7 +66,7 @@ function errorFonction(error, resolve, reject) {
     errMsg = "系统接口" + errMsg.substr(errMsg.length - 3) + "异常";
   }
   if (errMsg != "request:fail") {
-    modal.msg(errMsg);
+    // modal.msg(errMsg);
   }
   reject(error);
 }
@@ -100,11 +106,7 @@ const request = (config) => {
         dataType: "json",
       })
       .then((res) => {
-        if (res.error) {
-          modal.msg("后端接口连接异常");
-          reject("后端接口连接异常");
-          return;
-        }
+
         verification(res, resolve, reject);//调用校验结果方法
       })
       .catch((error) => {

+ 2 - 2
unpackage/config/setting.js

@@ -70,8 +70,8 @@ filesToModify.forEach((file) => {
                 state.name = '智能门禁'
                 state.appid = '__UNI__8D6E9FD'
                 state.description = '智能门禁APP,是一款集成了现代信息技术和智能化管理功能的移动应用程序。'
-                state.versionName = "1.0.2"
-                state.versionCode = 3
+                state.versionName = "1.0.7"
+                state.versionCode = 7
                 state.h5.title = '智能门禁'
 
                 maps.amap.name = "amapBOujshtbA"