提交代码
This commit is contained in:
@@ -95,7 +95,7 @@
|
||||
{{
|
||||
item.landPoint != null && item.landPoint !== ''
|
||||
? ',落点区域:' + item.landPoint
|
||||
: ''
|
||||
: ',落点区域:未知'
|
||||
}}
|
||||
</text>
|
||||
</view>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user