提交代码
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
>
|
||||
<!-- 循环渲染事件项 -->
|
||||
<uni-card
|
||||
class="event-item"
|
||||
class="event-item boxClick"
|
||||
:class="item.type"
|
||||
v-for="(item, index) in this.store.data"
|
||||
:key="index"
|
||||
|
||||
@@ -168,8 +168,8 @@ export default {
|
||||
color: #007aff;
|
||||
}
|
||||
.jc-tag {
|
||||
background-color: #3498db20;
|
||||
color: #3498db;
|
||||
background-color: #007aff20;
|
||||
color: #007aff;
|
||||
}
|
||||
}
|
||||
/deep/ .uni-collapse-item__title-box {
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
class="movable-view"
|
||||
direction="all"
|
||||
:scale="true"
|
||||
:scale-min="0.5"
|
||||
:scale-max="3"
|
||||
:scale-min="0.2"
|
||||
:scale-max="0.5"
|
||||
:scale-value="scaleValue"
|
||||
|
||||
@touchstart="onTouchStart"
|
||||
@@ -76,7 +76,7 @@ export default {
|
||||
return {
|
||||
imageUrl: '',
|
||||
// 缩放相关 - 默认0.5
|
||||
scaleValue: 0.6,
|
||||
scaleValue: 0.2,
|
||||
x: 0,
|
||||
y: 0,
|
||||
// 图片原始尺寸
|
||||
@@ -92,7 +92,7 @@ export default {
|
||||
windowWidth: 0,
|
||||
windowHeight: 0,
|
||||
// 缩放步长
|
||||
zoomStep: 0.2,
|
||||
zoomStep: 0.1,
|
||||
// 动画控制
|
||||
isTouching: false,
|
||||
animationTimer: null
|
||||
@@ -160,14 +160,14 @@ export default {
|
||||
// 放大
|
||||
zoomIn() {
|
||||
// 计算新的缩放值,不超过最大值
|
||||
const newScale = Math.min(this.scaleValue + this.zoomStep, 3)
|
||||
const newScale = Math.min(this.scaleValue + this.zoomStep, 0.5)
|
||||
this.setScaleWithAnimation(newScale)
|
||||
},
|
||||
|
||||
// 缩小
|
||||
zoomOut() {
|
||||
// 计算新的缩放值,不低于最小值
|
||||
const newScale = Math.max(this.scaleValue - this.zoomStep, 0.5)
|
||||
const newScale = Math.max(this.scaleValue - this.zoomStep, 0.2)
|
||||
this.setScaleWithAnimation(newScale)
|
||||
},
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
.box:first-child {
|
||||
flex: 1.7;
|
||||
}
|
||||
.boxClick {
|
||||
.boxClick1 {
|
||||
background-color: $uni-theme-color;
|
||||
color: #ffffff;
|
||||
}
|
||||
@@ -120,7 +120,8 @@
|
||||
padding: 0rpx 10rpx;
|
||||
border-radius: 8rpx;
|
||||
color: #ffffff;
|
||||
height: 38rpx;
|
||||
height: 34rpx;
|
||||
line-height: 38rpx;
|
||||
}
|
||||
.sag-tag {
|
||||
background-color: #2563eb20;
|
||||
|
||||
@@ -3,41 +3,26 @@
|
||||
<!-- 运行事件 -->
|
||||
|
||||
<!-- 卡片 -->
|
||||
<scroll-view
|
||||
scroll-y="true"
|
||||
@refresherrefresh="refresherrefresh"
|
||||
@scrolltolower="scrolltolower"
|
||||
:refresher-triggered="triggered"
|
||||
refresher-enabled="true"
|
||||
class="event-list"
|
||||
:style="{ height: 'calc(100vh - ' + (navHeight + 10) + 'px)', overflow: 'auto' }"
|
||||
>
|
||||
<scroll-view scroll-y="true" @refresherrefresh="refresherrefresh" @scrolltolower="scrolltolower"
|
||||
:refresher-triggered="triggered" refresher-enabled="true" class="event-list"
|
||||
:style="{ height: 'calc(100vh - ' + (navHeight + 10) + 'px)', overflow: 'auto' }">
|
||||
<!-- 循环渲染事件项 -->
|
||||
<uni-card
|
||||
class="event-item"
|
||||
:class="item.type"
|
||||
v-for="(item, index) in store.data"
|
||||
:key="index"
|
||||
@click="jump(item)"
|
||||
>
|
||||
<uni-card class="event-item " :class="item.type" v-for="(item, index) in store.data" :key="index"
|
||||
@click="jump(item)">
|
||||
<!-- 头部:图标 + 信息 + 操作 -->
|
||||
<view class="event-header">
|
||||
<view class="event-icon" :class="item.devType == 'Direct_Connected_Device' ? 'zl-bgc' : 'jc-bgc'">
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<!-- <uni-icons custom-prefix="iconfont" type="icon-shebei3" size="35" color="#376cf3"></uni-icons> -->
|
||||
<Cn-icon-transient
|
||||
:name="item.devType == 'Direct_Connected_Device' ? '治理设备' : '监测设备'"
|
||||
/>
|
||||
<Cn-icon-transient :name="item.devType == 'Direct_Connected_Device' ? '治理设备' : '监测设备'" />
|
||||
<view class="badge1" v-if="item.status == 0"> </view>
|
||||
</view>
|
||||
<view class="event-info">
|
||||
<view class="event-title">
|
||||
<text class="event-id">{{ item.equipmentName }}</text>
|
||||
<text
|
||||
class="event-tag"
|
||||
:class="item.devType == 'Direct_Connected_Device' ? 'zl-tag' : 'jc-tag'"
|
||||
>{{ item.devType == 'Direct_Connected_Device' ? '治理设备' : '监测设备' }}</text
|
||||
>
|
||||
<text class="event-tag"
|
||||
:class="item.devType == 'Direct_Connected_Device' ? 'zl-tag' : 'jc-tag'">{{ item.devType
|
||||
== 'Direct_Connected_Device' ? '治理设备' : '监测设备' }}</text>
|
||||
</view>
|
||||
<view class="event-desc">
|
||||
<text>工程名称:{{ item.engineeringName }}</text>
|
||||
@@ -51,10 +36,8 @@
|
||||
<text> {{ item.showName }} </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>
|
||||
@@ -80,7 +63,7 @@ export default {
|
||||
triggered: true,
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
mounted() { },
|
||||
|
||||
methods: {
|
||||
// 查詢
|
||||
@@ -142,6 +125,7 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './index.scss';
|
||||
|
||||
/* 列表容器 */
|
||||
.event-list {
|
||||
margin-top: 20rpx;
|
||||
@@ -152,18 +136,22 @@ export default {
|
||||
.zl-bgc {
|
||||
background-color: #376cf320;
|
||||
}
|
||||
|
||||
.jc-bgc {
|
||||
background-color: #376cf320;
|
||||
}
|
||||
|
||||
.zl-tag {
|
||||
background-color: #007aff20;
|
||||
color: #007aff;
|
||||
}
|
||||
|
||||
.jc-tag {
|
||||
background-color: #3498db20;
|
||||
color: #3498db;
|
||||
background-color: #007aff20;
|
||||
color: #007aff;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .uni-scroll-view-refresher {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
>
|
||||
<!-- 循环渲染事件项 -->
|
||||
<uni-card
|
||||
class="event-item"
|
||||
class="event-item boxClick"
|
||||
:class="item.type"
|
||||
v-for="(item, index) in store.data"
|
||||
:key="index"
|
||||
@@ -338,7 +338,7 @@ export default {
|
||||
height: 39px;
|
||||
border-radius: 50%;
|
||||
z-index: 0;
|
||||
background-color: #f43530;
|
||||
background-color: #e6a23c;
|
||||
}
|
||||
/* 核心:选中圆圈下的 子元素(日期数字) */
|
||||
/deep/ .uni-calendar-item__weeks-box-circle + .uni-calendar-item__weeks-box-text {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<view class="transientBox">
|
||||
<view class="statistics pd20">
|
||||
<view
|
||||
class="box"
|
||||
:class="{ boxClick: filterValue == index }"
|
||||
class="box boxClick"
|
||||
:class="{ boxClick1: filterValue == index }"
|
||||
v-for="(item, index) in dataList"
|
||||
@click="
|
||||
filterValue = index
|
||||
@@ -53,7 +53,7 @@
|
||||
>
|
||||
<!-- 循环渲染事件项 -->
|
||||
<uni-card
|
||||
class="event-item"
|
||||
class="event-item boxClick"
|
||||
:class="judgment(item.showName).type"
|
||||
v-for="(item, index) in store.data || []"
|
||||
:key="index"
|
||||
@@ -175,21 +175,23 @@ export default {
|
||||
|
||||
mounted() {
|
||||
this.getConfig()
|
||||
uni.createSelectorQuery()
|
||||
.select('.transientBox')
|
||||
.boundingClientRect((rect) => {
|
||||
//
|
||||
// #ifdef H5
|
||||
this.height = rect?.height + 10 || 0
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
this.height = rect?.height + 10 || 0
|
||||
// #endif
|
||||
})
|
||||
.exec()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getHeight() {
|
||||
uni.createSelectorQuery()
|
||||
.select('.transientBox')
|
||||
.boundingClientRect((rect) => {
|
||||
//
|
||||
// #ifdef H5
|
||||
this.height = rect?.height || 0
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
this.height = rect?.height || 0
|
||||
// #endif
|
||||
})
|
||||
.exec()
|
||||
},
|
||||
// 查詢
|
||||
init() {
|
||||
this.store = this.DataSource('/cs-harmonic-boot/eventUser/queryEventpage')
|
||||
@@ -211,6 +213,7 @@ export default {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user