调整app页面图标样式
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<view class="dateReport">
|
||||
<!-- {{ height }} -->
|
||||
<!-- <view class="pd20">
|
||||
|
||||
<view class="pd20">
|
||||
<uni-segmented-control
|
||||
:current="curSub"
|
||||
class="subsection"
|
||||
@@ -9,10 +10,10 @@
|
||||
:values="subsectionList"
|
||||
@clickItem="sectionChange"
|
||||
/>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="filterCriteria">
|
||||
<!-- 筛选条件 -->
|
||||
<Cn-filterCriteria @select="select" :singleChoice="true" :report="true"> </Cn-filterCriteria>
|
||||
<Cn-filterCriteria @select="select" :singleChoice="true" :showDatetime="curSub == 0"> </Cn-filterCriteria>
|
||||
</view>
|
||||
|
||||
<!-- 卡片 -->
|
||||
@@ -22,28 +23,50 @@
|
||||
:refresher-triggered="triggered"
|
||||
refresher-enabled="true"
|
||||
class="event-list mt20"
|
||||
v-if="eventList.length != 0"
|
||||
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }"
|
||||
>
|
||||
<!-- 循环渲染事件项 -->
|
||||
<uni-card class="event-item" :class="item.type" v-for="(item, index) in store.data" :key="index">
|
||||
<!-- 头部:图标 + 信息 + 操作 -->
|
||||
<view class="event-header">
|
||||
<view class="event-icon">
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<!-- <uni-icons
|
||||
custom-prefix="iconfont"
|
||||
type="icon-kouanjiancedian"
|
||||
size="40"
|
||||
color="#E6A23C"
|
||||
></uni-icons> -->
|
||||
<Cn-icon-transient :name="`报告`" />
|
||||
<view class="badge1" v-if="item.isRead == 0"> </view>
|
||||
</view>
|
||||
<view class="event-info">
|
||||
<view class="event-title">
|
||||
<text class="event-id">{{ item.lineName }}</text>
|
||||
<view class="event-tags"
|
||||
<!-- <view class="event-tags"
|
||||
>{{ selectValue.report == 0 ? item.startTime : item.startTime + '至' + item.endTime }}
|
||||
<view class="iconText ml10" @click="download(item)"
|
||||
><uni-icons type="arrow-down" color="#fff" size="16"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="event-desc">
|
||||
<text
|
||||
>统计时间:{{
|
||||
curSub == 0 ? item.startTime : item.startTime + ' 至 ' + item.endTime
|
||||
}}</text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<view class="event-action" v-if="curSub == 0 ? monthFlag : item.endTime != thisMonth01">
|
||||
<view class="iconText" @click="download(item)"
|
||||
><uni-icons type="arrow-down" color="#fff" size="16"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 详情区域 -->
|
||||
<view class="event-detail">
|
||||
<text>{{ item.overLimitDesc == '' ? '该监测点暂无指标越限' : item.overLimitDesc }}</text>
|
||||
<view class="event-detail textBox" @touchmove.stop>
|
||||
<text v-if="curSub == 0 ? monthFlag : item.endTime != thisMonth01">{{
|
||||
item.overLimitDesc == '' ? '该监测点暂无指标越限' : item.overLimitDesc
|
||||
}}</text>
|
||||
<text v-else>数据未生成,暂不支持下载</text>
|
||||
</view>
|
||||
<!-- <view class="downloadReport" @click="download">
|
||||
<uni-icons type="download" size="16" color="#376cf3"></uni-icons>下载报告
|
||||
@@ -83,21 +106,18 @@ export default {
|
||||
status: 'noMore',
|
||||
curSub: 0,
|
||||
subsectionList: ['周报', '月报'],
|
||||
eventList: [
|
||||
{
|
||||
id: '测试监测点',
|
||||
tag: '2026-01-23至2026-01-23',
|
||||
|
||||
status: '1',
|
||||
},
|
||||
],
|
||||
thisSelectValue: {},
|
||||
triggered: true,
|
||||
height: 0,
|
||||
thisMonth01: '',
|
||||
monthFlag: true,
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
this.thisMonth01 = this.$util.getToday().slice(0, -3) + '-01'
|
||||
this.monthFlag = this.$util.getToday() != this.$util.getToday().slice(0, -3) + '-01'
|
||||
|
||||
// this.setHeight()
|
||||
},
|
||||
methods: {
|
||||
@@ -107,28 +127,33 @@ export default {
|
||||
.boundingClientRect((rect) => {
|
||||
//
|
||||
// #ifdef H5
|
||||
this.height = rect?.height + 80 || 0
|
||||
this.height = rect?.height + 140 || 0
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
this.height = rect?.height + 30 || 0
|
||||
this.height = rect?.height + 70 || 0
|
||||
// #endif
|
||||
})
|
||||
.exec()
|
||||
},
|
||||
sectionChange(index) {
|
||||
this.curSub = index.currentIndex
|
||||
this.init()
|
||||
},
|
||||
init() {
|
||||
if (this.selectValue.lineId == '') return
|
||||
|
||||
this.store = this.DataSource('/cs-report-boot/csAppReport/reportList')
|
||||
this.store.params.pageSize = 10000
|
||||
this.store.params.timeType = this.selectValue.report
|
||||
// this.store.params.pageSize = 10000
|
||||
this.store.params.timeType = this.curSub //this.selectValue.report
|
||||
this.store.params.engineerId = this.selectValue.engineeringId
|
||||
this.store.params.projectId = this.selectValue.projectId
|
||||
this.store.params.devId = this.selectValue.deviceId
|
||||
this.store.params.lineId = this.selectValue.lineId
|
||||
this.store.params.time = this.selectValue.date
|
||||
if (this.curSub == 0) {
|
||||
this.store.params.time = this.selectValue.date
|
||||
} else {
|
||||
this.store.params.time = this.selectValue.range + '-01'
|
||||
}
|
||||
// this.store.params.startTime = this.selectValue.range[0]
|
||||
// this.store.params.endTime = this.selectValue.range[1]
|
||||
this.store.loadedCallback = () => {}
|
||||
@@ -137,11 +162,10 @@ export default {
|
||||
|
||||
select(value) {
|
||||
this.selectValue = value
|
||||
setTimeout(() => {
|
||||
setTimeout(() => {
|
||||
this.setHeight()
|
||||
}, 200)
|
||||
this.init()
|
||||
|
||||
},
|
||||
// 下载
|
||||
download(item) {
|
||||
@@ -289,6 +313,34 @@ export default {
|
||||
border-radius: 50%;
|
||||
background-color: $uni-theme-color;
|
||||
text-align: center;
|
||||
line-height: 45rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
.segmented-control {
|
||||
flex: 1;
|
||||
margin-right: 24rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
/* 列表容器 */
|
||||
.event-list {
|
||||
/* 头部:图标 + 信息 + 操作 */
|
||||
.event-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
/* 图标区域(按类型区分背景色) */
|
||||
.event-icon {
|
||||
background-color: #376cf320;
|
||||
}
|
||||
|
||||
.event-tags {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
.textBox {
|
||||
// @touchmove.stop
|
||||
max-height: 110rpx;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user