用户修改
This commit is contained in:
@@ -150,9 +150,7 @@ export default {
|
||||
this.store.params.pageSize = 999
|
||||
this.store.params.engineerId = this.select.engineeringId
|
||||
this.store.reload()
|
||||
this.store.firstCallBack = () => {
|
||||
console.log(this.store)
|
||||
}
|
||||
|
||||
},
|
||||
getProjectList() {
|
||||
getProjectList({
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
<view class="index-zhuyonghu">
|
||||
<div class="header">
|
||||
<div class="header-item">
|
||||
<div class="header-item-value">3</div>
|
||||
<div class="header-item-value">{{ devCount.onLineCount || 0 }}</div>
|
||||
<div class="header-item-label">正常设备</div>
|
||||
</div>
|
||||
<div class="header-item">
|
||||
<div class="header-item-value">1</div>
|
||||
<div class="header-item-value">{{ devCount.alarmLineCount || 0 }}</div>
|
||||
<div class="header-item-label">报警设备</div>
|
||||
</div>
|
||||
<div class="header-item">
|
||||
<div class="header-item-value">0</div>
|
||||
<div class="header-item-value">{{ devCount.offLineCount || 0 }}</div>
|
||||
<div class="header-item-label">离线设备</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -30,7 +30,12 @@ export default {
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
|
||||
props: {
|
||||
devCount: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
submitFeedBack() {
|
||||
uni.navigateTo({ url: '/pages/home/feedback' })
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
<view class="index-zhuyonghu">
|
||||
<div class="header">
|
||||
<div class="header-item">
|
||||
<div class="header-item-value">3</div>
|
||||
<div class="header-item-value">{{ devCount.onLineCount || 0 }}</div>
|
||||
<div class="header-item-label">正常设备</div>
|
||||
</div>
|
||||
<div class="header-item">
|
||||
<div class="header-item-value">1</div>
|
||||
<div class="header-item-value">{{ devCount.alarmLineCount || 0 }}</div>
|
||||
<div class="header-item-label">报警设备</div>
|
||||
</div>
|
||||
<div class="header-item">
|
||||
<div class="header-item-value">0</div>
|
||||
<div class="header-item-value">{{ devCount.offLineCount || 0 }}</div>
|
||||
<div class="header-item-label">离线设备</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -18,7 +18,12 @@
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
||||
props: {
|
||||
devCount: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss"></style>
|
||||
|
||||
@@ -2,21 +2,28 @@
|
||||
<view class="index-zhuyonghu">
|
||||
<div class="header">
|
||||
<div class="header-item">
|
||||
<div class="header-item-value">3</div>
|
||||
<div class="header-item-value">{{ devCount.onLineCount || 0 }}</div>
|
||||
<div class="header-item-label">正常设备</div>
|
||||
</div>
|
||||
<div class="header-item">
|
||||
<div class="header-item-value">1</div>
|
||||
<div class="header-item-value">{{ devCount.alarmLineCount || 0 }}</div>
|
||||
<div class="header-item-label">报警设备</div>
|
||||
</div>
|
||||
<div class="header-item">
|
||||
<div class="header-item-value">0</div>
|
||||
<div class="header-item-value">{{ devCount.offLineCount || 0 }}</div>
|
||||
<div class="header-item-label">离线设备</div>
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {}
|
||||
export default {
|
||||
props: {
|
||||
devCount: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss"></style>
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
<view class="index-zhuyonghu">
|
||||
<div class="header">
|
||||
<div class="header-item">
|
||||
<div class="header-item-value">3</div>
|
||||
<div class="header-item-value">{{ devCount.onLineCount || 0 }}</div>
|
||||
<div class="header-item-label">正常设备</div>
|
||||
</div>
|
||||
<div class="header-item">
|
||||
<div class="header-item-value">1</div>
|
||||
<div class="header-item-value">{{ devCount.alarmLineCount || 0 }}</div>
|
||||
<div class="header-item-label">报警设备</div>
|
||||
</div>
|
||||
<div class="header-item">
|
||||
<div class="header-item-value">0</div>
|
||||
<div class="header-item-value">{{ devCount.offLineCount || 0 }}</div>
|
||||
<div class="header-item-label">离线设备</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -30,7 +30,12 @@ export default {
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
|
||||
props: {
|
||||
devCount: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
submitFeedBack() {
|
||||
uni.navigateTo({ url: '/pages/home/feedback' })
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
<div class="header-item-label">设备总数</div>
|
||||
</div>
|
||||
<div class="header-item">
|
||||
<div class="header-item-value">1</div>
|
||||
<div class="header-item-value">{{ devCount.onLineCount || 0 }}</div>
|
||||
<div class="header-item-label">正常设备</div>
|
||||
</div>
|
||||
<div class="header-item" @click="projectWarning">
|
||||
<div class="header-item-value">4</div>
|
||||
<div class="header-item-value">{{ devCount.alarmLineCount || 0 }}</div>
|
||||
<div class="header-item-label">报警设备</div>
|
||||
</div>
|
||||
<div class="header-item">
|
||||
<div class="header-item-value">3</div>
|
||||
<div class="header-item-value">{{ devCount.offLineCount || 0 }}</div>
|
||||
<div class="header-item-label">离线设备</div>
|
||||
</div>
|
||||
<div class="header-item">
|
||||
@@ -34,38 +34,44 @@
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
props: {
|
||||
devCount: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
projectWarning () {
|
||||
projectWarning() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/zhuanzhi/warning'
|
||||
url: '/pages/zhuanzhi/warning',
|
||||
})
|
||||
},
|
||||
projectNum () {
|
||||
projectNum() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/project/list'
|
||||
url: '/pages/project/list',
|
||||
})
|
||||
},
|
||||
jump (item) {
|
||||
jump(item) {
|
||||
if (item.name.indexOf('APF') > -1) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/device/APF/detail'
|
||||
url: '/pages/device/APF/detail',
|
||||
})
|
||||
} else if (item.name.indexOf('DVR') > -1) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/device/DVR/detail'
|
||||
url: '/pages/device/DVR/detail',
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
created(){
|
||||
},
|
||||
created() {},
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
.index-zhuanzhi {}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.index-zhuanzhi {
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
<view slot="body">
|
||||
<view class="index">
|
||||
<!-- 运维 -->
|
||||
<YunWei v-if="userInfo.authorities === 'operation_manager'" />
|
||||
<YunWei :devCount="devCount" v-if="userInfo.authorities === 'operation_manager'" />
|
||||
<!-- 专职 -->
|
||||
<ZhuanZhi v-if="userInfo.authorities === 'market_user'" />
|
||||
<ZhuanZhi :devCount="devCount" v-if="userInfo.authorities === 'market_user'" />
|
||||
<!-- 工程 -->
|
||||
<GongCheng v-if="userInfo.authorities === 'engineering_user'" />
|
||||
<GongCheng :devCount="devCount" v-if="userInfo.authorities === 'engineering_user'" />
|
||||
<!-- 主用户 -->
|
||||
<ZhuYongHu v-if="userInfo.authorities === 'app_vip_user'" />
|
||||
<YouKe v-if="userInfo.authorities === 'tourist'"> </YouKe>
|
||||
<ZhuYongHu :devCount="devCount" v-if="userInfo.authorities === 'app_vip_user'" />
|
||||
<YouKe :devCount="devCount" v-if="userInfo.authorities === 'tourist'"> </YouKe>
|
||||
<Device ref="device" :store="store" />
|
||||
</view>
|
||||
</view>
|
||||
@@ -24,7 +24,7 @@ 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'
|
||||
export default {
|
||||
mixins: [list],
|
||||
components: {
|
||||
@@ -39,6 +39,7 @@ export default {
|
||||
return {
|
||||
loading: false,
|
||||
userInfo: {},
|
||||
devCount: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -60,6 +61,11 @@ export default {
|
||||
},
|
||||
onLoad() {
|
||||
this.store = this.DataSource('/cs-device-boot/EquipmentDelivery/queryEquipmentByProject')
|
||||
this.store.firstCallBack = () => {
|
||||
getDevCount(this.store.params.engineerId).then((res) => {
|
||||
this.devCount = res.data
|
||||
})
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||
|
||||
Reference in New Issue
Block a user