|
@ -1,7 +1,7 @@ |
|
|
<template> |
|
|
<template> |
|
|
<el-row :gutter="20" class="panel-group" type="flex" justify="space-between"> |
|
|
<el-row :gutter="20" class="panel-group" type="flex" justify="space-between"> |
|
|
<el-col class="card-panel-col"> |
|
|
<el-col class="card-panel-col"> |
|
|
<div class="card-panel danganzongliang" @click="handleSetLineChartData('newVisitis')"> |
|
|
|
|
|
|
|
|
<div class="card-panel danganzongliang" @click="handleSetLineChartData('archives')"> |
|
|
<div class="card-panel-icon-wrapper icon-people"> |
|
|
<div class="card-panel-icon-wrapper icon-people"> |
|
|
<svg-icon icon-class="danganzongliang" class-name="card-panel-icon" /> |
|
|
<svg-icon icon-class="danganzongliang" class-name="card-panel-icon" /> |
|
|
</div> |
|
|
</div> |
|
@ -14,7 +14,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col class="card-panel-col"> |
|
|
<el-col class="card-panel-col"> |
|
|
<div class="card-panel danganhezongliang" @click="handleSetLineChartData('messages')"> |
|
|
|
|
|
|
|
|
<div class="card-panel danganhezongliang" @click="handleSetLineChartData('case')"> |
|
|
<div class="card-panel-icon-wrapper icon-message"> |
|
|
<div class="card-panel-icon-wrapper icon-message"> |
|
|
<svg-icon icon-class="danganhezongliang" class-name="card-panel-icon" /> |
|
|
<svg-icon icon-class="danganhezongliang" class-name="card-panel-icon" /> |
|
|
</div> |
|
|
</div> |
|
@ -27,7 +27,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col class="card-panel-col"> |
|
|
<el-col class="card-panel-col"> |
|
|
<div class="card-panel quanbushebei" @click="handleSetLineChartData('purchases')"> |
|
|
|
|
|
|
|
|
<div class="card-panel quanbushebei" @click="handleSetLineChartData('device')"> |
|
|
<div class="card-panel-icon-wrapper icon-money"> |
|
|
<div class="card-panel-icon-wrapper icon-money"> |
|
|
<svg-icon icon-class="quanbushebei" class-name="card-panel-icon" /> |
|
|
<svg-icon icon-class="quanbushebei" class-name="card-panel-icon" /> |
|
|
</div> |
|
|
</div> |
|
@ -41,7 +41,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col class="card-panel-col"> |
|
|
<el-col class="card-panel-col"> |
|
|
<div class="card-panel zaixianshebei" @click="handleSetLineChartData('shoppings')"> |
|
|
|
|
|
|
|
|
<div class="card-panel zaixianshebei" @click="handleSetLineChartData('device')"> |
|
|
<div class="card-panel-icon-wrapper icon-shopping"> |
|
|
<div class="card-panel-icon-wrapper icon-shopping"> |
|
|
<svg-icon icon-class="zaixianshebei" class-name="card-panel-icon" /> |
|
|
<svg-icon icon-class="zaixianshebei" class-name="card-panel-icon" /> |
|
|
</div> |
|
|
</div> |
|
@ -55,7 +55,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col class="card-panel-col"> |
|
|
<el-col class="card-panel-col"> |
|
|
<div class="card-panel lixianshebei" @click="handleSetLineChartData('shoppings')"> |
|
|
|
|
|
|
|
|
<div class="card-panel lixianshebei" @click="handleSetLineChartData('device')"> |
|
|
<div class="card-panel-icon-wrapper icon-shopping"> |
|
|
<div class="card-panel-icon-wrapper icon-shopping"> |
|
|
<svg-icon icon-class="lixianshebei" class-name="card-panel-icon" /> |
|
|
<svg-icon icon-class="lixianshebei" class-name="card-panel-icon" /> |
|
|
</div> |
|
|
</div> |
|
@ -76,6 +76,7 @@ import CountTo from 'vue-count-to' |
|
|
import { FetchGetArchivesNum, FetchGetCaseNum } from '@/api/archivesManage/statistics' |
|
|
import { FetchGetArchivesNum, FetchGetCaseNum } from '@/api/archivesManage/statistics' |
|
|
import { getDeviceList } from '@/api/storeManage/deviceManage/device' |
|
|
import { getDeviceList } from '@/api/storeManage/deviceManage/device' |
|
|
import { getOnlineDevice } from '@/api/home/device' |
|
|
import { getOnlineDevice } from '@/api/home/device' |
|
|
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
components: { |
|
|
components: { |
|
@ -91,6 +92,11 @@ export default { |
|
|
offlineDeviceNum: 0 |
|
|
offlineDeviceNum: 0 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
computed: { |
|
|
|
|
|
...mapGetters([ |
|
|
|
|
|
'roles' |
|
|
|
|
|
]) |
|
|
|
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
this.handleArchivesNum() |
|
|
this.handleArchivesNum() |
|
|
this.handleCaseNum() |
|
|
this.handleCaseNum() |
|
@ -98,7 +104,41 @@ export default { |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
handleSetLineChartData(type) { |
|
|
handleSetLineChartData(type) { |
|
|
this.$emit('handleSetLineChartData', type) |
|
|
|
|
|
|
|
|
// this.$emit('handleSetLineChartData', type) |
|
|
|
|
|
if (type === 'archives') { |
|
|
|
|
|
if (this.roles.includes('archivesList:list') || this.roles.includes('admin')) { |
|
|
|
|
|
this.$router.push({ |
|
|
|
|
|
name: 'ArchivesList' |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '当前账号没有权限', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} else if (type === 'case') { |
|
|
|
|
|
if (this.roles.includes('caseManage:list') || this.roles.includes('admin')) { |
|
|
|
|
|
this.$router.push({ |
|
|
|
|
|
name: 'caseManage' |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '当前账号没有权限', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} else if (type === 'device') { |
|
|
|
|
|
if (this.roles.includes('deviceManage:list') || this.roles.includes('admin')) { |
|
|
|
|
|
this.$router.push({ |
|
|
|
|
|
name: 'DeviceManage' |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '当前账号没有权限', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
// 档案总数 |
|
|
// 档案总数 |
|
|
handleArchivesNum() { |
|
|
handleArchivesNum() { |
|
@ -132,6 +172,7 @@ export default { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.card-panel { |
|
|
.card-panel { |
|
|
|
|
|
cursor: pointer; |
|
|
height: 100px; |
|
|
height: 100px; |
|
|
// height: 108px; |
|
|
// height: 108px; |
|
|
// cursor: pointer; |
|
|
// cursor: pointer; |
|
|