diff --git a/components/Cn-device-card/Cn-device-card.vue b/components/Cn-device-card/Cn-device-card.vue
index 5d3b305..8bcc5ee 100644
--- a/components/Cn-device-card/Cn-device-card.vue
+++ b/components/Cn-device-card/Cn-device-card.vue
@@ -52,7 +52,7 @@
-
@@ -248,7 +254,10 @@ export default {
this.select.projectName = ''
this.getProjectList()
}
+
+ setTimeout(() => {
this.store && this.store.reload()
+ }, 500);
},
methods: {
bindClick(e, item) {
@@ -316,6 +325,7 @@ export default {
console.warn('init')
this.getEngineeringList()
this.getProjectList()
+
this.getDeviceList()
},
getDeviceList() {
diff --git a/pages/engineering/list.vue b/pages/engineering/list.vue
index 07b0e49..31a79ce 100644
--- a/pages/engineering/list.vue
+++ b/pages/engineering/list.vue
@@ -11,7 +11,7 @@
-
+
@@ -203,7 +203,7 @@ export default {
}
/deep/ .uni-card--border {
- margin: 0 10px !important;
+ margin: 0 0px !important;
padding-bottom: 10px;
}
diff --git a/pages/index/comp/apply.vue b/pages/index/comp/apply.vue
index 7933761..36057d6 100644
--- a/pages/index/comp/apply.vue
+++ b/pages/index/comp/apply.vue
@@ -14,7 +14,7 @@
>全选
-->
- 已选择 {{ checkedTotal }} 条事件
+ 已选择 {{ checkedTotal }} 条事件(最多{{ maxSelectCount }}条)
-
+
@@ -126,6 +130,7 @@ export default {
height: 0,
checkedAll: false,
checkedTotal: 0,
+ maxSelectCount: 5,
sort: 0,
array: ['发生时间', '暂降幅值', '持续时间'],
}
@@ -201,7 +206,18 @@ export default {
}
},
changeChild(e, item) {
- item.checked = !item.checked
+ const willCheck = e.detail.value.length > 0
+ if (willCheck && !item.checked) {
+ const selectedCount = this.store.data.filter((i) => i.checked).length
+ if (selectedCount >= this.maxSelectCount) {
+ uni.showToast({
+ title: `最多只能选择${this.maxSelectCount}条事件`,
+ icon: 'none',
+ })
+ return
+ }
+ }
+ item.checked = willCheck
this.checkedAll = this.store.data.every((item) => item.checked === true)
this.checkedTotal = this.store.data.filter((item) => item.checked === true).length
},
@@ -266,8 +282,14 @@ export default {
title: '请选择事件!',
icon: 'none',
})
- } else {
- uni.showLoading({
+ }
+ if (this.checkedTotal > this.maxSelectCount) {
+ return uni.showToast({
+ title: `最多只能选择${this.maxSelectCount}条事件`,
+ icon: 'none',
+ })
+ }
+ uni.showLoading({
title: '申请中,请稍等...',
mask: true,
})
@@ -287,7 +309,6 @@ export default {
title: '申请报告,成功!',
})
})
- }
},
isAllLineIdSame(data) {
// 获取第一个元素的lineId作为基准
diff --git a/pages/index/comp/device.vue b/pages/index/comp/device.vue
index b330a2b..86c69cd 100644
--- a/pages/index/comp/device.vue
+++ b/pages/index/comp/device.vue
@@ -46,9 +46,18 @@
-
+
+
+
diff --git a/pages/index/comp/monitoringPoint.vue b/pages/index/comp/monitoringPoint.vue
index f571195..8dfeb0f 100644
--- a/pages/index/comp/monitoringPoint.vue
+++ b/pages/index/comp/monitoringPoint.vue
@@ -14,7 +14,7 @@
-
+
{{ item.value }}
{{ item.label }}
@@ -29,8 +29,12 @@
-
+
{{ formatIndicatorTag(tag) }}
@@ -54,8 +58,12 @@
-
+
@@ -80,30 +88,43 @@
-
+
{{ child.name }} {{ child.unit ? `(${child.unit})` : '' }}
- {{ child.T
- }}
+ {{
+ child.T
+ }}
- {{ child.A }}
+ {{ child.A }}
- {{ child.B }}
+ {{ child.B }}
- {{ child.C }}
+ {{ child.C }}
@@ -115,8 +136,10 @@
更多指标
-
+
@@ -136,12 +159,20 @@
-
@@ -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',
+ })
+ }
+ },
},
}
@@ -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;
diff --git a/pages/user/login.vue b/pages/user/login.vue
index d69e563..9385bc3 100644
--- a/pages/user/login.vue
+++ b/pages/user/login.vue
@@ -93,7 +93,7 @@ import { sm3Digest } from '@/common/js/sm3.js'
export default {
data() {
return {
- checkbox: true,
+ checkbox: false,
loading: false,
loginType: 'pwd',
phone: '',
diff --git a/pages/user/register.vue b/pages/user/register.vue
index 07fd5d6..f49ceba 100644
--- a/pages/user/register.vue
+++ b/pages/user/register.vue
@@ -61,7 +61,7 @@ export default {
name: 'jiaban',
data() {
return {
- checkbox: true,
+ checkbox: false,
step: 1,
loading: false,
waitTime: 0,