提交代码

This commit is contained in:
guanj
2026-06-01 11:32:25 +08:00
parent 276ef60389
commit 43c6249530
15 changed files with 384 additions and 157 deletions

View File

@@ -139,8 +139,8 @@
"/api" : {
"https" : true,
// "target" : "https://pqmcn.com:8092/api",
// "target" : "http://192.168.1.103:10215",
"target" : "http://192.168.1.103:10215",
// "target" : "http://192.168.1.103:10215",
"target" : "http://192.168.1.103:10215",
"changOrigin" : true,
"pathRewrite" : {
"/api" : ""

View File

@@ -108,6 +108,9 @@
></uni-load-more>
<Cn-empty v-else></Cn-empty>
</view>
<view class="back-top boxClick" v-show="showBackTop" @click="backToTop">
<uni-icons type="arrow-up" size="22" color="#fff"></uni-icons>
</view>
</view>
</template>
</Cn-page>
@@ -156,6 +159,7 @@ export default {
},
],
pageOptions: {},
showBackTop: false,
options1: [
{
text: '置顶',
@@ -457,7 +461,17 @@ export default {
} else {
this[type] = true
}
}
},
backToTop() {
uni.pageScrollTo({
scrollTop: 0,
duration: 300,
})
this.showBackTop = false
},
},
onPageScroll(e) {
this.showBackTop = e.scrollTop > 200
},
}
</script>
@@ -465,4 +479,19 @@ export default {
/deep/ .button-group--right {
padding: 0 0 20rpx;
}
.back-top {
position: fixed;
right: 30rpx;
bottom: 60rpx;
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background: #376cf3;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4rpx 16rpx rgba(55, 108, 243, 0.35);
z-index: 99;
}
</style>

View File

@@ -95,7 +95,7 @@
{{
item.landPoint != null && item.landPoint !== ''
? ',落点区域:' + item.landPoint
: ''
: ',落点区域:未知'
}}
</text>
</view>

View File

@@ -4,14 +4,8 @@
<!-- <view class="nav-menu" :class="{ 'nav-menu-active': select.engineeringName }" @click="openDrawer"
>{{ select.engineeringName || '工程' }}
</view> -->
<picker
@change="projectNameChange"
@cancel="selectProject = false"
:value="select.projectNameIndex"
:range="projectList"
range-key="text"
v-if="store.params.engineerId"
>
<picker @change="projectNameChange" @cancel="selectProject = false" :value="select.projectNameIndex"
:range="projectList" range-key="text" v-if="store.params.engineerId">
<view class="nav-menu" :class="{ 'nav-menu-active': select.projectName }" @click="selectProject = true">
{{
select.projectName
@@ -20,18 +14,10 @@
: select.projectName
: '全部项目'
}}
<uni-icons
type="top"
size="14"
:color="select.projectName ? '#376cf3' : '#666'"
v-if="selectProject"
></uni-icons>
<uni-icons
type="bottom"
size="14"
:color="select.projectName ? '#376cf3' : '#666'"
v-else
></uni-icons>
<uni-icons type="top" size="14" :color="select.projectName ? '#376cf3' : '#666'"
v-if="selectProject"></uni-icons>
<uni-icons type="bottom" size="14" :color="select.projectName ? '#376cf3' : '#666'"
v-else></uni-icons>
</view>
</picker>
<view style="flex: 1"></view>
@@ -40,17 +26,11 @@
<view class="nav-menu nav-menu-btn" @click="submit">确定</view>
</template>
<template v-else-if="deviceListFilter.length">
<view
class="nav-menu nav-menu-btn"
@click="selectDevice('transfer')"
v-if="userInfo.authorities === 'app_vip_user' || userInfo.authorities === 'engineering_user'"
>移交
<view class="nav-menu nav-menu-btn" @click="selectDevice('transfer')"
v-if="userInfo.authorities === 'app_vip_user' || userInfo.authorities === 'engineering_user'">移交
</view>
<view
class="nav-menu nav-menu-btn"
@click="selectDevice('share')"
v-if="userInfo.authorities === 'app_vip_user'"
>分享
<view class="nav-menu nav-menu-btn" @click="selectDevice('share')"
v-if="userInfo.authorities === 'app_vip_user'">分享
</view>
</template>
<!-- <picker @change="projectTypeChange" :value="select.projectTypeIndex" :range="projectType" range-key="text">
@@ -59,23 +39,16 @@
</view>
</picker> -->
</view>
<view class="content device" :style="{ minHeight: minHeight }">
<view class="content device" >
<uni-swipe-action>
<uni-swipe-action-item
v-for="(item, index) in deviceListFilter"
:threshold="0"
:right-options="item.isTop == 0 ? options1 : options12"
@click="bindClick($event, item)"
>
<uni-swipe-action-item v-for="(item, index) in deviceListFilter" :threshold="0"
:right-options="item.isTop == 0 ? options1 : options12" @click="bindClick($event, item)">
<Cn-device-card :device="item" :key="index">
<template v-slot:title>
<!-- 卡片标题 -->
<switch
v-if="transfer || share"
:checked="checkList.indexOf(item.equipmentId) > -1"
<switch v-if="transfer || share" :checked="checkList.indexOf(item.equipmentId) > -1"
style="transform: scale(0.8); position: relative; left: 20rpx"
@change="switchChange(item)"
/>
@change="switchChange(item)" />
<view class="star-icon" v-else>
<uni-icons type="search" size="25" color="#376cf3"></uni-icons>
</view>
@@ -83,10 +56,8 @@
</Cn-device-card>
</uni-swipe-action-item>
</uni-swipe-action>
<uni-load-more
v-if="store.status == 'loading' || deviceListFilter.length > 0"
:status="store.status"
></uni-load-more>
<uni-load-more v-if="store.status == 'loading' || deviceListFilter.length > 0"
:status="store.status"></uni-load-more>
<Cn-empty v-else></Cn-empty>
</view>
</view>
@@ -140,9 +111,10 @@ export default {
],
}
},
computed: {
deviceListFilter() {
let arr = this.store.data.filter((item) => {
if (this.select.projectName && this.select.projectType) {
return item.project === this.select.projectName && item.type === this.select.projectType
@@ -370,10 +342,7 @@ export default {
}
</script>
<style lang="scss">
.index-device {
.nav-menu {
}
}
.index-device {}
/deep/ .button-group--right {
padding: 0 0 20rpx;

View File

@@ -1,7 +1,8 @@
<template>
<view class="index-device">
<view class="nav" :style="{ top: navTabHeight + 'px' }"> </view>
<view class="content device project-list" :style="{ minHeight: minHeight }">
<!-- :style="{ minHeight: minHeight }" -->
<view class="content device project-list" >
<uni-swipe-action>
<uni-swipe-action-item
v-for="(item, index) in store.data"

View File

@@ -519,17 +519,17 @@ export default {
}
.meta-item {
font-size: 26rpx;
font-size: 24rpx;
color: #666666;
line-height: 1.3;
line-height: 1.2;
}
.meta-time {
display: block;
margin-top: 8rpx;
font-size: 26rpx;
font-size: 24rpx;
color: #666666;
line-height: 1.3;
line-height: 1.2;
}
.params-section {

View File

@@ -3,13 +3,8 @@
<!-- {{ height }} -->
<view class="pd20">
<uni-segmented-control
:current="curSub"
class="subsection"
active-color="#376cf3"
:values="subsectionList"
@clickItem="sectionChange"
/>
<uni-segmented-control :current="curSub" class="subsection" active-color="#376cf3" :values="subsectionList"
@clickItem="sectionChange" />
</view>
<view class="filterCriteria">
<!-- 筛选条件 -->
@@ -17,14 +12,10 @@
</view>
<!-- 卡片 -->
<scroll-view
scroll-y="true"
@refresherrefresh="refresherrefresh"
:refresher-triggered="triggered"
refresher-enabled="true"
<scroll-view scroll-y="true" @scroll="onScroll" :scroll-top="scrollTop" scroll-with-animation
@refresherrefresh="refresherrefresh" :refresher-triggered="triggered" refresher-enabled="true"
class="event-list mt20"
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }"
>
: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">
<!-- 头部图标 + 信息 + 操作 -->
@@ -37,7 +28,7 @@
size="40"
color="#E6A23C"
></uni-icons> -->
<Cn-icon-transient :name="`报告`" />
<Cn-icon-transient :name="`报告`" />
<view class="badge1" v-if="item.isRead == 0"> </view>
</view>
<view class="event-info">
@@ -48,36 +39,35 @@
</view> -->
</view>
<view class="event-desc">
<text
>统计时间{{
curSub == 0 ? item.startTime : item.startTime + ' 至 ' + item.endTime
}}</text
>
<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 boxClick" @click="download(item)"
><uni-icons type="arrow-down" color="#fff" size="16"></uni-icons>
<view class="event-action" v-if="!showNotGenerated(item)">
<view class="iconText boxClick" @click="download(item)"><uni-icons type="arrow-down"
color="#fff" size="16"></uni-icons>
</view>
</view>
</view>
<!-- 详情区域 -->
<view class="event-detail textBox" @touchmove.stop>
<text v-if="curSub == 0 ? monthFlag : item.endTime != thisMonth01">{{
<text v-if="!showNotGenerated(item)">{{
item.overLimitDesc == '' ? '该监测点暂无指标越限' : item.overLimitDesc
}}</text>
}}</text>
<text v-else>数据未生成暂不支持下载</text>
</view>
<!-- <view class="downloadReport" @click="download">
<uni-icons type="download" size="16" color="#376cf3"></uni-icons>下载报告
</view> -->
</uni-card>
<uni-load-more
v-if="store.status == 'loading' || (store.data && store.data.length > 0)"
:status="store.status"
></uni-load-more>
<uni-load-more v-if="store.status == 'loading' || (store.data && store.data.length > 0)"
:status="store.status"></uni-load-more>
<Cn-empty v-else style="top: 20%"></Cn-empty>
</scroll-view>
<!-- <view class="back-top boxClick" v-show="showBackTop" @click="backToTop">
<uni-icons type="arrow-up" size="22" color="#fff"></uni-icons>
</view> -->
</view>
</template>
<script>
@@ -105,18 +95,19 @@ export default {
return {
status: 'noMore',
curSub: 0,
subsectionList: ['报', '月报'],
subsectionList: ['报', '月报'],
thisSelectValue: {},
triggered: true,
height: 0,
thisMonth01: '',
monthFlag: true,
scrollTop: 0,
oldScrollTop: 0,
showBackTop: false,
}
},
created() {},
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()
},
@@ -137,6 +128,8 @@ export default {
},
sectionChange(index) {
this.curSub = index.currentIndex
this.showBackTop = false
this.scrollTop = 0
this.init()
},
init() {
@@ -156,7 +149,9 @@ export default {
}
// this.store.params.startTime = this.selectValue.range[0]
// this.store.params.endTime = this.selectValue.range[1]
this.store.loadedCallback = () => {}
this.store.loadedCallback = () => {
this.store.status = 'noMore'
}
this.store.reload()
},
@@ -233,7 +228,7 @@ export default {
})
}
},
fail: function (res) {},
fail: function (res) { },
})
})
.catch((err) => {
@@ -253,6 +248,24 @@ export default {
this.triggered = false
}, 500)
},
onScroll(e) {
this.oldScrollTop = e.detail.scrollTop
this.showBackTop = e.detail.scrollTop > 200
},
backToTop() {
this.scrollTop = this.oldScrollTop
this.$nextTick(() => {
this.scrollTop = 0
})
this.showBackTop = false
},
/** 日报统计时间与今天相同月报开始、结束时间均为当月1号 */
showNotGenerated(item) {
if (this.curSub === 0) {
return item.startTime === this.$util.getToday()
}
return item.startTime === this.thisMonth01 && item.endTime === this.thisMonth01
},
},
computed: {},
@@ -262,12 +275,14 @@ export default {
</script>
<style lang="scss" scoped>
@import '@/pages/message1/index.scss';
.event-title {
justify-content: space-between;
}
.event-tags {
display: flex;
font-size: 27rpx !important ;
font-size: 27rpx !important;
line-height: 50rpx;
}
@@ -276,6 +291,7 @@ export default {
// display: grid;
// grid-template-columns: 1fr 1fr;
}
.downloadReport {
width: 100%;
background: #376cf320;
@@ -288,25 +304,31 @@ export default {
display: flex;
justify-content: center;
}
.filterCriteria {
.nav {
background-color: #fff;
}
.choose1 {
background-color: #fff;
padding: 0 20rpx;
display: flex;
justify-content: space-between;
/deep/ .uni-checkbox-input {
width: 30rpx;
height: 30rpx;
}
font-size: 26rpx;
}
}
/deep/ .uni-scroll-view-refresher {
display: none;
}
.iconText {
width: 45rpx;
height: 45rpx;
@@ -315,13 +337,16 @@ export default {
text-align: center;
line-height: 40rpx;
}
.segmented-control {
flex: 1;
margin-right: 24rpx;
height: 60rpx;
}
/* 列表容器 */
.event-list {
/* 头部:图标 + 信息 + 操作 */
.event-header {
display: flex;
@@ -340,9 +365,25 @@ export default {
font-size: 24rpx;
}
}
.textBox {
// @touchmove.stop
max-height: 110rpx;
overflow-y: auto;
}
.back-top {
position: fixed;
right: 30rpx;
bottom: 60rpx;
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background: #376cf3;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4rpx 16rpx rgba(55, 108, 243, 0.35);
z-index: 99;
}
</style>

View File

@@ -147,17 +147,17 @@ export default {
}
.meta-item {
font-size: 26rpx;
font-size: 24rpx;
color: #666666;
line-height: 1.3;
line-height: 1.2;
}
.meta-time {
display: block;
margin-top: 8rpx;
font-size: 26rpx;
font-size: 24rpx;
color: #666666;
line-height: 1.3;
line-height: 1.2;
}
.legend-row {

View File

@@ -12,12 +12,13 @@
</view>
<!-- 申请记录 -->
<view v-if="curSub == 1">
<view v-if="curSub == 1" style="position: relative">
<view class="filterCriteria">
<!-- 筛选条件 -->
<Cn-filterCriteria @select="select" :showQianTree="false"> </Cn-filterCriteria>
</view>
<scroll-view scroll-y="true" @refresherrefresh="refresherrefresh" @scrolltolower="scrolltolower"
<scroll-view scroll-y="true" @scroll="onScroll" :scroll-top="scrollTop" scroll-with-animation
@refresherrefresh="refresherrefresh" @scrolltolower="scrolltolower"
:refresher-triggered="triggered" refresher-enabled="true" class="record event-list mt20"
: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">
@@ -90,6 +91,9 @@
:status="store.status"></uni-load-more>
<Cn-empty v-else style="top: 30%"></Cn-empty>
</scroll-view>
<view class="back-top boxClick" v-show="showBackTop" @click="backToTop">
<uni-icons type="arrow-up" size="22" color="#fff"></uni-icons>
</view>
</view>
</view>
</template>
@@ -132,6 +136,9 @@ export default {
userInfo: {},
height: 0,
selectValue: {},
scrollTop: 0,
oldScrollTop: 0,
showBackTop: false,
}
},
created() { },
@@ -170,6 +177,8 @@ export default {
sectionChange(index) {
this.curSub = index.currentIndex
this.showBackTop = false
this.scrollTop = 0
},
// 生成报告
generate(item) {
@@ -284,6 +293,17 @@ export default {
this.store.next && this.store.next()
}
},
onScroll(e) {
this.oldScrollTop = e.detail.scrollTop
this.showBackTop = e.detail.scrollTop > 200
},
backToTop() {
this.scrollTop = this.oldScrollTop
this.$nextTick(() => {
this.scrollTop = 0
})
this.showBackTop = false
},
},
watch: {},
}
@@ -383,4 +403,19 @@ export default {
/deep/ .uni-scroll-view-refresher {
display: none;
}
.back-top {
position: fixed;
right: 30rpx;
bottom: 60rpx;
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background: #376cf3;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4rpx 16rpx rgba(55, 108, 243, 0.35);
z-index: 99;
}
</style>

View File

@@ -42,6 +42,9 @@
<Device ref="device" :store="store" />
</template>
</view>
<view class="back-top boxClick" v-show="showBackTop" @click="backToTop">
<uni-icons type="arrow-up" size="22" color="#fff"></uni-icons>
</view>
</view>
</Cn-page>
</template>
@@ -80,6 +83,7 @@ export default {
engineeringList: [],
navTabHeight: 0,
timer: null,
showBackTop: false,
}
},
computed: {
@@ -93,6 +97,7 @@ export default {
}
},
},
methods: {
selectEngineering() {
if (this.userInfo.authorities === 'engineering_user') {
@@ -221,7 +226,17 @@ export default {
uni.navigateTo({
url: `/pages/index/comp/monitoringPoint`,
})
}
},
backToTop() {
uni.pageScrollTo({
scrollTop: 0,
duration: 300,
})
this.showBackTop = false
},
},
onPageScroll(e) {
this.showBackTop = e.scrollTop > 200
},
onLoad() {
// 页面加载时,动态配置导航栏按钮
@@ -302,7 +317,7 @@ export default {
.canneng-index-title {
padding: 0 20rpx;
font-weight: 500;
/* font-weight: 500; */
display: flex;
}
@@ -337,4 +352,19 @@ export default {
margin-left: auto;
}
.back-top {
position: fixed;
right: 30rpx;
bottom: 60rpx;
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background: #376cf3;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4rpx 16rpx rgba(55, 108, 243, 0.35);
z-index: 99;
}
</style>

View File

@@ -3,7 +3,8 @@
<!-- 运行告警 -->
<!-- 卡片 -->
<scroll-view scroll-y="true" @refresherrefresh="refresherrefresh" @scrolltolower="scrolltolower"
<scroll-view scroll-y="true" @scroll="onScroll" :scroll-top="scrollTop" scroll-with-animation
@refresherrefresh="refresherrefresh" @scrolltolower="scrolltolower"
:refresher-triggered="triggered" refresher-enabled="true" class="event-list"
:style="{ height: 'calc(100vh - ' + (navHeight + 10) + 'px)', overflow: 'auto' }">
<!-- 循环渲染事件项 -->
@@ -46,6 +47,9 @@
:status="store.status"></uni-load-more>
<Cn-empty v-else style="top: 20%"></Cn-empty>
</scroll-view>
<view class="back-top boxClick" v-show="showBackTop" @click="backToTop">
<uni-icons type="arrow-up" size="22" color="#fff"></uni-icons>
</view>
</view>
</template>
<script>
@@ -68,6 +72,9 @@ export default {
return {
triggered: true,
status: 'noMore', //more加载前 loading加载中 noMore加载后
scrollTop: 0,
oldScrollTop: 0,
showBackTop: false,
}
},
mounted() {
@@ -108,6 +115,17 @@ export default {
this.store.next && this.store.next()
}
},
onScroll(e) {
this.oldScrollTop = e.detail.scrollTop
this.showBackTop = e.detail.scrollTop > 200
},
backToTop() {
this.scrollTop = this.oldScrollTop
this.$nextTick(() => {
this.scrollTop = 0
})
this.showBackTop = false
},
},
computed: {},
@@ -159,4 +177,19 @@ export default {
.event-header {
margin-bottom: 0rpx !important;
}
.back-top {
position: fixed;
right: 30rpx;
bottom: 60rpx;
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background: #376cf3;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4rpx 16rpx rgba(55, 108, 243, 0.35);
z-index: 99;
}
</style>

View File

@@ -14,7 +14,7 @@
<view class="mb5" v-if="detail.evtParamTm"> 持续时间{{ detail.evtParamTm }}s</view>
<view class="mb5" v-if="detail.evtParamVVaDepth"> 幅值{{ detail.evtParamVVaDepth }}%</view>
<view class="mb5" v-if="detail.evtParamPhase"> 相别{{ detail.evtParamPhase }}</view>
<view class="mb5" v-if="detail.landPoint"> 落点区域{{ detail.landPoint }}</view>
<view class="mb5" > 落点区域{{ detail.landPoint != null && detail.landPoint !== '' ? detail.landPoint : '未知' }}</view>
</view>
<view class="detail-tabs">
<uni-segmented-control :current="detailTab" active-color="#376cf3" :values="['波形图', 'ITIC', 'F47']"
@@ -23,25 +23,25 @@
<view v-if="detailTab == 0">
<view class="detail-content">
<view class="detail-content-title mb20">瞬时波形图</view>
<!-- <image style="width: 100%" :src="detail.instantPics" mode="widthFix" v-if="detail.instantPics"
<image style="width: 100%" :src="detail.instantPics" mode="widthFix" v-if="detail.instantPics"
@click="previewImage(detail.instantPics)" />
<text v-else>暂无</text> -->
<view v-if="listWaveData.length > 0">
<text v-else>暂无</text>
<!-- <view v-if="listWaveData.length > 0">
<waveform v-for="(value, ind) in listWaveData" :index="ind" :unit="unit" :data="value"
style="height: 150px;" />
</view>
<text v-else>暂无</text>
<text v-else>暂无</text> -->
</view>
<view class="detail-content">
<view class="detail-content-title mb20">RMS波形图</view>
<!-- <image style="width: 100%" :src="detail.rmsPics" mode="widthFix" v-if="detail.rmsPics"
<image style="width: 100%" :src="detail.rmsPics" mode="widthFix" v-if="detail.rmsPics"
@click="previewImage(detail.rmsPics)" />
<text v-else>暂无</text> -->
<view v-if="listRmsData.length > 0">
<text v-else>暂无</text>
<!-- <view v-if="listRmsData.length > 0">
<waveform v-for="(value, ind) in listRmsData" :index="ind" :unit="unit" :data="value"
style="height: 150px;" />
</view>
<text v-else>暂无</text>
<text v-else>暂无</text> -->
</view>
</view>
<view v-if="detailTab == 1" class="chart-wrapper">

View File

@@ -3,7 +3,8 @@
<!-- 运行事件 -->
<!-- 卡片 -->
<scroll-view scroll-y="true" @refresherrefresh="refresherrefresh" @scrolltolower="scrolltolower"
<scroll-view scroll-y="true" @scroll="onScroll" :scroll-top="scrollTop" scroll-with-animation
@refresherrefresh="refresherrefresh" @scrolltolower="scrolltolower"
:refresher-triggered="triggered" refresher-enabled="true" class="event-list"
:style="{ height: 'calc(100vh - ' + (navHeight + 10) + 'px)', overflow: 'auto' }">
<!-- 循环渲染事件项 -->
@@ -40,6 +41,9 @@
:status="store.status"></uni-load-more>
<Cn-empty v-else style="top: 20%"></Cn-empty>
</scroll-view>
<view class="back-top boxClick" v-show="showBackTop" @click="backToTop">
<uni-icons type="arrow-up" size="22" color="#fff"></uni-icons>
</view>
</view>
</template>
<script>
@@ -61,6 +65,9 @@ export default {
data() {
return {
triggered: true,
scrollTop: 0,
oldScrollTop: 0,
showBackTop: false,
}
},
mounted() { },
@@ -106,6 +113,17 @@ export default {
this.store.next && this.store.next()
}
},
onScroll(e) {
this.oldScrollTop = e.detail.scrollTop
this.showBackTop = e.detail.scrollTop > 200
},
backToTop() {
this.scrollTop = this.oldScrollTop
this.$nextTick(() => {
this.scrollTop = 0
})
this.showBackTop = false
},
},
computed: {},
@@ -156,4 +174,19 @@ export default {
display: none;
}
.back-top {
position: fixed;
right: 30rpx;
bottom: 60rpx;
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background: #376cf3;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4rpx 16rpx rgba(55, 108, 243, 0.35);
z-index: 99;
}
</style>

View File

@@ -21,6 +21,9 @@
<scroll-view
v-if="filterValue == '越限数量'"
scroll-y="true"
@scroll="onScroll"
:scroll-top="scrollTop"
scroll-with-animation
@refresherrefresh="refresherrefresh"
@scrolltolower="scrolltolower"
:refresher-triggered="triggered"
@@ -91,6 +94,9 @@
<scroll-view
v-if="filterValue == '越限测点数'"
scroll-y="true"
@scroll="onScroll"
:scroll-top="scrollTop"
scroll-with-animation
@refresherrefresh="refresherrefresh"
@scrolltolower="scrolltolower"
:refresher-triggered="triggered"
@@ -143,6 +149,9 @@
></uni-load-more>
<Cn-empty v-else style="top: 20%"></Cn-empty>
</scroll-view>
<view class="back-top boxClick" v-show="showBackTop" @click="backToTop">
<uni-icons type="arrow-up" size="22" color="#fff"></uni-icons>
</view>
</view>
</template>
<script>
@@ -181,6 +190,9 @@ export default {
triggered: true,
status: 'noMore', //more加载前 loading加载中 noMore加载后
scrollTop: 0,
oldScrollTop: 0,
showBackTop: false,
}
},
mounted() {
@@ -206,6 +218,8 @@ export default {
// "time": ""
// 查詢
init() {
this.showBackTop = false
this.scrollTop = 0
if (this.filterValue == '越限测点数') {
this.store = this.DataSource('/cs-harmonic-boot/csHarmonic/queryAppHarmonicLine')
} else {
@@ -253,6 +267,17 @@ export default {
this.store.next && this.store.next()
}
},
onScroll(e) {
this.oldScrollTop = e.detail.scrollTop
this.showBackTop = e.detail.scrollTop > 200
},
backToTop() {
this.scrollTop = this.oldScrollTop
this.$nextTick(() => {
this.scrollTop = 0
})
this.showBackTop = false
},
},
computed: {},
@@ -300,6 +325,21 @@ export default {
display: none;
}
.back-top {
position: fixed;
right: 30rpx;
bottom: 60rpx;
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background: #376cf3;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4rpx 16rpx rgba(55, 108, 243, 0.35);
z-index: 99;
}
.textBox {
max-height: 110rpx;
overflow-y: auto;

View File

@@ -3,15 +3,11 @@
<!-- 暂态 -->
<view class="transientBox">
<view class="statistics pd20">
<view
class="box boxClick"
:class="{ boxClick1: filterValue == index }"
v-for="(item, index) in dataList"
@click="
<view class="box boxClick" :class="{ boxClick1: filterValue == index }"
v-for="(item, index) in dataList" @click="
filterValue = index
init()
"
>
init()
">
<!-- <text class="num">{{ item.value }}</text> -->
<text class="num">{{ item.value }}</text>
<text class="label">{{ item.label }}</text>
@@ -20,23 +16,13 @@
<!-- <view class="smallLabel"> </view> -->
</view>
<!-- 卡片 -->
<scroll-view
scroll-y="true"
@refresherrefresh="refresherrefresh"
@scrolltolower="scrolltolower"
:refresher-triggered="triggered"
refresher-enabled="true"
class="event-list"
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }"
>
<scroll-view scroll-y="true" @scroll="onScroll" :scroll-top="scrollTop" scroll-with-animation
@refresherrefresh="refresherrefresh" @scrolltolower="scrolltolower"
:refresher-triggered="triggered" refresher-enabled="true" class="event-list"
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }">
<!-- 循环渲染事件项 -->
<uni-card
class="event-item boxClick"
:class="judgment(item.showName).type"
v-for="(item, index) in store.data || []"
:key="index"
@click="jump(item)"
>
<uni-card class="event-item boxClick" :class="judgment(item.showName).type"
v-for="(item, index) in store.data || []" :key="index" @click="jump(item)">
<!-- 头部图标 + 信息 + 操作 -->
<view class="event-header">
<view class="event-icon">
@@ -56,7 +42,7 @@
<text class="event-id">{{ item.lineName }}</text>
<text class="event-tag" :class="`${judgment(item.showName).type}-tag`">{{
item.showName
}}</text>
}}</text>
</view>
<view class="event-desc">
<text>工程{{ item.engineeringName }}</text>
@@ -65,7 +51,7 @@
</view>
</view>
<view class="event-action">
<uni-icons type="search" size="25" color="#376cf3"></uni-icons>
<uni-icons type="search" size="25" color="#376cf3"></uni-icons>
</view>
</view>
<!-- 详情区域 -->
@@ -89,17 +75,18 @@
}} {{
item.landPoint != null && item.landPoint !== ''
? ',落点区域:' + item.landPoint
: ''
: ',落点区域:未知'
}}
</text>
</view>
</uni-card>
<uni-load-more
v-if="store.status == 'loading' || (store.data && store.data.length > 0)"
:status="store.status"
></uni-load-more>
<uni-load-more v-if="store.status == 'loading' || (store.data && store.data.length > 0)"
:status="store.status"></uni-load-more>
<Cn-empty v-else style="top: 20%"></Cn-empty>
</scroll-view>
<view class="back-top boxClick" v-show="showBackTop" @click="backToTop">
<uni-icons type="arrow-up" size="22" color="#fff"></uni-icons>
</view>
</view>
</template>
<script>
@@ -117,7 +104,7 @@ export default {
// default: () => {},
},
sortIndex: {
type: [Number,String],
type: [Number, String],
// default: () => {},
},
},
@@ -135,6 +122,9 @@ export default {
status: 'noMore', //more加载前 loading加载中 noMore加载后
sort: 0,
triggered: true,
scrollTop: 0,
oldScrollTop: 0,
showBackTop: false,
}
},
@@ -167,20 +157,20 @@ export default {
this.filterValue == 0
? []
: this.filterValue == 1
? ['Evt_Sys_DipStr']
: this.filterValue == 2
? ['Evt_Sys_IntrStr']
: ['Evt_Sys_SwlStr']
? ['Evt_Sys_DipStr']
: this.filterValue == 2
? ['Evt_Sys_IntrStr']
: ['Evt_Sys_SwlStr']
this.store.params.startTime = this.$util.getMonthFirstAndLastDay(this.selectValue.date).firstDay
this.store.params.endTime = this.$util.getMonthFirstAndLastDay(this.selectValue.date).lastDay
this.store.loadedCallback = () => {
this.getHeight()
this.loading = false
queryAppEventCounts(this.store.params).then((res) => {
this.dataList[0].value = res.data.allNum
this.dataList[1].value = res.data.eventDown
this.dataList[2].value = res.data.eventOff
this.dataList[3].value = res.data.eventUp
this.dataList[0].value = res.data?.allNum || 0
this.dataList[1].value = res.data?.eventDown || 0
this.dataList[2].value = res.data?.eventOff || 0
this.dataList[3].value = res.data?.eventUp || 0
})
}
this.store.reload()
@@ -232,8 +222,8 @@ export default {
uni.navigateTo({ url: '/pages/message1/comp/transientDetails?detail=' + encodeURIComponent(str) })
},
setSort(index) {
console.log(123,this.sortIndex);
console.log(123, this.sortIndex);
// this.sort = index
this.init()
},
@@ -251,6 +241,17 @@ export default {
this.store.next && this.store.next()
}
},
onScroll(e) {
this.oldScrollTop = e.detail.scrollTop
this.showBackTop = e.detail.scrollTop > 200
},
backToTop() {
this.scrollTop = this.oldScrollTop
this.$nextTick(() => {
this.scrollTop = 0
})
this.showBackTop = false
},
},
computed: {},
@@ -273,4 +274,19 @@ export default {
/deep/ .uni-scroll-view-refresher {
display: none;
}
.back-top {
position: fixed;
right: 30rpx;
bottom: 60rpx;
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background: #376cf3;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4rpx 16rpx rgba(55, 108, 243, 0.35);
z-index: 99;
}
</style>