bug,换行,隐藏公共报修房屋字段

This commit is contained in:
Zy
2026-08-29 08:43:36 +08:00
parent 8153325a68
commit 35ff3b034e
7 changed files with 168 additions and 136 deletions

View File

@@ -1,129 +1,129 @@
<template>
<view class="content-class">
<template v-if="isLoggedIn">
<!-- 顶部渐变背景层 -->
<view class="bg-gradient"></view>
<!-- 顶部渐变背景层 -->
<view class="bg-gradient"></view>
<!-- 页面内容区 -->
<view class="page-content">
<view class="sticky-header">
<!-- 状态栏占位 -->
<view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view>
<!-- 导航栏 -->
<view class="nav-bar">
<text class="nav-title">首页</text>
</view>
<!-- 小区选择 -->
<view class="header-container" @click="navigateToPage">
<view class="location-area">
<view class="location-icon">
<image
src="https://wuyeadmin.bugtc.com/images/imgs/adress.png"
style="height: 100%; width: 100%"
></image>
</view>
<view class="community-selector">
<text class="community-name">{{ currentCommunity }}</text>
<view class="community-icon">
<!-- 页面内容区 -->
<view class="page-content">
<view class="sticky-header">
<!-- 状态栏占位 -->
<view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view>
<!-- 导航栏 -->
<view class="nav-bar">
<text class="nav-title">首页</text>
</view>
<!-- 小区选择 -->
<view class="header-container" @click="navigateToPage">
<view class="location-area">
<view class="location-icon">
<image
src="https://wuyeadmin.bugtc.com/images/imgs/三角形.png"
src="https://wuyeadmin.bugtc.com/images/imgs/adress.png"
style="height: 100%; width: 100%"
></image>
</view>
<view class="community-selector">
<text class="community-name">{{ currentCommunity }}</text>
<view class="community-icon">
<image
src="https://wuyeadmin.bugtc.com/images/imgs/三角形.png"
style="height: 100%; width: 100%"
></image>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 可滚动内容区 -->
<view class="scroll-content">
<!-- banner -->
<view class="bannarClass" v-if="bannerList && bannerList.length > 0">
<up-swiper
:list="bannerList"
indicator
indicatorMode="dot"
radius="15"
height="180"
keyName="url"
circular
>
<template #default="{ item, index }">
<image :src="item.url || item" mode="aspectFill" class="banner-img"></image>
</template>
</up-swiper>
</view>
<!-- banner 占位 -->
<view class="bannarClass" v-else>
<view class="banner-placeholder">
<text>暂无轮播图</text>
</view>
</view>
<!-- 巡检 -->
<view class="inspectionClass">
<!-- 消息通知栏 -->
<view class="noticeClass">
<view class="notice-left">
<image
src="https://wuyeadmin.bugtc.com/images/imgs/notice.png"
class="notice-icon"
></image>
<view class="notice-line"></view>
</view>
<view class="notice-right" @click="getNoticeMore">
<uni-notice-bar
:text="noticeText"
type="line"
:showIcon="false"
show-get-more
scrollable
color="#fff"
background-color="transparent"
moreColor="#fff"
no-border
>
</uni-notice-bar>
</view>
</view>
<!-- 巡检数据统计区 -->
<view class="statistics-wrap">
<view class="statistics-item" @click="goToInspectionRecord">
<text class="num">{{ allCount }}</text>
<text class="label">全部巡检</text>
</view>
<view class="statistics-item" @click="goToDaysInspection">
<text class="num">{{ pendingCount }}</text>
<text class="label">待巡检</text>
</view>
<view class="statistics-item">
<text class="num">{{ InspectedCount }}</text>
<text class="label">已巡检</text>
</view>
</view>
</view>
<!-- 网格布局功能 -->
<view class="function-container">
<template v-for="item in functionList" :key="item.action">
<view
class="function-item"
@click="handleFunctionClick(item)"
v-if="permStore.hasPermi(item.permKey)"
<!-- 可滚动内容区 -->
<view class="scroll-content">
<!-- banner -->
<view class="bannarClass" v-if="bannerList && bannerList.length > 0">
<up-swiper
:list="bannerList"
indicator
indicatorMode="dot"
radius="15"
height="180"
keyName="url"
circular
>
<image class="item-icon" :src="item.icon" mode="aspectFit"></image>
<text class="item-text">{{ item.text }}</text>
<view
v-if="item.permKey === 'butler:workOrder:mine' && MyOrderNum > 0"
class="todoNum"
>{{ MyOrderNum > 99 ? '99' : MyOrderNum }}</view
>
<template #default="{ item, index }">
<image :src="item.url || item" mode="aspectFill" class="banner-img"></image>
</template>
</up-swiper>
</view>
<!-- banner 占位 -->
<view class="bannarClass" v-else>
<view class="banner-placeholder">
<text>暂无轮播图</text>
</view>
</template>
</view>
<!-- 巡检 -->
<view class="inspectionClass">
<!-- 消息通知栏 -->
<view class="noticeClass">
<view class="notice-left">
<image
src="https://wuyeadmin.bugtc.com/images/imgs/notice.png"
class="notice-icon"
></image>
<view class="notice-line"></view>
</view>
<view class="notice-right" @click="getNoticeMore">
<uni-notice-bar
:text="noticeText"
type="line"
:showIcon="false"
show-get-more
scrollable
color="#fff"
background-color="transparent"
moreColor="#fff"
no-border
>
</uni-notice-bar>
</view>
</view>
<!-- 巡检数据统计区 -->
<view class="statistics-wrap">
<view class="statistics-item" @click="goToInspectionRecord">
<text class="num">{{ allCount }}</text>
<text class="label">全部巡检</text>
</view>
<view class="statistics-item" @click="goToDaysInspection">
<text class="num">{{ pendingCount }}</text>
<text class="label">待巡检</text>
</view>
<view class="statistics-item">
<text class="num">{{ InspectedCount }}</text>
<text class="label">已巡检</text>
</view>
</view>
</view>
<!-- 网格布局功能 -->
<view class="function-container">
<template v-for="item in functionList" :key="item.action">
<view
class="function-item"
@click="handleFunctionClick(item)"
v-if="permStore.hasPermi(item.permKey)"
>
<image class="item-icon" :src="item.icon" mode="aspectFit"></image>
<text class="item-text">{{ item.text }}</text>
<view
v-if="item.permKey === 'butler:workOrder:mine' && MyOrderNum > 0"
class="todoNum"
>{{ MyOrderNum > 99 ? '99' : MyOrderNum }}</view
>
</view>
</template>
</view>
</view>
</view>
</view>
</template>
<view v-else class="launch-placeholder"></view>
</view>
@@ -288,7 +288,7 @@ const functionList = [
action: 'goToRevenueStatistics'
},
{
permKey: 'butler:feeOverview:view',
permKey: 'butler:feeOverview:stats',
icon: 'https://wuye.ckdzkj.com/images/imgs/fee-overview.png',
text: '收费总览',
action: 'goToFeeOverview'
@@ -351,8 +351,12 @@ const getInspectionData = () => {
}
// 获取消息通知
const getNoticeData = () => {
getNewNoticeData().then(res => {
const notice = res.code === 200 && res.data ? `${res.data.notice || ''} : ${res.data.item || ''}` : '暂无公告'
getNewNoticeData()
.then(res => {
const notice =
res.code === 200 && res.data
? `${res.data.notice || ''} : ${res.data.item || ''}`
: '暂无公告'
// 仅在内容真正变化时才更新
if (noticeText.value !== notice) {
noticeText.value = notice