修改发布问题
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="stats-row">
|
||||
<view class="stats-item" v-for="(item, idx) in summaryStats" :key="idx">
|
||||
<view class="stats-item" v-for="(item, idx) in summaryStats" :key="idx" @click="jump(idx)">
|
||||
<text class="stats-num">{{ item.value }}</text>
|
||||
<text class="stats-label">{{ item.label }}</text>
|
||||
</view>
|
||||
@@ -29,8 +29,12 @@
|
||||
</view>
|
||||
<view class="indicators-card card">
|
||||
<view class="indicator-tags">
|
||||
<view v-for="(tag, idx) in selectedIndicators" :key="tag"
|
||||
class="indicator-tag indicator-tag--active" @click="removeIndicator(idx)">
|
||||
<view
|
||||
v-for="(tag, idx) in selectedIndicators"
|
||||
:key="tag"
|
||||
class="indicator-tag indicator-tag--active"
|
||||
@click="removeIndicator(idx)"
|
||||
>
|
||||
<text class="indicator-tag-text">{{ formatIndicatorTag(tag) }}</text>
|
||||
<uni-icons type="closeempty" size="12" color="#376cf3" />
|
||||
</view>
|
||||
@@ -54,8 +58,12 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="monitor-search">
|
||||
<uni-search-bar v-model="filterKeyword" bgColor="#fff" placeholder="搜索项目、设备、监测点"
|
||||
cancelButton="none" />
|
||||
<uni-search-bar
|
||||
v-model="filterKeyword"
|
||||
bgColor="#fff"
|
||||
placeholder="搜索项目、设备、监测点"
|
||||
cancelButton="none"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="monitor-list">
|
||||
@@ -80,30 +88,43 @@
|
||||
</view>
|
||||
|
||||
<view class="params-section">
|
||||
<view v-for="(rowItems, rowIdx) in chunkedChildren(getDisplayChildren(point))" :key="rowIdx"
|
||||
class="double-row">
|
||||
<view
|
||||
v-for="(rowItems, rowIdx) in chunkedChildren(getDisplayChildren(point))"
|
||||
:key="rowIdx"
|
||||
class="double-row"
|
||||
>
|
||||
<view v-for="(child, childIdx) in rowItems" :key="childIdx" class="param-group">
|
||||
<view class="param-title">
|
||||
<text>{{ child.name }} {{ child.unit ? `(${child.unit})` : '' }}</text>
|
||||
</view>
|
||||
<view v-if="hasTPhaseData(child)" class="phase-single">
|
||||
<text class="phase-value-vertical phase-value-vertical--neutral">{{ child.T
|
||||
}}</text>
|
||||
<text class="phase-value-vertical phase-value-vertical--neutral">{{
|
||||
child.T
|
||||
}}</text>
|
||||
</view>
|
||||
<view v-else class="phase-vertical">
|
||||
<view class="phase-item-vertical">
|
||||
<text class="phase-value-vertical"
|
||||
:style="{ color: phaseColors[0].color }">{{ child.A }}</text>
|
||||
<text
|
||||
class="phase-value-vertical"
|
||||
:style="{ color: phaseColors[0].color }"
|
||||
>{{ child.A }}</text
|
||||
>
|
||||
</view>
|
||||
<view class="phase-divider" />
|
||||
<view class="phase-item-vertical">
|
||||
<text class="phase-value-vertical"
|
||||
:style="{ color: phaseColors[1].color }">{{ child.B }}</text>
|
||||
<text
|
||||
class="phase-value-vertical"
|
||||
:style="{ color: phaseColors[1].color }"
|
||||
>{{ child.B }}</text
|
||||
>
|
||||
</view>
|
||||
<view class="phase-divider" />
|
||||
<view class="phase-item-vertical">
|
||||
<text class="phase-value-vertical"
|
||||
:style="{ color: phaseColors[2].color }">{{ child.C }}</text>
|
||||
<text
|
||||
class="phase-value-vertical"
|
||||
:style="{ color: phaseColors[2].color }"
|
||||
>{{ child.C }}</text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -115,8 +136,10 @@
|
||||
<text>更多指标</text>
|
||||
</view>
|
||||
</view>
|
||||
<uni-load-more v-if="listStatus == 'loading' || filteredMonitoringPoints.length > 0"
|
||||
:status="listStatus"></uni-load-more>
|
||||
<uni-load-more
|
||||
v-if="listStatus == 'loading' || filteredMonitoringPoints.length > 0"
|
||||
:status="listStatus"
|
||||
></uni-load-more>
|
||||
<Cn-empty v-else-if="listStatus !== 'loading'" style="top: 45%"></Cn-empty>
|
||||
</view>
|
||||
</view>
|
||||
@@ -136,12 +159,20 @@
|
||||
<view v-if="targetLists.length === 0" class="indicator-popup-empty">
|
||||
<text>暂无指标数据</text>
|
||||
</view>
|
||||
<view v-for="item in targetLists" :key="item.id || item.name" class="indicator-popup-item"
|
||||
<view
|
||||
v-for="item in targetLists"
|
||||
:key="item.id || item.name"
|
||||
class="indicator-popup-item"
|
||||
:class="{ 'indicator-popup-item--active': popupSelectedIndicators.includes(item.name) }"
|
||||
@click="togglePopupIndicator(item.name)">
|
||||
@click="togglePopupIndicator(item.name)"
|
||||
>
|
||||
<text>{{ item.name }}</text>
|
||||
<uni-icons v-if="popupSelectedIndicators.includes(item.name)" type="checkmarkempty" size="18"
|
||||
color="#376cf3" />
|
||||
<uni-icons
|
||||
v-if="popupSelectedIndicators.includes(item.name)"
|
||||
type="checkmarkempty"
|
||||
size="18"
|
||||
color="#376cf3"
|
||||
/>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
@@ -158,12 +189,7 @@ import { getDevCount } from '@/common/api/device.js'
|
||||
const DEFAULT_INDICATOR_CODES = ['Key_Power_Quality_V', 'Key_Power_Quality_I']
|
||||
|
||||
/** 治理测点(lineType=0)卡片默认展示的指标 */
|
||||
const GOVERNANCE_DEFAULT_INDICATORS = [
|
||||
'电网电流',
|
||||
'电网电压',
|
||||
'负载电流',
|
||||
'总输出电流',
|
||||
]
|
||||
const GOVERNANCE_DEFAULT_INDICATORS = ['电网电流', '电网电压', '负载电流', '总输出电流']
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -239,7 +265,6 @@ export default {
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.info()
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 查询接口
|
||||
@@ -331,8 +356,7 @@ export default {
|
||||
return child.T !== undefined && child.T !== null && child.T !== '-'
|
||||
},
|
||||
updateSummaryStats(devCount = {}) {
|
||||
const deviceTotal =
|
||||
(devCount.currentOnLineDevCount || 0) + (devCount.currentOffLineDevCount || 0)
|
||||
const deviceTotal = (devCount.currentOnLineDevCount || 0) + (devCount.currentOffLineDevCount || 0)
|
||||
|
||||
this.summaryStats = [
|
||||
{ label: '项目总数', value: devCount.currentProjectCount || 0 },
|
||||
@@ -471,6 +495,34 @@ export default {
|
||||
})
|
||||
this.showBackTop = false
|
||||
},
|
||||
// 跳转页面
|
||||
jump(idx) {
|
||||
if (idx == 0) {
|
||||
// 项目总数 -> 项目管理
|
||||
const engineering = uni.getStorageSync('engineering') || {
|
||||
id: this.engineeringId,
|
||||
name: this.engineeringName,
|
||||
}
|
||||
if (!engineering?.id) {
|
||||
return uni.showToast({
|
||||
title: '请先选择工程',
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/project/list?engineeringName=' +
|
||||
encodeURIComponent(engineering.name || '') +
|
||||
'&engineeringId=' +
|
||||
engineering.id,
|
||||
})
|
||||
} else if (idx == 1) {
|
||||
// 设备总数
|
||||
uni.navigateTo({
|
||||
url: '/pages/device/list?type=nowEngineering',
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -545,7 +597,7 @@ export default {
|
||||
gap: 6rpx;
|
||||
padding: 8rpx 20rpx;
|
||||
border: 1rpx solid #376cf380;
|
||||
background-color: #266FFF10;
|
||||
background-color: #266fff10;
|
||||
border-radius: 16rpx;
|
||||
flex-shrink: 0;
|
||||
|
||||
@@ -736,8 +788,8 @@ export default {
|
||||
flex-shrink: 0;
|
||||
padding: 4rpx 12rpx;
|
||||
font-size: 22rpx;
|
||||
color: #2E8B57;
|
||||
background: #2E8B5715;
|
||||
color: #2e8b57;
|
||||
background: #2e8b5715;
|
||||
border-radius: 8rpx;
|
||||
line-height: 1.2;
|
||||
}
|
||||
@@ -832,7 +884,7 @@ export default {
|
||||
line-height: 72rpx;
|
||||
text-align: center;
|
||||
border: 1rpx solid #376cf380;
|
||||
background-color: #266FFF10;
|
||||
background-color: #266fff10;
|
||||
border-radius: 16rpx;
|
||||
|
||||
text {
|
||||
@@ -867,7 +919,6 @@ export default {
|
||||
min-width: 80rpx;
|
||||
}
|
||||
|
||||
|
||||
.indicator-popup-confirm {
|
||||
font-size: 28rpx;
|
||||
color: #376cf3;
|
||||
|
||||
Reference in New Issue
Block a user