|
@@ -1,8 +1,17 @@
|
|
|
<template>
|
|
|
<div class="container">
|
|
|
<el-row :gutter="20" class="normal-margin">
|
|
|
- <el-col :span="6" v-for="o in 4" :key="o">
|
|
|
- <div class="normal-card"></div>
|
|
|
+ <el-col :span="6">
|
|
|
+ <user :data="dataOverview.user"></user>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <flow ref="flow" :data="dataOverview.flow"></flow>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <sms ref="sms" :data="dataOverview.sms"></sms>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <storage ref="storage" :data="dataOverview.storage"></storage>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div class="normal-card normal-margin " shadow="none" v-for="item in modulesList" :key="item.systemid">
|
|
@@ -10,7 +19,7 @@
|
|
|
<el-row :gutter="20">
|
|
|
<el-col style="margin-top:16px" :span="4" v-for="modules in item.modules" :key="modules.systemmoduleid" @click.native="redictToModules(modules)">
|
|
|
<div class="modules-item flex-align-center">
|
|
|
- <img width="50" height="50" src="../../assets/modules_icon.png" alt="">
|
|
|
+ <img width="50" height="50" :src="modules.iconurl" alt="">
|
|
|
<p>{{modules.systemmodulename}}<br><small class="info">{{(modules.systemmodule).toUpperCase()}}</small></p>
|
|
|
</div>
|
|
|
</el-col>
|
|
@@ -20,10 +29,22 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import user from './modules/user.vue'
|
|
|
+import flow from './modules/flow.vue'
|
|
|
+import sms from './modules/sms.vue'
|
|
|
+import storage from './modules/storage.vue'
|
|
|
+
|
|
|
export default {
|
|
|
+ components:{
|
|
|
+ user,
|
|
|
+ flow,
|
|
|
+ sms,
|
|
|
+ storage
|
|
|
+ },
|
|
|
data () {
|
|
|
return {
|
|
|
- modulesList:[]
|
|
|
+ modulesList:[],
|
|
|
+ dataOverview:{}
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
@@ -31,10 +52,22 @@ export default {
|
|
|
this.$router.push({path:item.apps[0].path})
|
|
|
sessionStorage.setItem('active_modules',JSON.stringify(item))
|
|
|
window.sessionStorage.setItem('currentPath',item.apps[0].path)
|
|
|
- }
|
|
|
+ },
|
|
|
+ async getDataOverview () {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "classname": "webmanage.dataanalysis.data",
|
|
|
+ "method": "getDataOverview",
|
|
|
+ "content": {}
|
|
|
+ })
|
|
|
+ this.dataOverview = res.data
|
|
|
+ this.$refs.flow.piePlot.changeData([{num:res.data.flow.unUsed,type:'未使用'},{num:res.data.flow.used,type:'已使用'}])
|
|
|
+ this.$refs.sms.piePlot.changeData([{num:res.data.sms.total - res.data.sms.used,type:'未使用'},{num:res.data.sms.used,type:'已使用'}])
|
|
|
+ this.$refs.storage.piePlot.changeData([{num:res.data.storage.unUsed,type:'未使用'},{num:res.data.storage.used,type:'已使用'}])
|
|
|
+ },
|
|
|
},
|
|
|
mounted () {
|
|
|
this.modulesList = JSON.parse(sessionStorage.getItem('module_info'))
|
|
|
+ this.getDataOverview()
|
|
|
}
|
|
|
}
|
|
|
|