用户协议优化
This commit is contained in:
@@ -488,31 +488,33 @@ export default {
|
||||
})
|
||||
}
|
||||
}
|
||||
this.topolodyData = this.$util.getDictData('Line_Position').map((item) => {
|
||||
switch (item.name) {
|
||||
case '电网侧':
|
||||
item.showKey = ['Apf_ThdA_Sys(%)']
|
||||
break
|
||||
case '负载侧':
|
||||
item.showKey = ['Apf_ThdA_Load(%)']
|
||||
break
|
||||
case '输出侧':
|
||||
item.showKey = ['Apf_RmsI_TolOut(A)']
|
||||
break
|
||||
case 'PCC公共点':
|
||||
item.showKey = []
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
return {
|
||||
label: item.name,
|
||||
linePostion: item.id,
|
||||
lat: '',
|
||||
lng: '',
|
||||
showKey: item.showKey, //要展示的指标key
|
||||
value: [],
|
||||
}
|
||||
this.$util.getDictData('Line_Position').then((res) => {
|
||||
this.topolodyData = res.map((item) => {
|
||||
switch (item.name) {
|
||||
case '电网侧':
|
||||
item.showKey = ['Apf_ThdA_Sys(%)']
|
||||
break
|
||||
case '负载侧':
|
||||
item.showKey = ['Apf_ThdA_Load(%)']
|
||||
break
|
||||
case '输出侧':
|
||||
item.showKey = ['Apf_RmsI_TolOut(A)']
|
||||
break
|
||||
case 'PCC公共点':
|
||||
item.showKey = []
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
return {
|
||||
label: item.name,
|
||||
linePostion: item.id,
|
||||
lat: '',
|
||||
lng: '',
|
||||
showKey: item.showKey, //要展示的指标key
|
||||
value: [],
|
||||
}
|
||||
})
|
||||
})
|
||||
this.init()
|
||||
},
|
||||
|
||||
@@ -15,26 +15,25 @@
|
||||
<text style="font-size: 32rpx; font-weight: 500">灿能物联</text>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<text class="hide-txt mr5" style="font-size: 28rpx">{{
|
||||
select.engineeringName || emptyEngineeringName
|
||||
}}
|
||||
<text class="hide-txt mr5" style="font-size: 28rpx"
|
||||
>{{ select.engineeringName || emptyEngineeringName }}
|
||||
</text>
|
||||
<uni-icons type="bottom" size="16" color="#111" v-if="select.engineeringName"></uni-icons>
|
||||
</template>
|
||||
</uni-nav-bar>
|
||||
<view class="index">
|
||||
<!-- 运维 -->
|
||||
<YunWei :devCount="devCount" v-if="userInfo.authorities === 'operation_manager'"/>
|
||||
<YunWei :devCount="devCount" v-if="userInfo.authorities === 'operation_manager'" />
|
||||
<!-- 专职 -->
|
||||
<ZhuanZhi :devCount="devCount" v-if="userInfo.authorities === 'market_user'"/>
|
||||
<ZhuanZhi :devCount="devCount" v-if="userInfo.authorities === 'market_user'" />
|
||||
<!-- 工程 -->
|
||||
<GongCheng :devCount="devCount" v-if="userInfo.authorities === 'engineering_user'"/>
|
||||
<GongCheng :devCount="devCount" v-if="userInfo.authorities === 'engineering_user'" />
|
||||
<!-- 主用户 -->
|
||||
<ZhuYongHu :devCount="devCount" v-if="userInfo.authorities === 'app_vip_user'"/>
|
||||
<ZhuYongHu :devCount="devCount" v-if="userInfo.authorities === 'app_vip_user'" />
|
||||
<YouKe :devCount="devCount" v-if="userInfo.authorities === 'tourist'"></YouKe>
|
||||
<template v-if="engineeringList.length">
|
||||
<view class="canneng-index-title mt20">设备列表</view>
|
||||
<Device ref="device" :store="store"/>
|
||||
<Device ref="device" :store="store" />
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
@@ -48,8 +47,8 @@ import ZhuanZhi from './comp/indexZhuanZhi.vue'
|
||||
import YouKe from './comp/indexYouKe.vue'
|
||||
import Device from './comp/device.vue'
|
||||
import list from '../../common/js/list'
|
||||
import {getDevCount} from '../../common/api/device.js'
|
||||
import {queryEngineering} from '@/common/api/engineering.js'
|
||||
import { getDevCount } from '../../common/api/device.js'
|
||||
import { queryEngineering } from '@/common/api/engineering.js'
|
||||
|
||||
export default {
|
||||
mixins: [list],
|
||||
@@ -71,7 +70,7 @@ export default {
|
||||
engineeringId: '',
|
||||
},
|
||||
engineeringList: [],
|
||||
navTabHeight: 0
|
||||
navTabHeight: 0,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -83,7 +82,7 @@ export default {
|
||||
} else {
|
||||
return '创建工程'
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
selectEngineering() {
|
||||
@@ -153,19 +152,27 @@ export default {
|
||||
item.runStatus = 1
|
||||
})
|
||||
this.devCount.engineeringListLength = this.engineeringList.length
|
||||
console.log(this.devCount);
|
||||
console.log(this.devCount)
|
||||
})
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
if (!uni.getStorageSync(this.$cacheKey.access_token)) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/user/login',
|
||||
})
|
||||
}
|
||||
this.store = this.DataSource('/cs-device-boot/EquipmentDelivery/queryEquipmentByProject')
|
||||
// #ifdef APP-PLUS
|
||||
setTimeout(() => {
|
||||
// 获取nav高度
|
||||
uni.createSelectorQuery().select('.uni-navbar').boundingClientRect((rect) => {
|
||||
this.navTabHeight = rect.height
|
||||
console.log('calc(100vh - ' + this.navTabHeight + ')')
|
||||
}).exec()
|
||||
uni.createSelectorQuery()
|
||||
.select('.uni-navbar')
|
||||
.boundingClientRect((rect) => {
|
||||
this.navTabHeight = rect.height
|
||||
console.log('calc(100vh - ' + this.navTabHeight + ')')
|
||||
})
|
||||
.exec()
|
||||
}, 1000)
|
||||
// #endif
|
||||
},
|
||||
@@ -174,7 +181,7 @@ export default {
|
||||
let access_token = uni.getStorageSync(this.$cacheKey.access_token)
|
||||
if (!access_token) {
|
||||
uni.reLaunch({
|
||||
url: `/pages/user/login`
|
||||
url: `/pages/user/login`,
|
||||
})
|
||||
} else {
|
||||
if (
|
||||
@@ -189,7 +196,6 @@ export default {
|
||||
}
|
||||
this.init()
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -26,8 +26,8 @@ export default {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
let dictData = this.$util.getDictData('app_event')
|
||||
async init() {
|
||||
let dictData = await this.$util.getDictData('app_event')
|
||||
console.log(dictData)
|
||||
this.store = this.DataSource('/cs-harmonic-boot/event/queryEventList')
|
||||
this.store.params.type = 3
|
||||
|
||||
@@ -26,8 +26,8 @@ export default {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
let dictData = this.$util.getDictData('app_event')
|
||||
async init() {
|
||||
let dictData = await this.$util.getDictData('app_event')
|
||||
console.log(dictData)
|
||||
this.store = this.DataSource('/cs-harmonic-boot/event/queryEventList')
|
||||
this.store.params.type = 2
|
||||
|
||||
@@ -1,17 +1,60 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<uni-list :border="false">
|
||||
<uni-list-item show-badge badgeType="error" isDot badge-text="未读" title="发生稳态越限监测点10个" note="2023-02-03" clickable @click="jump" />
|
||||
<uni-list-item show-badge badgeType="error" isDot badge-text="未读" title="发生稳态越限监测点10个" note="2023-02-02" clickable @click="jump" />
|
||||
<uni-list-item show-badge badgeType="error" isDot badge-text="未读" title="发生稳态越限监测点10个" note="2023-02-01" clickable @click="jump" />
|
||||
<uni-list-item badgeType="error" isDot badge-text="未读" title="发生稳态越限监测点10个" note="2023-01-31" clickable @click="jump" />
|
||||
<uni-list-item badgeType="error" isDot badge-text="未读" title="发生稳态越限监测点10个" note="2023-01-30" clickable @click="jump" />
|
||||
<uni-list-item
|
||||
show-badge
|
||||
badgeType="error"
|
||||
isDot
|
||||
badge-text="未读"
|
||||
title="发生稳态越限监测点10个"
|
||||
note="2023-02-03"
|
||||
clickable
|
||||
@click="jump"
|
||||
/>
|
||||
<uni-list-item
|
||||
show-badge
|
||||
badgeType="error"
|
||||
isDot
|
||||
badge-text="未读"
|
||||
title="发生稳态越限监测点10个"
|
||||
note="2023-02-02"
|
||||
clickable
|
||||
@click="jump"
|
||||
/>
|
||||
<uni-list-item
|
||||
show-badge
|
||||
badgeType="error"
|
||||
isDot
|
||||
badge-text="未读"
|
||||
title="发生稳态越限监测点10个"
|
||||
note="2023-02-01"
|
||||
clickable
|
||||
@click="jump"
|
||||
/>
|
||||
<uni-list-item
|
||||
badgeType="error"
|
||||
isDot
|
||||
badge-text="未读"
|
||||
title="发生稳态越限监测点10个"
|
||||
note="2023-01-31"
|
||||
clickable
|
||||
@click="jump"
|
||||
/>
|
||||
<uni-list-item
|
||||
badgeType="error"
|
||||
isDot
|
||||
badge-text="未读"
|
||||
title="发生稳态越限监测点10个"
|
||||
note="2023-01-30"
|
||||
clickable
|
||||
@click="jump"
|
||||
/>
|
||||
</uni-list>
|
||||
<uni-load-more status="nomore"></uni-load-more>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import list from "@/common/js/list";
|
||||
import list from '@/common/js/list'
|
||||
|
||||
export default {
|
||||
mixins: [list],
|
||||
@@ -24,14 +67,14 @@ export default {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
let dictData = this.$util.getDictData('app_event')
|
||||
async init() {
|
||||
let dictData = await this.$util.getDictData('app_event')
|
||||
console.log(dictData)
|
||||
this.store = this.DataSource('/cs-harmonic-boot/event/queryEventList')
|
||||
this.store.params.type = 1
|
||||
this.store.firstCallBack = (res) => {
|
||||
this.store.data.forEach(item => {
|
||||
item.title = item.equipmentName + dictData.find(item2 => item2.code === item.tag).name
|
||||
this.store.data.forEach((item) => {
|
||||
item.title = item.equipmentName + dictData.find((item2) => item2.code === item.tag).name
|
||||
})
|
||||
console.log(this.store.data)
|
||||
this.loading = false
|
||||
@@ -39,10 +82,10 @@ export default {
|
||||
this.store.reload()
|
||||
},
|
||||
jump(item) {
|
||||
let str = JSON.stringify(item).replace(/%/g,'百分比')
|
||||
uni.navigateTo({url: '/pages/message/transientDetail?detail=' + encodeURIComponent(str)})
|
||||
let str = JSON.stringify(item).replace(/%/g, '百分比')
|
||||
uni.navigateTo({ url: '/pages/message/transientDetail?detail=' + encodeURIComponent(str) })
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -51,7 +94,6 @@ export default {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
/deep/ .uni-list-item {
|
||||
background-color: $uni-theme-white !important;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
<template>
|
||||
<Cn-page :loading="loading">
|
||||
<view class="content" slot="body">
|
||||
<uni-card :title="item.title" :extra="item.status === '1'?'':'未读'" :sub-title="item.startTime"
|
||||
@click="jump(item)"
|
||||
v-for="(item,index) in store.data" :key="index">
|
||||
<uni-card
|
||||
:title="item.title"
|
||||
:extra="item.status === '1' ? '' : '未读'"
|
||||
:sub-title="item.startTime"
|
||||
@click="jump(item)"
|
||||
v-for="(item, index) in store.data"
|
||||
:key="index"
|
||||
>
|
||||
<view class="term-list-bottom">
|
||||
<view class="term-list-bottom-item">
|
||||
{{ item.engineeringName + '' + item.projectName }}
|
||||
</view>
|
||||
<view class="term-list-bottom-item" v-for="(item2,textIndex) in item.dataSet" :key="textIndex">
|
||||
<view class="term-list-bottom-item" v-for="(item2, textIndex) in item.dataSet" :key="textIndex">
|
||||
{{ item2.showName + ':' + item2.value + (item2.unit || '') }}
|
||||
</view>
|
||||
</view>
|
||||
@@ -17,11 +22,10 @@
|
||||
<uni-load-more v-if="store.data && store.data.length > 0" :status="store.status"></uni-load-more>
|
||||
</view>
|
||||
</Cn-page>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import list from "@/common/js/list";
|
||||
import list from '@/common/js/list'
|
||||
|
||||
export default {
|
||||
mixins: [list],
|
||||
@@ -34,14 +38,14 @@ export default {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
let dictData = this.$util.getDictData('app_event')
|
||||
async init() {
|
||||
let dictData = await this.$util.getDictData('app_event')
|
||||
console.log(dictData)
|
||||
this.store = this.DataSource('/cs-harmonic-boot/event/queryEventList')
|
||||
this.store.params.type = 0
|
||||
this.store.firstCallBack = (res) => {
|
||||
this.store.data.forEach(item => {
|
||||
item.title = item.equipmentName + dictData.find(item2 => item2.code === item.tag).name
|
||||
this.store.data.forEach((item) => {
|
||||
item.title = item.equipmentName + dictData.find((item2) => item2.code === item.tag).name
|
||||
})
|
||||
console.log(this.store.data)
|
||||
this.loading = false
|
||||
@@ -49,10 +53,10 @@ export default {
|
||||
this.store.reload()
|
||||
},
|
||||
jump(item) {
|
||||
let str = JSON.stringify(item).replace(/%/g,'百分比')
|
||||
uni.navigateTo({url: '/pages/message/transientDetail?detail=' + encodeURIComponent(str)})
|
||||
let str = JSON.stringify(item).replace(/%/g, '百分比')
|
||||
uni.navigateTo({ url: '/pages/message/transientDetail?detail=' + encodeURIComponent(str) })
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -21,17 +21,13 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
created() {
|
||||
let dictData = uni.getStorageSync(this.$cacheKey.dictData)
|
||||
dictData.forEach((item) => {
|
||||
if (item.code === 'appInformationType') {
|
||||
item.children.forEach((item2) => {
|
||||
if (item2.code === 'User_Agreement') {
|
||||
queryAppInfoByType(item2.id).then((res) => {
|
||||
this.value = res.data.content
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
async onLoad() {
|
||||
let dictData = await this.$util.getDictData('appInformationType')
|
||||
dictData.forEach((item2) => {
|
||||
if (item2.code === 'User_Agreement') {
|
||||
queryAppInfoByType(item2.id).then((res) => {
|
||||
this.value = res.data.content
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@@ -21,17 +21,13 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
created() {
|
||||
let dictData = uni.getStorageSync(this.$cacheKey.dictData)
|
||||
dictData.forEach((item) => {
|
||||
if (item.code === 'appInformationType') {
|
||||
item.children.forEach((item2) => {
|
||||
if (item2.code === 'Personal_Infor_Protect') {
|
||||
queryAppInfoByType(item2.id).then((res) => {
|
||||
this.value = res.data.content
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
async onLoad() {
|
||||
let dictData = await this.$util.getDictData('appInformationType')
|
||||
dictData.forEach((item2) => {
|
||||
if (item2.code === 'Personal_Infor_Protect') {
|
||||
queryAppInfoByType(item2.id).then((res) => {
|
||||
this.value = res.data.content
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user