修改 app问题

This commit is contained in:
GGJ
2024-10-11 11:09:54 +08:00
parent 56a2db2b48
commit c5ae23e8da
6 changed files with 54 additions and 52 deletions

View File

@@ -3,13 +3,8 @@
<view class="content" slot="body">
<view class="content-item" v-for="(item, index) in store.data" :key="index" @click="jump(item)">
<view class="content-item-header">
<uni-badge
class="uni-badge-left-margin"
:is-dot="true"
:text="item.status == '1' ? 0 : 1"
absolute="rightTop"
size="small"
>
<uni-badge class="uni-badge-left-margin" :is-dot="true" :text="item.status == '1' ? 0 : 1"
absolute="rightTop" size="small" :style="type == '0' ? `margin-top: 30rpx;` : ''">
<view class="content-item-header-icon">
<image mode="aspectFill" :src="staticIcon" style="height: 60rpx; width: 60rpx"></image>
</view>
@@ -19,6 +14,10 @@
<!-- <view class="content-item-header-right-des">{{ item.engineeringName }} {{ item.projectName }}</view> -->
<view class="content-item-header-right-des">工程名称{{ item.engineeringName }}</view>
<view class="content-item-header-right-des">项目名称{{ item.projectName }}</view>
<view class="content-item-header-right-des" v-if="type == '0' || type == '1'">监测点名称{{
item.lineName }}</view>
<view class="content-item-header-right-des" v-if="type == '0'">暂态事件类型{{ item.showName.slice(0,
-4) }}</view>
<!-- <view class="content-item-header-right-des">{{ item.subTitle }}</view> -->
</view>
<view class="ml10" v-if="type === '0' || item.status != '1'">🔍</view>
@@ -41,10 +40,8 @@
</view>
</uni-card> -->
<Cn-empty v-if="store.empty" style="padding-top: 400rpx"></Cn-empty>
<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>
</view>
</Cn-page>
</template>
@@ -109,6 +106,8 @@ export default {
this.store = this.DataSource('/cs-harmonic-boot/eventUser/queryEventpage')
this.store.params.type = this.type
this.store.loadedCallback = () => {
console.log(111, this.store.data)
this.store.data.forEach((item) => {
if (this.type === '3') {
item.showName = '告警,告警码:' + item.code
@@ -117,7 +116,7 @@ export default {
item.subTitle = `${item.startTime}发生${item.showName}`
} else {
item.subTitle =
`${item.startTime}发生${item.showName}` +
`${item.startTime}` +
item.dataSet
.map((item2) => {
return (
@@ -130,19 +129,17 @@ export default {
.join('')
}
})
console.log(this.store.data)
this.loading = false
}
this.store.reload()
},
jump(item) {
console.log(`123`,item);
console.log(`123`,this.type);
if (this.type === '0') {
let str = JSON.stringify(item).replace(/%/g, '百分比')
item.status = '1'
item.status = '1'
uni.navigateTo({ url: '/pages/message/messageDetail?detail=' + encodeURIComponent(str) })
} else {
if (item.status != '1') {
@@ -166,10 +163,12 @@ export default {
border-radius: 8rpx;
border: 1px solid #ebeef5;
background: #fff;
.content-item-header {
display: flex;
padding: 20rpx 0;
border-bottom: 1px solid #ebeef5;
.content-item-header-icon {
display: flex;
align-items: center;
@@ -179,30 +178,35 @@ export default {
border-radius: 8rpx;
background: $uni-theme-color;
}
.content-item-header-right {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
height: 100rpx;
// height: 140rpx;
margin-left: 20rpx;
.content-item-header-right-title {
font-size: 28rpx;
font-weight: bold;
color: #111;
}
.content-item-header-right-des {
font-size: 24rpx;
color: #999;
}
}
}
.content-item-footer {
margin-top: 20rpx;
font-size: 24rpx;
color: #999;
}
}
// padding-top: 20rpx;
}