Browse Source

feat(work/homesys): 房屋管家功能

wangpx 10 tháng trước cách đây
mục cha
commit
a9eb422d30

+ 2 - 1
config_hnyz.js

@@ -7,4 +7,5 @@ export default {
 	mapKey: 'CEBBZ-ASFKI-GZ2GU-UBGBO-MM6PZ-VTF3E',
 	timeout: 10000,
 	defaultAvatarPath:'/shares/document/miniApp/avatar/defaultAvatar.jpg',//默认服务器存储的头像路径
-	clock: 'multiple', //single:单班打卡,multiple:双班打卡
+	clock: 'multiple', //single:单班打卡,multiple:双班打卡
+}

+ 40 - 0
pages/work/homesys/index.vue

@@ -0,0 +1,40 @@
+<template>
+	<page-meta root-font-size="system" />
+	<view class="container">
+		<web-view :src="homeSrc"></web-view>
+	</view>
+</template>
+
+<script setup>
+import {
+	ref,
+	nextTick,
+	onMounted,
+	reactive
+} from 'vue';
+import { useUserStore } from '@/store/user.js'
+const userStore = useUserStore()
+const homeSrc = ref('')
+onMounted(() => {
+	switch (userStore.user.userName) {
+		case 'hez':
+			homeSrc.value = 'https://api.ygtxfj.com:8125/lovelace/dongshizhang?kiosk';
+			break;
+		case 'yzadmin':
+			homeSrc.value = 'https://api.ygtxfj.com:8125/lovelace/workshop?kiosk';
+			break;
+		default:
+			break;
+	}
+});
+</script>
+
+
+<style lang="scss" scoped>
+.container {
+	display: flex;
+	flex-direction: column;
+	height: 100vh;
+	position: relative;
+}
+</style>

+ 21 - 1
pages/work/index.vue

@@ -67,6 +67,13 @@
 						<text class="text">清除缓存</text>
 					</view>
 				</uni-grid-item>
+				<uni-grid-item :index="3" v-if="homesysShow">
+					<view class="grid-item-box">
+						<!-- <uni-icons type="home-filled" size="30" color="#66ccff" class="icon_size"></uni-icons> -->
+						<text class="ygoa_work_icon icon-zhinengjiaju"></text>
+						<text class="text">房屋管家</text>
+					</view>
+				</uni-grid-item>
 			</uni-grid>
 		</view>
 		<!-- 计算器弹出层 -->
@@ -102,8 +109,16 @@ if(config.companyCode && config.companyCode == 'yg'){
 }else{
 	diaryShow.value = false;
 }
-
+const homesysShow = ref(false)
 onMounted(() => {
+	switch (userStore.user.userName) {
+		case "hez":
+		case "yzadmin":
+			homesysShow.value = true
+			break;
+		default:
+			homesysShow.value = false
+	}
 	sysFontSize = uni.getAppBaseInfo().fontSizeSetting
 	if (sysFontSize > 20) uni_grid_column.value = 3
 	initProcessList()
@@ -173,6 +188,8 @@ function changeToolsGrid(e) {
 			clearCache()
 			// openClearCachePopup() // 打开清除缓存弹出层
 			break
+		case 3:
+			$tab.navigateTo('/pages/work/homesys/index')
 		default:
 	}
 }
@@ -196,6 +213,9 @@ function openCalculatorPopup() { // 打开计算器弹出层
 .ygoa_icon, .ygoa_work_icon {
 	font-size: calc(80rpx + 1.5*(1rem - 16px));
 }
+.icon_size {
+	font-size: calc(80rpx + 1.5*(1rem - 16px));
+}
 
 /* #ifndef APP-NVUE */
 page {

+ 7 - 3
static/font/ygoa/work/iconfont.css

@@ -2,9 +2,9 @@
   font-family: "ygoa_work_icon"; /* Project id 4734750 */
   /* Color fonts */
   src: 
-       url('iconfont.woff2?t=1744534593930') format('woff2'),
-       url('iconfont.woff?t=1744534593930') format('woff'),
-       url('iconfont.ttf?t=1744534593930') format('truetype');
+       url('iconfont.woff2?t=1748942285769') format('woff2'),
+       url('iconfont.woff?t=1748942285769') format('woff'),
+       url('iconfont.ttf?t=1748942285769') format('truetype');
 }
 
 .ygoa_work_icon {
@@ -15,6 +15,10 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-zhinengjiaju:before {
+  content: "\e613";
+}
+
 .icon-apply-purchase:before {
   content: "\e600";
 }

BIN
static/font/ygoa/work/iconfont.ttf


BIN
static/font/ygoa/work/iconfont.woff


BIN
static/font/ygoa/work/iconfont.woff2