fix(APP功能调整): 文档中的第7、8、10没有做;第4点需要再核查下ITIC、F47曲线中的可容忍事件、不可容忍事件的显示是否正确。

This commit is contained in:
dk
2026-05-15 11:16:00 +08:00
parent eb72146e0d
commit 17e47c1f07
17 changed files with 1800 additions and 1664 deletions

View File

@@ -37,21 +37,22 @@
{{ device.equipmentName }}
</text>
<text class="uni-card__header-content-subtitle uni-ellipsis">
{{ device.mac }}
<!-- {{ device.mac }}-->
</text>
<view class="tagBox">
<text class="event-tag" :class="device.runStatus == 1 ? 'lx-tag' : 'zx-tag'">{{
device.runStatus == 1 ? '离线' : '在线'
}}</text>
<text class="event-tag" :class="device.runStatus == 1 ? 'lx-tag' : 'zx-tag'">
{{ device.runStatus == 1 ? '离线' : '在线' }}
</text>
<text
class="event-tag"
:class="device.devType == 'Direct_Connected_Device' ? 'zl-tag' : 'jc-tag'"
>
{{ device.devType == 'Direct_Connected_Device' ? '治理设备' : '监测设备' }}
</text>
<text class="event-tag" :class="device.isPrimaryUser == 1 ? 'z-tag' : 'fx-tag'">{{
device.isPrimaryUser == 1 ? '设备' : '分享设备'
}}</text></view
<text class="event-tag" :class="device.isPrimaryUser == 1 ? 'z-tag' : 'fx-tag'">
{{ device.isPrimaryUser == 1 ? '我的设备' : '他人设备' }}
</text>
</view
>
</view>
</view>
@@ -76,7 +77,7 @@
<text>{{ device.process == 2 ? '功能调试' : '出厂调试' }}</text>
</view>
</view>
<view class="pinToTop" v-if="device.isTop == 1"> 置顶 </view>
<view class="pinToTop" v-if="device.isTop == 1"> 置顶</view>
</uni-card>
</template>
<script>
@@ -87,7 +88,8 @@ export default {
props: {
device: {
type: Object,
default: () => {},
default: () => {
},
},
},
methods: {
@@ -152,6 +154,7 @@ export default {
line-height: 1.2;
}
}
.uni-card {
/deep/ .uni-card__header-box {
display: flex;
@@ -160,6 +163,7 @@ export default {
align-items: center;
overflow: hidden;
}
/deep/ .uni-card__header {
display: flex;
border-bottom: 2rpx #ebeef5 solid;
@@ -169,16 +173,20 @@ export default {
overflow: hidden;
}
}
.uni-card .uni-card__header .uni-card__header-content .uni-card__header-content-title {
font-size: 30rpx;
color: #3a3a3a;
font-weight: 700;
}
.uni-card .uni-card__header .uni-card__header-content .uni-card__header-content-subtitle {
margin-top: 15rpx;
font-size: 24rpx;
// margin-top: 5px;
color: #666666;
}
.uni-card .uni-card__header .uni-card__header-avatar .uni-card__header-avatar-image {
width: 40px;
height: 40px;
@@ -186,6 +194,7 @@ export default {
border-radius: 5px;
margin-right: 10px;
}
.uni-card .uni-card__header .uni-card__header-content {
display: flex;
flex-direction: column;
@@ -193,10 +202,12 @@ export default {
flex: 1;
overflow: hidden;
}
.tagBox {
display: flex;
gap: 15rpx;
}
.event-icon {
position: relative;
width: 100rpx;
@@ -207,6 +218,7 @@ export default {
align-items: center;
margin-right: 20rpx;
}
.event-tag {
font-size: 22rpx;
padding: 2rpx 10rpx;
@@ -220,28 +232,34 @@ export default {
background-color: #10b98120;
color: #10b981;
}
.lx-tag {
background-color: #ff3b3020;
color: #ff3b30;
}
.z-tag {
background-color: #2563eb20;
color: #2563eb;
}
.fx-tag {
background-color: #90939920;
color: #909399;
}
.zl-tag {
// background-color: #007aff20;
// color: #007aff;
background-color: #007aff20;
color: #007aff;
}
.jc-tag {
background-color: #007aff20;
color: #007aff;
}
.pinToTop {
background-color: $uni-theme-color;
width: 100rpx;

View File

@@ -588,7 +588,7 @@ export default {
})
}
}
if (this.userInfo.authorities !== 'tourist') {
if (this.userInfo.authorities !== 'tourist' && this.device.isPrimaryUser === '1') {
this.content.splice(0, 0, {
iconPath: '/static/subordinate.png',
text: '用户',

View File

@@ -40,7 +40,7 @@
:range="projectType"
range-key="text"
>
<view class="nav-menu" >
<view class="nav-menu">
{{
select.runStatusName
? select.runStatusName.length > 12
@@ -89,7 +89,6 @@
<Cn-device-card :device="item" :key="index">
<template v-slot:title>
<!-- 卡片标题 -->
<switch
v-if="transfer || share"
:checked="checkList.indexOf(item.equipmentId) > -1"
@@ -97,8 +96,7 @@
@change="switchChange(item)"
/>
<view class="star-icon" v-else>
<!-- <uni-icons type="search" size="25" color="#376cf3"></uni-icons> -->
🔍
<uni-icons type="search" size="25" color="#376cf3"></uni-icons>
</view>
</template>
</Cn-device-card>
@@ -119,6 +117,7 @@ import { getProjectList } from '@/common/api/project'
import { queryDictData } from '@/common/api/dictionary'
import list from '@/common/js/list'
import { engineeringPinToTop } from '@/common/api/device'
export default {
mixins: [list],
data() {
@@ -458,16 +457,8 @@ export default {
} else {
this[type] = true
}
},
switchChange(e) {
let index = this.checkList.indexOf(e.equipmentId)
if (index > -1) {
this.checkList.splice(index, 1)
} else {
this.checkList.push(e.equipmentId)
}
},
},
}
</script>
<style lang="scss">

View File

@@ -238,7 +238,7 @@ export default {
})
}
}
if (this.userInfo.authorities !== 'tourist') {
if (this.userInfo.authorities !== 'tourist' && this.device.isPrimaryUser === '1') {
this.content.splice(0, 0, {
iconPath: '/static/subordinate.png',
text: '用户',

View File

@@ -70,7 +70,6 @@
<Cn-device-card :device="item" :key="index">
<template v-slot:title>
<!-- 卡片标题 -->
<switch
v-if="transfer || share"
:checked="checkList.indexOf(item.equipmentId) > -1"
@@ -78,8 +77,7 @@
@change="switchChange(item)"
/>
<view class="star-icon" v-else>
<!-- <uni-icons type="search" size="25" color="#376cf3"></uni-icons> -->
🔍
<uni-icons type="search" size="25" color="#376cf3"></uni-icons>
</view>
</template>
</Cn-device-card>
@@ -97,6 +95,7 @@
import { getProjectList } from '@/common/api/project'
import { queryDictData } from '@/common/api/dictionary'
import { engineeringPinToTop } from '@/common/api/device'
export default {
props: {
store: {
@@ -167,7 +166,8 @@ export default {
created() {
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
},
mounted() {},
mounted() {
},
methods: {
bindClick(e, item) {
engineeringPinToTop({
@@ -373,9 +373,11 @@ export default {
.nav-menu {
}
}
/deep/ .button-group--right {
padding: 0 0 20rpx;
}
.star-icon {
font-size: 40rpx;
}

View File

@@ -22,6 +22,23 @@
:level="current === 0 ? 3 : current === 1 ? 3 : 2"
@select="select"
>
<picker
v-if="current === 0"
@change="bindPickerChange"
:value="sortIndex"
:range="sortOptions"
style="margin-left: auto"
>
<view class="sort-picker">
{{ sortOptions[sortIndex] }}排序
<uni-icons
custom-prefix="iconfont"
type="icon-paixu1"
size="10"
color="#2563EB"
></uni-icons>
</view>
</picker>
</Cn-filterCriteria>
</view>
<view class="content">
@@ -79,7 +96,8 @@ export default {
navHeight: 0,
selectValue: {},
devCount: [],
// 筛选数据
sortIndex: 0,
sortOptions: ['发生时间', '暂降深度', '持续时间'],
}
},
onLoad() {},
@@ -124,8 +142,6 @@ export default {
if (params.engineeringName != '') {
this.$refs.cnFilterCriteria && this.$refs.cnFilterCriteria.external(params)
}
// this.refresh()
this.$refs.TransientRef && this.$refs.TransientRef.getConfig()
})
},
// 页面销毁
@@ -186,6 +202,12 @@ export default {
this.setHeight()
}, 100)
},
bindPickerChange(e) {
this.sortIndex = e.detail.value
if (this.$refs.TransientRef) {
this.$refs.TransientRef.setSort(this.sortIndex)
}
},
// 设置角标
getDevCount() {
if (uni.getStorageSync('projectList')[1] != undefined) {
@@ -303,22 +325,18 @@ export default {
.badge {
flex: 1;
// position: absolute;
// min-width: 18px;
// height: 16px;
// padding: 0 4px;
// background-color: #ff3b30; /* 红色徽章 */
// color: white;
// font-size: 22rpx;
// line-height: 16px;
// text-align: center;
// border-radius: 9px;
//
text-align: center;
// transform: translateX(-110%); /* 使徽章中心对齐右上角 */
.uni-badge--x {
left: 70rpx;
}
}
.sort-picker {
font-size: 24rpx;
color: #2563eb;
display: flex;
align-items: center;
white-space: nowrap;
}
}
</style>

View File

@@ -21,16 +21,17 @@
<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
>监测点名称{{ item.lineName }}
</view
>
<view class="content-item-header-right-des" v-if="type == '0'"
>暂态类型{{ item.showName }}</view
>暂态类型{{ item.showName }}
</view
>
<!-- <view class="content-item-header-right-des">{{ item.subTitle }}</view> -->
</view>
<view class="ml10" v-if="type === '0' || item.status != '1'">
<!-- <uni-icons type="search" size="25" color="#376cf3"></uni-icons> -->
🔍
<uni-icons type="search" size="25" color="#376cf3"></uni-icons>
</view>
</view>
<view class="content-item-footer">{{ item.subTitle }}</view>

View File

@@ -31,26 +31,25 @@
color="#376cf3"
></uni-icons> -->
<Cn-icon-transient :name="`运行告警`" />
<view class="badge1" v-if="item.isRead == 0"> </view>
<view class="badge1" v-if="item.isRead == 0"></view>
</view>
<view class="event-info">
<view class="event-title">
<text class="event-id">{{ item.date }}</text>
</view>
<view class="event-desc">
<text>告警终端{{ item.warnNums }}</text>
<text>通讯中断{{ item.interruptCounts }}</text>
<text>终端告警{{ item.warnCounts}}</text>
<text>告警终端总数{{ item.warnNums }}</text>
<text>质量指标告警终端数{{ item.interruptCounts }}</text>
<text>事件触发告警终端数{{ item.warnCounts }}</text>
</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>
<!-- <view class="event-detail">
<text> 告警终端{{ item.warnNums }} </text>
<text> 告警终端总数{{ item.warnNums }} </text>
</view> -->
</uni-card>
<uni-load-more
@@ -63,6 +62,7 @@
</template>
<script>
import list from '@/common/js/list'
export default {
components: {},
props: {
@@ -82,7 +82,8 @@ export default {
status: 'noMore', //more加载前 loading加载中 noMore加载后
}
},
mounted() {},
mounted() {
},
methods: {
init() {
@@ -160,6 +161,7 @@ export default {
flex: 1;
}
}
/deep/ .uni-scroll-view-refresher {
display: none;
}

View File

@@ -2,7 +2,6 @@
<Cn-page :loading="loading">
<view class="detail" slot="body">
<view class="detail-content" style="font-size: 32rpx">
<!-- <view class="detail-content-title mb20">发生时间</view> -->
<view>{{ detail.startTime }}</view>
</view>
<view class="detail-content">
@@ -15,10 +14,16 @@
<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-for="(item, textIndex) in detail.dataSet" :key="textIndex">
{{ item.showName + '' + (item.value == 3.1415926 ? '-' : item.value) + (item.unit || '') }}
</view> -->
</view>
<view class="detail-tabs">
<uni-segmented-control
:current="detailTab"
active-color="#376cf3"
:values="['波形图', 'ITIC', 'F47']"
@clickItem="onDetailTabChange"
/>
</view>
<view v-if="detailTab == 0">
<view class="detail-content">
<view class="detail-content-title mb20">瞬时波形图</view>
<image
@@ -42,20 +47,47 @@
<text v-else>暂无</text>
</view>
</view>
<view v-if="detailTab == 1" class="chart-wrapper">
<ITIC :store="eventStore" style="min-height: 600rpx;" />
</view>
<view v-if="detailTab == 2" class="chart-wrapper">
<F47 :store="eventStore" style="min-height: 600rpx;" />
</view>
</view>
</Cn-page>
</template>
<script>
import { updateStatus } from '@/common/api/message'
import ITIC from './ITIC.vue'
import F47 from './F47.vue'
export default {
components: { ITIC, F47 },
data() {
return {
loading: true,
detail: {},
detailTab: 0,
}
},
computed: {
eventStore() {
const hasData = this.detail && (this.detail.id || this.detail.equipmentId)
if (!hasData) {
return { data: [], status: 'noMore' }
}
const item = {
...this.detail,
evtParamTm: this.detail.evtParamTm || '0s',
evtParamVVaDepth: this.detail.evtParamVVaDepth || '0%',
}
return {
data: [item],
status: 'noMore',
}
},
},
onLoad(options) {
// console.log(options.detail)
this.detail = JSON.parse(decodeURIComponent(options.detail).replace(/百分比/g, '%'))
this.detail.rmsPics && (this.detail.rmsPics = this.$config.static + this.detail.rmsPics)
this.detail.instantPics && (this.detail.instantPics = this.$config.static + this.detail.instantPics)
@@ -68,10 +100,10 @@ export default {
}
},
methods: {
onDetailTabChange(e) {
this.detailTab = e.currentIndex
},
previewImage(url) {
// uni.previewImage({
// urls: [url],
// })
uni.navigateTo({
url: `/pages/message1/comp/preview?url=${encodeURIComponent(url)}`,
})
@@ -95,5 +127,20 @@ export default {
font-weight: 700;
}
}
.detail-tabs {
padding: 0 20rpx;
margin-bottom: 20rpx;
}
.chart-container {
min-height: 600rpx;
}
.chart-wrapper {
background: #fff;
margin-bottom: 20rpx;
padding: 20rpx;
}
}
</style>

View File

@@ -27,7 +27,7 @@
<view class="event-desc">
<text>工程名称{{ item.engineeringName }}</text>
<text>项目名称{{ item.projectName }}</text>
<text>事件时间{{ item.startTime }}</text>
<text>事件时间{{ item.startTime2 }}</text>
</view>
</view>
</view>

View File

@@ -17,9 +17,9 @@
</view>
</view>
</view>
<!-- 稳态数量 -->
<!-- 越限数量 -->
<scroll-view
v-if="filterValue == '稳态数量'"
v-if="filterValue == '越限数量'"
scroll-y="true"
@refresherrefresh="refresherrefresh"
@scrolltolower="scrolltolower"
@@ -47,7 +47,7 @@
color="#E6A23C"
></uni-icons> -->
<Cn-icon-transient :name="`稳态越限`" />
<view class="badge1" v-if="item.isRead == 0"> </view>
<view class="badge1" v-if="item.isRead == 0"></view>
</view>
<view class="event-info">
<view class="event-title">
@@ -61,13 +61,12 @@
</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>
<!-- 详情区域 -->
<view class="event-detail textBox" @touchmove.stop>
<text>{{ item.statisticsDate }}发生 {{ item.overLimitDesc }} </text>
<text>{{ item.statisticsDate }}发生 {{ item.overLimitDesc }}</text>
</view>
</uni-card>
@@ -149,6 +148,7 @@
<script>
import list from '@/common/js/list'
import { queryAppHarmonicCounts, queryAppHarmonicLine } from '../../common/api/harmonic.js'
export default {
components: {},
props: {
@@ -165,9 +165,9 @@ export default {
data() {
return {
height: 0,
filterValue: '稳态数量',
filterValue: '越限数量',
list: [
{ value: 0, label: '稳态数量' },
{ value: 0, label: '越限数量' },
{ value: 0, label: '越限天数' },
{ value: 0, label: '越限测点数' },
],
@@ -276,6 +276,7 @@ export default {
.box:first-child {
flex: 1.3 !important;
}
/* 列表容器 */
.event-list {
/* 头部:图标 + 信息 + 操作 */
@@ -294,9 +295,11 @@ export default {
font-size: 24rpx;
}
}
/deep/ .uni-scroll-view-refresher {
display: none;
}
.textBox {
max-height: 110rpx;
overflow-y: auto;
@@ -308,15 +311,18 @@ export default {
// text-overflow: ellipsis;
// word-break: break-all;
}
/deep/ .uni-calendar-item--checked {
background-color: #ffffff00;
color: #000000e6;
opacity: 1;
}
/deep/ .uni-calendar-item--isDay {
background-color: #ffffff00;
color: #000000e6;
opacity: 1;
.uni-calendar-item__weeks-lunar-text {
background-color: #ffffff00;
color: #000000e6;
@@ -327,9 +333,11 @@ export default {
/deep/ .uni-calendar-item__weeks-box-text {
z-index: 1;
}
/deep/ .uni-calendar-item--isDay-text {
color: #333 !important; /* 改成你想要的颜色 */
}
/deep/ .uni-calendar-item__weeks-box-circle {
position: absolute;
top: 7px;
@@ -340,30 +348,38 @@ export default {
z-index: 0;
background-color: #e6a23c;
}
/* 核心:选中圆圈下的 子元素(日期数字) */
/deep/ .uni-calendar-item__weeks-box-circle + .uni-calendar-item__weeks-box-text {
color: #fff !important; /* 改成你想要的颜色 */
}
/deep/ .uni-calendar__backtoday,
/deep/ .uni-calendar__header-btn-box {
display: none;
}
/deep/ .uni-calendar-item__weeks-lunar-text {
display: none;
}
/deep/ .uni-calendar__header {
pointer-events: none !important;
}
.event-detail {
/deep/ .uni-calendar__header {
display: none !important;
}
/deep/ .uni-calendar__weeks-day {
height: 35px;
}
/deep/ .uni-calendar-item__weeks-box-item {
height: 40px;
}
/deep/ .uni-calendar-item__weeks-box-circle {
position: absolute;
top: 3px;

View File

@@ -17,28 +17,7 @@
<text class="label">{{ item.label }}</text>
</view>
</view>
<view class="smallLabel">
<uni-segmented-control
:current="curSub"
active-color="#376cf3"
:values="subsectionList"
@clickItem="sectionChange"
v-if="subsectionList.length > 1"
/>
<view style="width: 180rpx">
<picker @change="bindPickerChange" :value="sort" :range="array" v-if="curSub == 0">
<view class="uni-input"
>{{ array[sort] }}排序
<uni-icons
custom-prefix="iconfont"
type="icon-paixu1"
size="10"
color="#2563EB"
></uni-icons>
</view>
</picker>
</view>
</view>
<view class="smallLabel"> </view>
</view>
<!-- 卡片 -->
<scroll-view
@@ -48,7 +27,6 @@
:refresher-triggered="triggered"
refresher-enabled="true"
class="event-list"
v-if="curSub == 0"
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }"
>
<!-- 循环渲染事件项 -->
@@ -87,8 +65,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>
<!-- 详情区域 -->
@@ -119,29 +96,13 @@
></uni-load-more>
<Cn-empty v-else style="top: 20%"></Cn-empty>
</scroll-view>
<!-- ITIC 列表 -->
<ITIC
v-if="subsectionList[curSub] == 'ITIC'"
:store="store"
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }"
></ITIC>
<!-- F47 列表 -->
<F47
v-if="subsectionList[curSub] == 'F47'"
:store="store"
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }"
></F47>
</view>
</template>
<script>
import list from '@/common/js/list'
import { queryUserPushConfig } from '@/common/api/mine'
import ITIC from './comp/ITIC.vue'
import F47 from './comp/F47.vue'
import { queryAppEventCounts } from '../../common/api/harmonic.js'
export default {
components: { ITIC, F47 },
props: {
navHeight: {
type: Number,
@@ -163,20 +124,12 @@ export default {
{ value: 0, label: '中断', key: '电压中断' },
{ value: 0, label: '暂升', key: '电压暂升' },
],
curSub: 0,
subsectionList: [], //'列表', 'ITIC', 'F47'
status: 'noMore', //more加载前 loading加载中 noMore加载后
sort: 0,
triggered: true,
// config: {},
array: ['发生时间', '暂降深度', '持续时间'],
}
},
mounted() {
this.getConfig()
},
methods: {
getHeight() {
uni.createSelectorQuery()
@@ -224,19 +177,6 @@ export default {
}
this.store.reload()
},
getConfig() {
queryUserPushConfig().then((res) => {
// this.config = res.data
let list = [
'列表',
res.data.iticFunction == 1 ? 'ITIC' : '',
res.data.f47Function == 1 ? 'F47' : '',
].filter((item) => item)
this.curSub = !list[this.curSub] ? 0 : this.curSub
this.subsectionList = JSON.parse(JSON.stringify(list))
})
},
judgment(val, key) {
switch (val) {
case '电压暂降':
@@ -283,14 +223,10 @@ export default {
item.status = '1'
uni.navigateTo({ url: '/pages/message1/comp/transientDetails?detail=' + encodeURIComponent(str) })
},
// 切换排序
bindPickerChange(e) {
this.sort = e.detail.value
setSort(index) {
this.sort = index
this.init()
},
sectionChange(e) {
this.curSub = e.currentIndex
},
// 下拉
refresherrefresh() {
this.triggered = true
@@ -306,9 +242,6 @@ export default {
}
},
},
onShow() {
this.curSub = 0
},
computed: {},
watch: {

View File

@@ -93,7 +93,7 @@ import { sm3Digest } from '@/common/js/sm3.js'
export default {
data() {
return {
checkbox: false,
checkbox: true,
loading: false,
loginType: 'pwd',
phone: '',

View File

@@ -77,7 +77,7 @@ export default {
name: 'jiaban',
data() {
return {
checkbox: false,
checkbox: true,
step: 1,
loading: false,
waitTime: 0,

784
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff