提交app
This commit is contained in:
204
App.vue
204
App.vue
@@ -4,6 +4,7 @@ import { getImageUrl } from '@/common/api/basic'
|
||||
|
||||
export default {
|
||||
onLaunch: function () {
|
||||
// this.checkAppUpdate()
|
||||
// uni.onPushMessage((res) => {
|
||||
// console.log("收到推送消息:",res) //监听推送消息
|
||||
// })
|
||||
@@ -39,6 +40,209 @@ export default {
|
||||
onHide: function () {
|
||||
console.log('App Hide')
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 1. 检查应用更新(已分平台:安卓 + iOS)
|
||||
checkAppUpdate() {
|
||||
// 开发环境跳过检查
|
||||
const isDev = process.env.NODE_ENV === 'development'
|
||||
if (isDev) {
|
||||
return console.log('开发环境,不执行更新检查')
|
||||
}
|
||||
let isforce = 1
|
||||
// uni.showModal({
|
||||
// title: '更新提示',
|
||||
// content: '发现新版本,是否立即更新?',
|
||||
// showCancel: isforce == '0', // 强制更新隐藏取消按钮
|
||||
// confirmText: '去更新',
|
||||
// success: (modalRes) => {
|
||||
// if (modalRes.confirm) {
|
||||
// this.downloadAndInstallApk('http://112.4.144.18:8040/shiningCloud/file/canneng_wulian.apk')
|
||||
// } else {
|
||||
// }
|
||||
// },
|
||||
// })
|
||||
// 获取当前应用信息
|
||||
plus.runtime.getProperty(plus.runtime.appid, (info) => {
|
||||
const currentVersion = info.version // 当前本地版本号
|
||||
|
||||
// 调用 API 获取服务器上的最新版本信息
|
||||
getLastestVersion()
|
||||
.then((res) => {
|
||||
if (!res.data) {
|
||||
return
|
||||
}
|
||||
const { version, appFileList, iosUrl } = res?.data || {}
|
||||
// let isforce = 1
|
||||
// 版本不一样才更新
|
||||
if (currentVersion != version) {
|
||||
// ==============================================
|
||||
// 🔴 关键:判断手机系统(安卓 / iOS)
|
||||
// ==============================================
|
||||
const isAndroid = plus.os.name === 'Android'
|
||||
const isIos = plus.os.name === 'iOS'
|
||||
|
||||
// ----------------------
|
||||
// ① iOS:跳 App Store
|
||||
// ----------------------
|
||||
if (isIos) {
|
||||
uni.showModal({
|
||||
title: '更新提示',
|
||||
content: '发现新版本,请前往 App Store 更新',
|
||||
showCancel: isforce === '0', // 强制更新隐藏取消按钮
|
||||
confirmText: '去更新',
|
||||
success: (modalRes) => {
|
||||
if (modalRes.confirm) {
|
||||
// 跳转到 App Store 链接
|
||||
plus.runtime.openURL(iosUrl)
|
||||
|
||||
// 强制更新:退出 App
|
||||
if (isforce !== '0') {
|
||||
plus.runtime.quit()
|
||||
}
|
||||
} else {
|
||||
// 不更新直接退出 App(强制)
|
||||
if (isforce !== '0') {
|
||||
plus.runtime.quit()
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// ----------------------
|
||||
// ② Android:下载安装
|
||||
// ----------------------
|
||||
if (isAndroid) {
|
||||
uni.showModal({
|
||||
title: '更新提示',
|
||||
content: '发现新版本,是否立即更新?',
|
||||
showCancel: isforce === '0', // 强制更新隐藏取消按钮
|
||||
confirmText: '去更新',
|
||||
success: (modalRes) => {
|
||||
if (modalRes.confirm) {
|
||||
// 跳转到 App Store 链接
|
||||
this.downloadAndInstallApk(appFileList[0].filePath)
|
||||
}
|
||||
},
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log('获取版本接口失败', err)
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 2. 安卓专用:下载并安装 APK
|
||||
downloadAndInstallApk(url) {
|
||||
// 防止重复点击下载
|
||||
if (this.downloadLoading) return
|
||||
this.downloadLoading = true
|
||||
|
||||
uni.showLoading({
|
||||
title: '正在下载更新...',
|
||||
mask: true, // 加遮罩,防止重复点
|
||||
})
|
||||
|
||||
// 下载配置(修复路径、覆盖安装)
|
||||
const options = {
|
||||
filename: '_doc/update/canneng_wulian.apk', // 固定文件名,更稳定
|
||||
timeout: 120, // 超时时间
|
||||
}
|
||||
|
||||
// 创建下载任务
|
||||
const downloadTask = plus.downloader.createDownload(url, options, (downloadedFile, status) => {
|
||||
this.downloadLoading = false
|
||||
uni.hideLoading()
|
||||
|
||||
if (status === 200) {
|
||||
// 开始安装
|
||||
plus.runtime.install(
|
||||
downloadedFile.filename,
|
||||
{
|
||||
force: true, // 强制覆盖安装
|
||||
},
|
||||
() => {
|
||||
uni.showModal({
|
||||
title: '安装成功',
|
||||
content: '请重启APP',
|
||||
showCancel: false,
|
||||
confirmText: '确定',
|
||||
success() {
|
||||
plus.runtime.restart()
|
||||
},
|
||||
})
|
||||
},
|
||||
(e) => {
|
||||
console.error('安装失败', e)
|
||||
uni.showModal({
|
||||
title: '安装失败',
|
||||
content: '请开启安装权限后重试:' + e.message,
|
||||
confirmText: '重试',
|
||||
success: () => {
|
||||
this.downloadAndInstallApk(url)
|
||||
},
|
||||
})
|
||||
},
|
||||
)
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '下载失败',
|
||||
content: '网络异常或下载链接失效',
|
||||
confirmText: '重试',
|
||||
success: () => {
|
||||
this.downloadAndInstallApk(url)
|
||||
},
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
// 下载进度(优化体验)
|
||||
downloadTask.addEventListener('statechanged', (task) => {
|
||||
if (task.state === 3 && task.totalSize > 0) {
|
||||
const percent = ((task.downloadedSize / task.totalSize) * 100).toFixed(0)
|
||||
uni.showLoading({
|
||||
title: `正在下载更新 ${percent}%`,
|
||||
mask: true,
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
// 开始下载
|
||||
downloadTask.start()
|
||||
},
|
||||
|
||||
// downloadAndInstallApk(url) {
|
||||
// uni.showLoading({ title: '下载新版本...' })
|
||||
|
||||
// const downloadTask = plus.downloader.createDownload(
|
||||
// url,
|
||||
// { filename: '_doc/update/' },
|
||||
// (downloadedFile, status) => {
|
||||
// uni.hideLoading()
|
||||
// if (status === 200) {
|
||||
// plus.runtime.install(
|
||||
// downloadedFile.filename,
|
||||
// { force: true },
|
||||
// () => {
|
||||
// // 安装成功
|
||||
// },
|
||||
// (e) => {
|
||||
// uni.showToast({ title: '安装失败: ' + e.message, icon: 'none' })
|
||||
// },
|
||||
// )
|
||||
// } else {
|
||||
// uni.showToast({ title: '下载失败', icon: 'none' })
|
||||
// }
|
||||
// },
|
||||
// )
|
||||
// downloadTask.start()
|
||||
// },
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const debug = true // true 是连地服务端本地,false 是连接线上
|
||||
|
||||
const development = {
|
||||
domain: 'http://192.168.2.126:10215',
|
||||
domain: 'http://192.168.1.103:10215',
|
||||
}
|
||||
|
||||
const production = {
|
||||
|
||||
@@ -228,8 +228,8 @@ export default {
|
||||
|
||||
// 在线
|
||||
.zx-tag {
|
||||
background-color: #67c23a20;
|
||||
color: #67c23a;
|
||||
background-color: #10b98120;
|
||||
color: #10b981;
|
||||
}
|
||||
.lx-tag {
|
||||
background-color: #ff3b3020;
|
||||
|
||||
@@ -212,6 +212,12 @@ export default {
|
||||
}
|
||||
})
|
||||
this._hide()
|
||||
console.log('🚀 ~ rt:', rt)
|
||||
|
||||
if (rt.length == 0) return
|
||||
if (this.singleChoice) {
|
||||
if (rt[0].rank != 3) return
|
||||
}
|
||||
this.$emit('confirm', rt)
|
||||
},
|
||||
//扁平化树结构
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
"/api" : {
|
||||
"https" : true,
|
||||
// "target" : "https://pqmcn.com:8092/api",
|
||||
"target" : "http://192.168.2.126:10215",
|
||||
"target" : "http://192.168.1.103:10215",
|
||||
"changOrigin" : true,
|
||||
"pathRewrite" : {
|
||||
"/api" : ""
|
||||
|
||||
15
pages.json
15
pages.json
@@ -46,7 +46,13 @@
|
||||
{
|
||||
"path": "pages/index/report",
|
||||
"style": {
|
||||
"navigationBarTitleText": "报表"
|
||||
"navigationBarTitleText": "报表",
|
||||
"enablePullDownRefresh": true, // 开启下拉刷新
|
||||
"pullToRefresh": {
|
||||
"support":true,
|
||||
"style": "circle",
|
||||
"color":"#007aff"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -161,7 +167,12 @@
|
||||
"path": "pages/device/APF/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "APF 设备名称 + 型号",
|
||||
"enablePullDownRefresh": true
|
||||
"enablePullDownRefresh": true,
|
||||
"pullToRefresh": {
|
||||
"support":true,
|
||||
"style": "circle",
|
||||
"color":"#007aff"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,19 +1,25 @@
|
||||
<template>
|
||||
<view class="basic">
|
||||
<view>
|
||||
<uni-load-more status="loading" v-if="IOData.length == 0"></uni-load-more>
|
||||
<view class="basic" v-else>
|
||||
<view class="grid-card">
|
||||
<view class="grid-card-title">温度</view>
|
||||
<view class="grid-card-content-4">
|
||||
<template v-for="item in renderData">
|
||||
<view class="item item-title">{{ item[0].clDid }}
|
||||
<view class="item item-title"
|
||||
>{{ item[0].clDid }}
|
||||
<template v-if="item[0].clDid"> (°C)</template>
|
||||
</view>
|
||||
<view class="item item-title">{{ item[1].clDid }}
|
||||
<view class="item item-title"
|
||||
>{{ item[1].clDid }}
|
||||
<template v-if="item[1].clDid"> (°C)</template>
|
||||
</view>
|
||||
<view class="item item-title">{{ item[2].clDid }}
|
||||
<view class="item item-title"
|
||||
>{{ item[2].clDid }}
|
||||
<template v-if="item[2].clDid"> (°C)</template>
|
||||
</view>
|
||||
<view class="item item-title">{{ item[3].clDid }}
|
||||
<view class="item item-title"
|
||||
>{{ item[3].clDid }}
|
||||
<template v-if="item[3].clDid"> (°C)</template>
|
||||
</view>
|
||||
<view class="item">{{ item[0].clDid ? Math.round(item[0].value) || '-' : '' }}</view>
|
||||
@@ -24,20 +30,27 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 运维管理员、工程用户 可看 -->
|
||||
<view class="grid-card" v-if="userInfo.authorities=='operation_manager'||userInfo.authorities=='engineering_user'">
|
||||
<view
|
||||
class="grid-card"
|
||||
v-if="userInfo.authorities == 'operation_manager' || userInfo.authorities == 'engineering_user'"
|
||||
>
|
||||
<view class="grid-card-title">状态</view>
|
||||
<view class="grid-card-content-4">
|
||||
<template v-for="(item, index) in moduleData">
|
||||
<view class="item item-title">{{ item[0].moduleName }}
|
||||
<view class="item item-title"
|
||||
>{{ item[0].moduleName }}
|
||||
<template v-if="item[0].moduleName"></template>
|
||||
</view>
|
||||
<view class="item item-title">{{ item[1].moduleName }}
|
||||
<view class="item item-title"
|
||||
>{{ item[1].moduleName }}
|
||||
<template v-if="item[1].moduleName"></template>
|
||||
</view>
|
||||
<view class="item item-title">{{ item[2].moduleName }}
|
||||
<view class="item item-title"
|
||||
>{{ item[2].moduleName }}
|
||||
<template v-if="item[2].moduleName"></template>
|
||||
</view>
|
||||
<view class="item item-title">{{ item[3].moduleName }}
|
||||
<view class="item item-title"
|
||||
>{{ item[3].moduleName }}
|
||||
<template v-if="item[3].moduleName"></template>
|
||||
</view>
|
||||
<!-- <uni-tag :text="item[0].moduleState" :type=" item[0].moduleState=='离线'?'error' : 'success'" /> -->
|
||||
@@ -62,13 +75,11 @@
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getModuleState
|
||||
} from '@/common/api/harmonic.js'
|
||||
import { getModuleState } from '@/common/api/harmonic.js'
|
||||
export default {
|
||||
|
||||
props: {
|
||||
IOData: {
|
||||
type: Array,
|
||||
@@ -84,7 +95,7 @@
|
||||
return {
|
||||
list: [],
|
||||
userInfo: {},
|
||||
flag: false
|
||||
flag: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -93,7 +104,8 @@
|
||||
// 把IOData转换成每4个一组的二维数组
|
||||
for (let i = 0; i < this.IOData.length; i += 4) {
|
||||
this.IOData.slice(i, i + 4).forEach((item) => {
|
||||
if (Number.isInteger(item.value) || item.value == '') {} else {
|
||||
if (Number.isInteger(item.value) || item.value == '') {
|
||||
} else {
|
||||
item.value = (item.value - 0).toFixed(2)
|
||||
}
|
||||
})
|
||||
@@ -133,7 +145,7 @@
|
||||
methods: {
|
||||
info() {
|
||||
getModuleState({
|
||||
id: this.ndid
|
||||
id: this.ndid,
|
||||
}).then((res) => {
|
||||
this.list = res.data
|
||||
})
|
||||
@@ -147,5 +159,6 @@
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.basic {}
|
||||
.basic {
|
||||
}
|
||||
</style>
|
||||
@@ -1,5 +1,7 @@
|
||||
<template>
|
||||
<view class="basic">
|
||||
<view>
|
||||
<uni-load-more status="loading" v-if="basicData.length == 0"></uni-load-more>
|
||||
<view class="basic" v-else>
|
||||
<view class="grid-card">
|
||||
<view class="grid-card-title">电网电流</view>
|
||||
<view class="grid-card-content-3">
|
||||
@@ -47,10 +49,14 @@
|
||||
<template v-for="(item, index) in renderData.负载电流">
|
||||
<view class="item">{{ item.phase }}</view>
|
||||
<view class="item">{{
|
||||
item['Apf_RmsI_Load(A)'] > 0 ? item['Apf_RmsI_Load(A)'].toFixed(2) : item['Apf_RmsI_Load(A)']
|
||||
item['Apf_RmsI_Load(A)'] > 0
|
||||
? item['Apf_RmsI_Load(A)'].toFixed(2)
|
||||
: item['Apf_RmsI_Load(A)']
|
||||
}}</view>
|
||||
<view class="item">{{
|
||||
item['Apf_ThdA_Load(%)'] > 0 ? item['Apf_ThdA_Load(%)'].toFixed(2) : item['Apf_ThdA_Load(%)']
|
||||
item['Apf_ThdA_Load(%)'] > 0
|
||||
? item['Apf_ThdA_Load(%)'].toFixed(2)
|
||||
: item['Apf_ThdA_Load(%)']
|
||||
}}</view>
|
||||
</template>
|
||||
</view>
|
||||
@@ -64,19 +70,24 @@
|
||||
<template v-for="(item, index) in renderData.补偿电流">
|
||||
<view class="item">{{ item.phase }}</view>
|
||||
<view class="item">{{
|
||||
item['Apf_RmsI_TolOut(A)'] == 3.1415926 ? '-' :
|
||||
item['Apf_RmsI_TolOut(A)'] > 0
|
||||
item['Apf_RmsI_TolOut(A)'] == 3.1415926
|
||||
? '-'
|
||||
: item['Apf_RmsI_TolOut(A)'] > 0
|
||||
? item['Apf_RmsI_TolOut(A)'].toFixed(2)
|
||||
: item['Apf_RmsI_TolOut(A)']
|
||||
}}</view>
|
||||
<view class="item">{{
|
||||
item['load_Rate'] == 3.1415926 ? '-' : item['load_Rate'] > 0 ? item['load_Rate'].toFixed(2) :
|
||||
item['load_Rate']
|
||||
item['load_Rate'] == 3.1415926
|
||||
? '-'
|
||||
: item['load_Rate'] > 0
|
||||
? item['load_Rate'].toFixed(2)
|
||||
: item['load_Rate']
|
||||
}}</view>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
@@ -168,5 +179,6 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.basic {}
|
||||
.basic {
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<template>
|
||||
<view class="basic">
|
||||
<view>
|
||||
<uni-load-more status="loading" v-if="basicData.length == 0"></uni-load-more>
|
||||
<view class="basic" v-else>
|
||||
<view class="grid-card">
|
||||
<view class="grid-card-title">电网侧</view>
|
||||
<view class="grid-card-content-5">
|
||||
@@ -10,11 +12,14 @@
|
||||
<view class="item item-title">功率因数</view>
|
||||
<template v-for="(item, index) in renderData.电网侧">
|
||||
<view class="item">{{ item.phase }}</view>
|
||||
<view class="item">{{ item['Apf_P_Sys(W)'] == '-' ? '-' : (item['Apf_P_Sys(W)'] / 1000).toFixed(2) }}
|
||||
<view class="item"
|
||||
>{{ item['Apf_P_Sys(W)'] == '-' ? '-' : (item['Apf_P_Sys(W)'] / 1000).toFixed(2) }}
|
||||
</view>
|
||||
<view class="item">{{ item['Apf_Q_Sys(Var)'] == '-' ? '-' : (item['Apf_Q_Sys(Var)'] / 1000).toFixed(2) }}
|
||||
<view class="item"
|
||||
>{{ item['Apf_Q_Sys(Var)'] == '-' ? '-' : (item['Apf_Q_Sys(Var)'] / 1000).toFixed(2) }}
|
||||
</view>
|
||||
<view class="item">{{ item['Apf_S_Sys(VA)'] == '-' ? '-' : (item['Apf_S_Sys(VA)'] / 1000).toFixed(2) }}
|
||||
<view class="item"
|
||||
>{{ item['Apf_S_Sys(VA)'] == '-' ? '-' : (item['Apf_S_Sys(VA)'] / 1000).toFixed(2) }}
|
||||
</view>
|
||||
<view class="item">{{ item['Apf_PF_Sys(null)'] || '-' }}</view>
|
||||
</template>
|
||||
@@ -30,17 +35,21 @@
|
||||
<view class="item item-title">功率因数</view>
|
||||
<template v-for="(item, index) in renderData.负载侧">
|
||||
<view class="item">{{ item.phase }}</view>
|
||||
<view class="item">{{ item['Apf_P_Load(W)'] == '-' ? '-' : (item['Apf_P_Load(W)'] / 1000).toFixed(2) }}
|
||||
<view class="item"
|
||||
>{{ item['Apf_P_Load(W)'] == '-' ? '-' : (item['Apf_P_Load(W)'] / 1000).toFixed(2) }}
|
||||
</view>
|
||||
<view class="item">{{ item['Apf_Q_Load(Var)'] == '-' ? '-' : (item['Apf_Q_Load(Var)'] / 1000).toFixed(2)
|
||||
<view class="item">{{
|
||||
item['Apf_Q_Load(Var)'] == '-' ? '-' : (item['Apf_Q_Load(Var)'] / 1000).toFixed(2)
|
||||
}}</view>
|
||||
<view class="item">{{ item['Apf_S_Load(VA)'] == '-' ? '-' : (item['Apf_S_Load(VA)'] / 1000).toFixed(2) }}
|
||||
<view class="item"
|
||||
>{{ item['Apf_S_Load(VA)'] == '-' ? '-' : (item['Apf_S_Load(VA)'] / 1000).toFixed(2) }}
|
||||
</view>
|
||||
<view class="item">{{ item['Apf_PF_Load(null)'] || '-' }}</view>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
@@ -121,5 +130,6 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.basic {}
|
||||
.basic {
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-load-more status="loading" v-if="basicData.length == 0"></uni-load-more>
|
||||
|
||||
<view v-else>
|
||||
<div class="header-form">
|
||||
<uni-data-select
|
||||
v-model="parity"
|
||||
@@ -23,6 +26,7 @@
|
||||
<view style="width: 100%; height: 100%"><l-echart ref="chartRef" @finished="init"></l-echart></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -133,7 +137,6 @@ export default {
|
||||
show: true,
|
||||
position: 'right',
|
||||
fontSize: '8px',
|
||||
|
||||
},
|
||||
},
|
||||
barGap: '10%',
|
||||
@@ -298,7 +301,11 @@ barCateGoryGap:20,
|
||||
},
|
||||
initEcharts() {
|
||||
setTimeout(() => {
|
||||
if(this.renderData['电网侧']['Apf_HarmI'][Object.keys(this.renderData['电网侧']['Apf_HarmI'])[0]] == undefined) return
|
||||
if (
|
||||
this.renderData['电网侧']['Apf_HarmI'][Object.keys(this.renderData['电网侧']['Apf_HarmI'])[0]] ==
|
||||
undefined
|
||||
)
|
||||
return
|
||||
let obj = JSON.parse(
|
||||
JSON.stringify(
|
||||
this.renderData['电网侧']['Apf_HarmI'][Object.keys(this.renderData['电网侧']['Apf_HarmI'])[0]],
|
||||
@@ -340,17 +347,20 @@ barCateGoryGap:20,
|
||||
})
|
||||
.filter((item) => {
|
||||
return item % 2 === this.parity - 1
|
||||
}).reverse()
|
||||
this.option.series[0].data = Object.values(this.renderData['电网侧'][name1][name2]).filter(
|
||||
(item, index) => {
|
||||
})
|
||||
.reverse()
|
||||
this.option.series[0].data = Object.values(this.renderData['电网侧'][name1][name2])
|
||||
.filter((item, index) => {
|
||||
return index % 2 === this.parity - 1
|
||||
},
|
||||
).reverse().map(item=>item.toFixed(2))
|
||||
this.option.series[1].data = Object.values(this.renderData['负载侧'][name1][name2]).filter(
|
||||
(item, index) => {
|
||||
})
|
||||
.reverse()
|
||||
.map((item) => item.toFixed(2))
|
||||
this.option.series[1].data = Object.values(this.renderData['负载侧'][name1][name2])
|
||||
.filter((item, index) => {
|
||||
return index % 2 === this.parity - 1
|
||||
},
|
||||
).reverse().map(item=>item.toFixed(2))
|
||||
})
|
||||
.reverse()
|
||||
.map((item) => item.toFixed(2))
|
||||
this.init()
|
||||
}, 100)
|
||||
},
|
||||
|
||||
@@ -186,7 +186,7 @@ export default {
|
||||
content: [
|
||||
{
|
||||
iconPath: '/static/report.png',
|
||||
text: '告警',
|
||||
text: '详情',
|
||||
},
|
||||
// {
|
||||
// iconPath: '/static/record.png',
|
||||
@@ -196,10 +196,10 @@ export default {
|
||||
iconPath: '/static/about.png',
|
||||
text: '关于',
|
||||
},
|
||||
{
|
||||
iconPath: '/static/access.png',
|
||||
text: '接入',
|
||||
},
|
||||
// {
|
||||
// iconPath: '/static/access.png',
|
||||
// text: '接入',
|
||||
// },
|
||||
],
|
||||
client: null,
|
||||
timer: null,
|
||||
@@ -243,7 +243,7 @@ export default {
|
||||
this.$util.toast('下载成功')
|
||||
} else if (e.text === '记录') {
|
||||
uni.navigateTo({ url: '/pages/device/APF/record' })
|
||||
} else if (e.text === '告警') {
|
||||
} else if (e.text === '详情') {
|
||||
uni.navigateTo({ url: '/pages/device/APF/report?id=' + this.devId })
|
||||
} else if (e.text === '关于') {
|
||||
uni.navigateTo({ url: '/pages/device/APF/about?id=' + this.devId })
|
||||
@@ -353,7 +353,7 @@ export default {
|
||||
this.downloadImg()
|
||||
uni.setNavigationBarTitle({ title: this.deviceInfo.devName || '设备详情' })
|
||||
this.topolodyData = this.topolodyData.filter((item) => {
|
||||
let index = this.deviceInfo.appsLineTopologyDiagramPO.findIndex((element) => {
|
||||
let index = this.deviceInfo.appsLineTopologyDiagramPO?.findIndex((element) => {
|
||||
element.label = element.name
|
||||
item.label = element.name
|
||||
return element.linePostion === item.linePostion
|
||||
@@ -577,6 +577,12 @@ export default {
|
||||
text: '用户',
|
||||
})
|
||||
}
|
||||
if (this.userInfo.authorities === 'operation_manager') {
|
||||
this.content.push({
|
||||
iconPath: '/static/access.png',
|
||||
text: '接入',
|
||||
})
|
||||
}
|
||||
}
|
||||
this.$util.getDictData('Line_Position').then((res) => {
|
||||
this.topolodyData = res.map((item) => {
|
||||
|
||||
@@ -90,20 +90,20 @@ export default {
|
||||
content: [
|
||||
{
|
||||
iconPath: '/static/report.png',
|
||||
text: '告警',
|
||||
},
|
||||
{
|
||||
iconPath: '/static/record.png',
|
||||
text: '记录',
|
||||
text: '详情',
|
||||
},
|
||||
// {
|
||||
// iconPath: '/static/record.png',
|
||||
// text: '记录',
|
||||
// },
|
||||
{
|
||||
iconPath: '/static/about.png',
|
||||
text: '关于',
|
||||
},
|
||||
{
|
||||
iconPath: '/static/access.png',
|
||||
text: '接入',
|
||||
},
|
||||
// {
|
||||
// iconPath: '/static/access.png',
|
||||
// text: '接入',
|
||||
// },
|
||||
],
|
||||
}
|
||||
},
|
||||
@@ -128,7 +128,7 @@ export default {
|
||||
this.$util.toast('下载成功')
|
||||
} else if (e.text === '记录') {
|
||||
uni.navigateTo({ url: '/pages/device/DVR/record' })
|
||||
} else if (e.text === '告警') {
|
||||
} else if (e.text === '详情') {
|
||||
uni.navigateTo({ url: '/pages/device/DVR/report' })
|
||||
} else if (e.text === '关于') {
|
||||
uni.navigateTo({ url: '/pages/device/DVR/about' })
|
||||
@@ -195,6 +195,12 @@ export default {
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
if (this.userInfo.authorities === 'operation_manager') {
|
||||
this.content.push({
|
||||
iconPath: '/static/access.png',
|
||||
text: '接入',
|
||||
})
|
||||
}
|
||||
setTimeout(() => {
|
||||
// 获取nav高度
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
@finished="initChart('echartV3', 'echartsDataV3')"
|
||||
></l-echart>
|
||||
</view>
|
||||
<view class="text"> 电压有效值 </view>
|
||||
<view class="text"> 电压有效值(kV) </view>
|
||||
</view>
|
||||
<view class="middle" style="width: 100%">
|
||||
<l-echart
|
||||
@@ -103,7 +103,7 @@
|
||||
@finished="initChart('echartA3', 'echartsDataA3')"
|
||||
></l-echart>
|
||||
</view>
|
||||
<view class="text"> 电压有效值 </view>
|
||||
<view class="text"> 电流有效值(A) </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -125,6 +125,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<hover-menu :btnList="content" @trigger="trigger"></hover-menu>
|
||||
</view>
|
||||
</Cn-page>
|
||||
</template>
|
||||
@@ -133,12 +134,14 @@ const echarts = require('../../../uni_modules/lime-echart/static/echarts.min')
|
||||
import { MQTT_IP, MQTT_OPTIONS } from '@/common/js/mqtt.js'
|
||||
import mqtt from 'mqtt/dist/mqtt.js'
|
||||
import { getBaseRealData } from '@/common/api/harmonic.js'
|
||||
import hoverMenu from '@/hover-menu/components/hover-menu/hover-menu.vue'
|
||||
export default {
|
||||
components: {},
|
||||
components: { hoverMenu },
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
devId: '',
|
||||
// 使用上面定义的图表配置项
|
||||
option: {},
|
||||
echartsData0: {},
|
||||
@@ -183,30 +186,72 @@ export default {
|
||||
equipmentName: '',
|
||||
runStatus: 1,
|
||||
connection: false,
|
||||
content: [
|
||||
{
|
||||
iconPath: '/static/report.png',
|
||||
text: '详情',
|
||||
},
|
||||
{
|
||||
iconPath: '/static/about.png',
|
||||
text: '关于',
|
||||
},
|
||||
],
|
||||
isPrimaryUser: 0,
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log('🚀 ~ options:', options)
|
||||
this.lineKey = 0
|
||||
this.devId = options.id
|
||||
this.lineList = JSON.parse(options.lineList)
|
||||
this.lineId = this.lineList[0].lineId
|
||||
this.engineeringName = options.engineeringName
|
||||
this.equipmentName = options.equipmentName
|
||||
this.runStatus = options.runStatus
|
||||
this.isPrimaryUser = options.isPrimaryUser
|
||||
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||
this.echartsData0 = this.initEcharts0()
|
||||
this.echartsData1 = this.initEcharts1()
|
||||
this.echartsDataV1 = this.initEcharts('#DAA520', 0, 'A相(kV)')
|
||||
this.echartsDataV2 = this.initEcharts('#2E8B57', 0, 'B相(kV)')
|
||||
this.echartsDataV3 = this.initEcharts('#A52a2a', 0, 'C相(kV)')
|
||||
this.echartsDataA1 = this.initEcharts('#DAA520', 1, 'A相(A)')
|
||||
this.echartsDataA2 = this.initEcharts('#2E8B57', 1, 'B相(A)')
|
||||
this.echartsDataA3 = this.initEcharts('#A52a2a', 1, 'C相(A)')
|
||||
this.echartsDataV1 = this.initEcharts('#DAA520', 0, 'A相')
|
||||
this.echartsDataV2 = this.initEcharts('#2E8B57', 0, 'B相')
|
||||
this.echartsDataV3 = this.initEcharts('#A52a2a', 0, 'C相')
|
||||
this.echartsDataA1 = this.initEcharts('#DAA520', 1, 'A相')
|
||||
this.echartsDataA2 = this.initEcharts('#2E8B57', 1, 'B相')
|
||||
this.echartsDataA3 = this.initEcharts('#A52a2a', 1, 'C相')
|
||||
this.loading = false
|
||||
this.$nextTick(() => {
|
||||
this.setMqtt(0)
|
||||
this.initMqtt()
|
||||
})
|
||||
if (this.isPrimaryUser == 1) {
|
||||
this.content.splice(
|
||||
0,
|
||||
0,
|
||||
{
|
||||
iconPath: '/static/transfer.png',
|
||||
text: '移交',
|
||||
},
|
||||
{
|
||||
iconPath: '/static/feedback.png',
|
||||
text: '编辑',
|
||||
},
|
||||
{
|
||||
iconPath: '/static/delate.png',
|
||||
text: '删除',
|
||||
},
|
||||
)
|
||||
if (this.userInfo.authorities === 'app_vip_user') {
|
||||
this.content.splice(3, 0, {
|
||||
iconPath: '/static/share.png',
|
||||
text: '分享',
|
||||
})
|
||||
}
|
||||
}
|
||||
if (this.userInfo.authorities !== 'tourist') {
|
||||
this.content.splice(0, 0, {
|
||||
iconPath: '/static/subordinate.png',
|
||||
text: '用户',
|
||||
})
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
const charts = [
|
||||
@@ -623,7 +668,9 @@ export default {
|
||||
.then((res) => {
|
||||
if (res.code == 'A0000') {
|
||||
this.connection = true
|
||||
setTimeout(() => {
|
||||
this.$util.toast(e == 0 ? '连接成功!' : '刷新成功!')
|
||||
}, 3000)
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer)
|
||||
this.timer = null
|
||||
@@ -878,6 +925,46 @@ export default {
|
||||
await this.setMqtt(0)
|
||||
await this.initMqtt()
|
||||
},
|
||||
trigger(e) {
|
||||
console.log(e)
|
||||
if (e.text === '分享') {
|
||||
uni.navigateTo({ url: '/pages/device/share?id=' + this.lineId })
|
||||
} else if (e.text === '删除') {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定删除该设备吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定')
|
||||
deleteDevice(this.devId).then((res) => {
|
||||
uni.showToast({
|
||||
title: '删除成功',
|
||||
icon: 'none',
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1500)
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消')
|
||||
}
|
||||
},
|
||||
})
|
||||
} else if (e.text === '记录') {
|
||||
uni.navigateTo({ url: '/pages/device/APF/record' })
|
||||
} else if (e.text === '详情') {
|
||||
uni.navigateTo({ url: '/pages/device/APF/report?id=' + this.devId })
|
||||
} else if (e.text === '关于') {
|
||||
uni.navigateTo({ url: '/pages/device/APF/about?id=' + this.devId })
|
||||
} else if (e.text === '移交') {
|
||||
uni.navigateTo({ url: '/pages/device/transfer?id=' + this.devId })
|
||||
} else if (e.text === '反馈') {
|
||||
uni.navigateTo({ url: '/pages/device/feedback' })
|
||||
} else if (e.text === '用户') {
|
||||
uni.navigateTo({ url: '/pages/device/user?id=' + this.devId + '&isPrimaryUser=' + this.isPrimaryUser })
|
||||
}
|
||||
// this.$refs.fab.close()
|
||||
},
|
||||
},
|
||||
|
||||
computed: {},
|
||||
@@ -990,7 +1077,7 @@ export default {
|
||||
}
|
||||
.text {
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.text_center {
|
||||
position: absolute;
|
||||
|
||||
@@ -70,12 +70,6 @@ export default {
|
||||
} else {
|
||||
this.selectList.push(e.engineerId)
|
||||
}
|
||||
|
||||
csMarketDataAdd({
|
||||
engineerIds: this.selectList,
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
})
|
||||
},
|
||||
init() {
|
||||
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||
@@ -108,15 +102,22 @@ export default {
|
||||
})
|
||||
},
|
||||
},
|
||||
onUnload() {
|
||||
csMarketDataAdd({
|
||||
engineerIds: this.selectList,
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
})
|
||||
},
|
||||
onBackPress() {
|
||||
console.log('onBackPress')
|
||||
let engineering = uni.getStorageSync('engineering')
|
||||
queryEngineering().then(res => {
|
||||
queryEngineering().then((res) => {
|
||||
if (res.data.length === 0) {
|
||||
uni.removeStorage({
|
||||
key: this.$cacheKey.engineering,
|
||||
})
|
||||
} else if (engineering && !res.data.some(item => item.id = engineering.id)) {
|
||||
} else if (engineering && !res.data.some((item) => (item.id = engineering.id))) {
|
||||
uni.removeStorage({
|
||||
key: this.$cacheKey.engineering,
|
||||
})
|
||||
|
||||
@@ -107,9 +107,7 @@ export default {
|
||||
array: ['发生时间', '暂降深度', '持续时间'],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.setHeight()
|
||||
},
|
||||
mounted() {},
|
||||
|
||||
methods: {
|
||||
setHeight() {
|
||||
@@ -118,10 +116,10 @@ export default {
|
||||
.boundingClientRect((rect) => {
|
||||
//
|
||||
// #ifdef H5
|
||||
this.height = rect?.height + 100 || 0
|
||||
this.height = rect?.height + 170 || 0
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
this.height = rect?.height + 90 || 0
|
||||
this.height = rect?.height + 100 || 0
|
||||
// #endif
|
||||
})
|
||||
.exec()
|
||||
@@ -129,7 +127,9 @@ export default {
|
||||
async select(val) {
|
||||
this.selectValue = val
|
||||
await this.init()
|
||||
setTimeout(() => {
|
||||
this.setHeight()
|
||||
}, 200)
|
||||
},
|
||||
init() {
|
||||
this.store = this.DataSource('/cs-harmonic-boot/eventUser/queryEventpage')
|
||||
|
||||
@@ -35,13 +35,12 @@
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding: 20rpx 20rpx 0">
|
||||
<!-- <view style="padding: 20rpx 20rpx 0">
|
||||
<Cn-grid title="">
|
||||
<Cn-grid-item src="/static/device2.png" text="设备注册" @click="registerDevice"></Cn-grid-item>
|
||||
<!-- <Cn-grid-item src="/static/gateway2.png" text="网关注册" @click="registerGateway"></Cn-grid-item> -->
|
||||
<Cn-grid-item src="/static/feedback2.png" text="问题反馈" @click="submitFeedBack"></Cn-grid-item>
|
||||
</Cn-grid>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -35,11 +35,11 @@
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage('0')">
|
||||
<view class="header-item-value">{{ devCount.eventCount || 0 }}</view>
|
||||
<view class="header-item-value">{{ devCount.currentEventCount || 0 }}</view>
|
||||
<view class="header-item-label">暂态事件数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage('1')">
|
||||
<view class="header-item-value">{{ devCount.harmonicCount || 0 }}</view>
|
||||
<view class="header-item-value">{{ devCount.currentHarmonicCount || 0 }}</view>
|
||||
<view class="header-item-label">稳态事件数</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view class="dateReport">
|
||||
<!-- {{ height }} -->
|
||||
<!-- <view class="pd20">
|
||||
<uni-segmented-control
|
||||
:current="curSub"
|
||||
@@ -97,7 +98,7 @@ export default {
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
this.setHeight()
|
||||
// this.setHeight()
|
||||
},
|
||||
methods: {
|
||||
setHeight() {
|
||||
@@ -106,7 +107,7 @@ export default {
|
||||
.boundingClientRect((rect) => {
|
||||
//
|
||||
// #ifdef H5
|
||||
this.height = rect?.height + 20 || 0
|
||||
this.height = rect?.height + 80 || 0
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
this.height = rect?.height + 30 || 0
|
||||
@@ -136,10 +137,11 @@ export default {
|
||||
|
||||
select(value) {
|
||||
this.selectValue = value
|
||||
this.init()
|
||||
setTimeout(() => {
|
||||
this.setHeight()
|
||||
}, 100)
|
||||
}, 200)
|
||||
this.init()
|
||||
|
||||
},
|
||||
// 下载
|
||||
download(item) {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<!-- 申请报告 -->
|
||||
<view v-show="curSub == 0">
|
||||
<!-- apply -->
|
||||
<Apply :navHeight="navHeight" />
|
||||
<Apply ref="applyRef" :navHeight="navHeight" />
|
||||
</view>
|
||||
|
||||
<!-- 申请记录 -->
|
||||
@@ -158,10 +158,10 @@ export default {
|
||||
.boundingClientRect((rect) => {
|
||||
//
|
||||
// #ifdef H5
|
||||
this.height = rect?.height + 115 || 0
|
||||
this.height = rect?.height + 180 || 0
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
this.height = rect?.height + 10 || 0
|
||||
this.height = rect?.height + 110 || 0
|
||||
// #endif
|
||||
})
|
||||
.exec()
|
||||
@@ -174,9 +174,11 @@ export default {
|
||||
this.store.reload()
|
||||
},
|
||||
async select(val) {
|
||||
setTimeout(() => {
|
||||
this.setHeight()
|
||||
}, 200)
|
||||
this.selectValue = val
|
||||
await this.init()
|
||||
this.setHeight()
|
||||
},
|
||||
|
||||
sectionChange(index) {
|
||||
@@ -270,6 +272,19 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
// 刷新
|
||||
reload() {
|
||||
console.log(123, this.curSub)
|
||||
|
||||
switch (this.curSub) {
|
||||
case 0:
|
||||
this.$refs.applyRef.store.reload()
|
||||
break
|
||||
case 1:
|
||||
this.store && this.store.reload()
|
||||
break
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
}
|
||||
@@ -340,4 +355,9 @@ export default {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.segmented-control {
|
||||
flex: 1;
|
||||
margin-right: 24rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -41,18 +41,18 @@
|
||||
<view class="mine-nav-label">扫一扫</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
<view class="mine-nav" @click="jump('engineering')">
|
||||
<view class="mine-nav" @click="jump('engineering')" v-if="userInfo.authorities !== 'tourist'">
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/gongcheng.png" />
|
||||
<view class="mine-nav-label">工程管理</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
|
||||
<view class="mine-nav" @click="jump('project')">
|
||||
<view class="mine-nav" @click="jump('project')" v-if="userInfo.authorities !== 'tourist'">
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/project.png" />
|
||||
<view class="mine-nav-label">项目管理</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
<view class="mine-nav" @click="jump('feedback')">
|
||||
<view class="mine-nav" @click="jump('feedback')" v-if="userInfo.authorities !== 'tourist'">
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/feedback.png" />
|
||||
<view class="mine-nav-label">反馈列表</view>
|
||||
<uni-badge :text="messageCount.feedBackCount"></uni-badge>
|
||||
@@ -67,24 +67,24 @@
|
||||
<view class="mine-nav-label">网关列表</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view> -->
|
||||
<view class="mine-nav" @click="jump('setupMessage')">
|
||||
<view class="mine-nav" @click="jump('setupMessage')" v-if="userInfo.authorities !== 'tourist'">
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/message4.png" />
|
||||
<view class="mine-nav-label">推送通知设置</view>
|
||||
<view class="mine-nav-label">推送通知配置</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
<view
|
||||
class="mine-nav"
|
||||
@click="jump('engineering/setting')"
|
||||
v-if="userInfo.authorities === 'engineering_user'"
|
||||
v-if="userInfo.authorities === 'engineering_user' || userInfo.authorities !== 'tourist'"
|
||||
>
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/like.png" />
|
||||
<view class="mine-nav-label">关注工程配置</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
<view class="mine-nav" @click="jump('transientSetting')" >
|
||||
<view class="mine-nav" @click="jump('transientSetting')" v-if="userInfo.authorities !== 'tourist'">
|
||||
<!-- 调试内容配置 serverSetting-->
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/server2.png" />
|
||||
<view class="mine-nav-label">暂态事件</view>
|
||||
<view class="mine-nav-label">暂态统计配置</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
<view class="mine-nav" @click="jump('setup')" style="border-bottom: none">
|
||||
@@ -118,21 +118,20 @@
|
||||
<uni-popup ref="message" type="message">
|
||||
<uni-popup-message type="info" :duration="0" style="width: 90%; margin: 5%">
|
||||
<view style="color: #909399; font-style: 16px">相机权限使用说明:</view>
|
||||
<view style="color: #6c6c6c; margin-top: 3rpx; "> 用于相机扫描二维码!</view>
|
||||
<view style="color: #6c6c6c; margin-top: 3rpx"> 用于相机扫描二维码!</view>
|
||||
</uni-popup-message>
|
||||
</uni-popup>
|
||||
<yk-authpup ref="authpup" type="top" @changeAuth="changeAuth" permissionID="CAMERA"></yk-authpup>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { roleUpdate, autoLogin } from '@/common/api/user'
|
||||
import { transferDevice, shareDevice } from '@/common/api/device'
|
||||
import ykAuthpup from "@/components/yk-authpup/yk-authpup";
|
||||
import ykAuthpup from '@/components/yk-authpup/yk-authpup'
|
||||
export default {
|
||||
components: {
|
||||
ykAuthpup
|
||||
ykAuthpup,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -191,7 +190,7 @@ export default {
|
||||
},
|
||||
changeAuth() {
|
||||
//这里是权限通过后执行自己的代码逻辑
|
||||
console.log('权限已授权,可执行自己的代码逻辑了');
|
||||
console.log('权限已授权,可执行自己的代码逻辑了')
|
||||
// this.handleScon()
|
||||
this.handleScon()
|
||||
},
|
||||
@@ -206,13 +205,11 @@ export default {
|
||||
// this.$refs.alertDialog.open('bottom')
|
||||
this.$refs['authpup'].open()
|
||||
// this.$refs.message.open()
|
||||
|
||||
} else {
|
||||
console.log(2)
|
||||
this.handleScon()
|
||||
}
|
||||
|
||||
|
||||
break
|
||||
case 'login':
|
||||
uni.navigateTo({
|
||||
@@ -281,7 +278,9 @@ export default {
|
||||
},
|
||||
})
|
||||
},
|
||||
dialogClose(){this.$refs.message.close()},
|
||||
dialogClose() {
|
||||
this.$refs.message.close()
|
||||
},
|
||||
transferDevice(id) {
|
||||
transferDevice(id).then((res) => {
|
||||
uni.navigateTo({ url: '/pages/mine/result?type=transferDevice&id=' + id })
|
||||
@@ -380,4 +379,3 @@ export default {
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view :loading="loading" class="report" style="padding-top: 10px">
|
||||
|
||||
<view class="navReport">
|
||||
<view class="tabsBox">
|
||||
<uni-segmented-control
|
||||
@@ -14,6 +15,7 @@
|
||||
<!-- 稳态报表 -->
|
||||
<SteadyState
|
||||
v-if="curTabs == 0"
|
||||
ref="SteadyStateRef"
|
||||
:indexList="indexList"
|
||||
:total="total"
|
||||
:status="status"
|
||||
@@ -23,6 +25,7 @@
|
||||
<!-- 暂态报表 -->
|
||||
<Transient
|
||||
v-if="curTabs == 1"
|
||||
ref="TransientRef"
|
||||
:indexList="indexList"
|
||||
:total="total"
|
||||
:status="status"
|
||||
@@ -51,58 +54,25 @@ export default {
|
||||
|
||||
navHeight: 0,
|
||||
|
||||
indexList: [
|
||||
{
|
||||
name: '测试监测点',
|
||||
item: '2022-01-01至2022-01-01',
|
||||
type: '1',
|
||||
status: '1',
|
||||
},
|
||||
{
|
||||
name: '测试监测点',
|
||||
item: '2022-01-01至2022-01-01',
|
||||
type: '2',
|
||||
status: '1',
|
||||
},
|
||||
{
|
||||
name: '测试监测点',
|
||||
item: '2022-01-01至2022-01-01',
|
||||
type: '1',
|
||||
status: '1',
|
||||
},
|
||||
{
|
||||
name: '测试监测点',
|
||||
item: '2022-01-01至2022-01-01',
|
||||
type: '1',
|
||||
status: '0',
|
||||
},
|
||||
{
|
||||
name: '测试监测点',
|
||||
item: '2022-01-01至2022-01-01',
|
||||
type: '1',
|
||||
status: '0',
|
||||
},
|
||||
{
|
||||
name: '测试监测点',
|
||||
item: '2022-01-01至2022-01-01',
|
||||
type: '1',
|
||||
status: '0',
|
||||
},
|
||||
],
|
||||
indexList: [],
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
onPullDownRefresh() {
|
||||
this.refresh()
|
||||
},
|
||||
mounted() {
|
||||
uni.createSelectorQuery()
|
||||
.select('.navReport')
|
||||
.boundingClientRect((rect) => {
|
||||
//
|
||||
// #ifdef H5
|
||||
this.navHeight = rect.height + 65
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
this.navHeight = rect.height + 25
|
||||
// #endif
|
||||
this.navHeight = rect.height
|
||||
// // #ifdef H5
|
||||
|
||||
// // #endif
|
||||
// // #ifdef APP-PLUS
|
||||
// this.navHeight = rect.height
|
||||
// // #endif
|
||||
})
|
||||
.exec()
|
||||
},
|
||||
@@ -127,6 +97,16 @@ export default {
|
||||
this.status = 'more'
|
||||
}, 1000)
|
||||
},
|
||||
refresh() {
|
||||
switch (this.curTabs) {
|
||||
case 0:
|
||||
this.$refs.SteadyStateRef.store.reload()
|
||||
break
|
||||
case 1:
|
||||
this.$refs.TransientRef.reload()
|
||||
break
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
computed: {},
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
<view class="mb5"> 项目名称:{{ detail.projectName }} </view>
|
||||
<view class="mb5"> 工程名称:{{ detail.engineeringName }} </view>
|
||||
<view class="mb5"> 暂态类型:{{ detail.showName }}</view>
|
||||
<view class="mb5"> 持续时间:{{ detail.evtParamTm }}</view>
|
||||
<view class="mb5"> 幅值:{{ detail.evtParamVVaDepth }}</view>
|
||||
<view class="mb5"> 相别:{{ detail.evtParamPhase }}</view>
|
||||
<view class="mb5"> 持续时间:{{ detail.evtParamTm || '-' }}%</view>
|
||||
<view class="mb5"> 幅值:{{ detail.evtParamVVaDepth || '-' }}s</view>
|
||||
<view class="mb5"> 相别:{{ 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> -->
|
||||
|
||||
@@ -3,14 +3,20 @@
|
||||
<!-- 稳态 -->
|
||||
<view class="transientBox">
|
||||
<view class="statistics pd20">
|
||||
<view class="box" :class="{ boxClick: item.label == '稳态数量' }" v-for="item in list">
|
||||
<view
|
||||
class="box"
|
||||
:class="{ boxClick: item.label == filterValue }"
|
||||
v-for="item in list"
|
||||
@click="filterValue = item.label"
|
||||
>
|
||||
<text class="num">{{ item.value }}</text>
|
||||
<text class="label">{{ item.label }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 卡片 -->
|
||||
<!-- 稳态数量 -->
|
||||
<scroll-view
|
||||
v-if="filterValue == '稳态数量'"
|
||||
scroll-y="true"
|
||||
@refresherrefresh="refresherrefresh"
|
||||
:refresher-triggered="triggered"
|
||||
@@ -66,6 +72,17 @@
|
||||
></uni-load-more>
|
||||
<Cn-empty v-else style="top: 20%"></Cn-empty>
|
||||
</scroll-view>
|
||||
<!-- 越限天数 -->
|
||||
<view v-if="filterValue == '越限天数'">
|
||||
<uni-calendar
|
||||
:insert="true"
|
||||
:lunar="false"
|
||||
:date="startData"
|
||||
:selected="selected"
|
||||
:start-date="startData"
|
||||
:end-date="endData"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
@@ -86,11 +103,20 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
height: 0,
|
||||
filterValue: '稳态数量',
|
||||
list: [
|
||||
{ value: 0, label: '稳态数量' },
|
||||
{ value: 0, label: '越限天数' },
|
||||
{ value: 0, label: '越限测点数' },
|
||||
],
|
||||
startData: '',
|
||||
endData: '',
|
||||
selected: [
|
||||
{ date: '2026-04-10', info: '' },
|
||||
{ date: '2026-04-11', info: '' },
|
||||
{ date: '2026-04-12', info: '' },
|
||||
// { date: '2026-04-13', info: '' },
|
||||
],
|
||||
triggered: true,
|
||||
status: 'noMore', //more加载前 loading加载中 noMore加载后
|
||||
}
|
||||
@@ -125,11 +151,14 @@ export default {
|
||||
this.store.params.devId = this.selectValue.deviceId
|
||||
this.store.params.lineId = this.selectValue.lineId
|
||||
this.store.params.time = this.selectValue.date
|
||||
|
||||
this.store.loadedCallback = () => {
|
||||
this.list[0].value = this.store.copyData.harmonicNums
|
||||
this.list[1].value = this.store.copyData.overDays
|
||||
this.list[2].value = this.store.copyData.overLineNums
|
||||
this.loading = false
|
||||
this.startData = this.$util.getMonthFirstAndLastDay(this.selectValue.date).firstDay
|
||||
this.endData = this.$util.getMonthFirstAndLastDay(this.selectValue.date).lastDay
|
||||
}
|
||||
this.store.reload()
|
||||
},
|
||||
@@ -202,4 +231,44 @@ 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;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .uni-calendar-item__weeks-box-text {
|
||||
z-index: 1;
|
||||
}
|
||||
/deep/ .uni-calendar-item__weeks-box-circle {
|
||||
position: absolute;
|
||||
top: 9px;
|
||||
right: 9px;
|
||||
width: 39px;
|
||||
height: 39px;
|
||||
border-radius: 50%;
|
||||
z-index: 0;
|
||||
background-color: #e43d33;
|
||||
}
|
||||
/* 核心:选中圆圈下的 子元素(日期数字) */
|
||||
/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__header {
|
||||
pointer-events: none !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -95,9 +95,9 @@
|
||||
<!-- 详情区域 -->
|
||||
<view class="event-detail">
|
||||
<text>
|
||||
发生时间:{{ item.startTime }},幅值:{{ item.evtParamVVaDepth }},持续时间:{{
|
||||
item.evtParamTm
|
||||
}},相别:{{ item.evtParamPhase }}
|
||||
发生时间:{{ item.startTime }},幅值:{{ item.evtParamVVaDepth || '-' }}%,持续时间:{{
|
||||
item.evtParamTm || '-'
|
||||
}}s,相别:{{ item.evtParamPhase || '-' }}
|
||||
</text>
|
||||
</view>
|
||||
</uni-card>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<!-- @click="jump('about')" -->
|
||||
<view class="mine-nav" style="border-bottom: none">
|
||||
<view class="mine-nav-label">版本信息</view>
|
||||
<view style="color: #828282; font-size: 14rpx">当前版本V<1.6.7</view>
|
||||
<view style="color: #828282; font-size: 14rpx">当前版本V{{ version }}</view>
|
||||
<!-- <uni-icons type="forward" color="#aaa" size="20"></uni-icons> -->
|
||||
</view>
|
||||
<view class="mine-nav" @click="jump('layout')" style="margin-top: 20rpx; border-bottom: none">
|
||||
@@ -64,10 +64,19 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
version: '1.0.0',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async init() {},
|
||||
async init() {
|
||||
const isDev = process.env.NODE_ENV === 'development'
|
||||
if (isDev) {
|
||||
return console.log('开发环境,不执行更新检查')
|
||||
}
|
||||
plus.runtime.getProperty(plus.runtime.appid, (info) => {
|
||||
this.version = info.version // 当前本地版本号
|
||||
})
|
||||
},
|
||||
jump(type) {
|
||||
switch (type) {
|
||||
case 'changePwd':
|
||||
|
||||
Reference in New Issue
Block a user