|
@@ -1,58 +1,25 @@
|
|
<template>
|
|
<template>
|
|
<div class="statistics-tabs">
|
|
<div class="statistics-tabs">
|
|
- <el-row
|
|
|
|
- :gutter="16"
|
|
|
|
- type="flex"
|
|
|
|
- >
|
|
|
|
- <el-col
|
|
|
|
- v-for="(tab, index) in tabList"
|
|
|
|
- :key="index"
|
|
|
|
- :span="4"
|
|
|
|
- >
|
|
|
|
- <el-dropdown
|
|
|
|
- v-if="tab.children && tab.children.length"
|
|
|
|
- placement="bottom"
|
|
|
|
- @command="commandHandler"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-row :gutter="16" type="flex">
|
|
|
|
+ <el-col v-for="(tab, index) in tabList" :key="index" :span="4">
|
|
|
|
+ <el-dropdown v-if="tab.children && tab.children.length" placement="bottom" @command="commandHandler">
|
|
<div :class="['tab-bar', { 'tab-active': activeIndex === index }]">
|
|
<div :class="['tab-bar', { 'tab-active': activeIndex === index }]">
|
|
- <img
|
|
|
|
- class="tab-icon"
|
|
|
|
- :src="activeIndex === index ? activeIcon : defaultIcon"
|
|
|
|
- :alt="tab.title"
|
|
|
|
- >
|
|
|
|
- <el-tooltip
|
|
|
|
- :content="tab.title"
|
|
|
|
- placement="top"
|
|
|
|
- >
|
|
|
|
|
|
+ <img class="tab-icon" :src="activeIndex === index ? activeIcon : defaultIcon" :alt="tab.title">
|
|
|
|
+ <el-tooltip :content="tab.title" placement="top">
|
|
<span class="tab-title">{{ tab.title }}</span>
|
|
<span class="tab-title">{{ tab.title }}</span>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
<i class="icon-arrow el-icon-caret-bottom" />
|
|
<i class="icon-arrow el-icon-caret-bottom" />
|
|
</div>
|
|
</div>
|
|
<el-dropdown-menu slot="dropdown">
|
|
<el-dropdown-menu slot="dropdown">
|
|
- <el-dropdown-item
|
|
|
|
- v-for="(childTab, childIndex) in tab.children"
|
|
|
|
- :key="childIndex"
|
|
|
|
- :command="[tab.path, childTab.path]"
|
|
|
|
- >{{ childTab.title }}</el-dropdown-item>
|
|
|
|
|
|
+ <el-dropdown-item v-for="(childTab, childIndex) in tab.children" :key="childIndex" :command="[tab.path, childTab.path]">{{ childTab.title }}</el-dropdown-item>
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
</el-dropdown>
|
|
</el-dropdown>
|
|
- <div
|
|
|
|
- v-else
|
|
|
|
- :class="[
|
|
|
|
|
|
+ <div v-else :class="[
|
|
'tab-bar tab-bar-single',
|
|
'tab-bar tab-bar-single',
|
|
{ 'tab-active': activeIndex === index },
|
|
{ 'tab-active': activeIndex === index },
|
|
- ]"
|
|
|
|
- @click="clickHandler(tab.path)"
|
|
|
|
- >
|
|
|
|
- <img
|
|
|
|
- class="tab-icon"
|
|
|
|
- :src="activeIndex === index ? activeIcon : defaultIcon"
|
|
|
|
- :alt="tab.title"
|
|
|
|
- >
|
|
|
|
- <el-tooltip
|
|
|
|
- :content="tab.title"
|
|
|
|
- placement="top"
|
|
|
|
- >
|
|
|
|
|
|
+ ]" @click="clickHandler(tab.path)">
|
|
|
|
+ <img class="tab-icon" :src="activeIndex === index ? activeIcon : defaultIcon" :alt="tab.title">
|
|
|
|
+ <el-tooltip :content="tab.title" placement="top">
|
|
<span class="tab-title">{{ tab.title }}</span>
|
|
<span class="tab-title">{{ tab.title }}</span>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</div>
|
|
</div>
|
|
@@ -64,7 +31,7 @@
|
|
<script>
|
|
<script>
|
|
export default {
|
|
export default {
|
|
name: 'StatisticsTabs',
|
|
name: 'StatisticsTabs',
|
|
- data() {
|
|
|
|
|
|
+ data () {
|
|
return {
|
|
return {
|
|
defaultIcon: require('@/assets/nav/ic_statistical_top_default.png'),
|
|
defaultIcon: require('@/assets/nav/ic_statistical_top_default.png'),
|
|
activeIcon: require('@/assets/nav/ic_statistical_top_check.png'),
|
|
activeIcon: require('@/assets/nav/ic_statistical_top_check.png'),
|
|
@@ -202,14 +169,18 @@ export default {
|
|
title: '赔偿金额分类统计'
|
|
title: '赔偿金额分类统计'
|
|
}
|
|
}
|
|
]
|
|
]
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ path: '/statisticsCharts/statisticalAnalysis',
|
|
|
|
+ title: '统计分析'
|
|
|
|
+ },
|
|
],
|
|
],
|
|
activeIndex: null
|
|
activeIndex: null
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
'$route.path': {
|
|
'$route.path': {
|
|
- handler(path) {
|
|
|
|
|
|
+ handler (path) {
|
|
let activeIndex = null
|
|
let activeIndex = null
|
|
this.tabList.some((tab, index) => {
|
|
this.tabList.some((tab, index) => {
|
|
if (path.includes(tab.path)) {
|
|
if (path.includes(tab.path)) {
|
|
@@ -223,7 +194,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- commandHandler(pathArray) {
|
|
|
|
|
|
+ commandHandler (pathArray) {
|
|
if (pathArray.some(path => !path)) {
|
|
if (pathArray.some(path => !path)) {
|
|
this.$message.info('开发中')
|
|
this.$message.info('开发中')
|
|
return
|
|
return
|
|
@@ -232,7 +203,7 @@ export default {
|
|
path: pathArray.join('/')
|
|
path: pathArray.join('/')
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- clickHandler(path) {
|
|
|
|
|
|
+ clickHandler (path) {
|
|
if (!path) {
|
|
if (!path) {
|
|
this.$message.info('开发中')
|
|
this.$message.info('开发中')
|
|
return
|
|
return
|
|
@@ -277,7 +248,7 @@ export default {
|
|
padding-left: 12px;
|
|
padding-left: 12px;
|
|
padding-right: 8px;
|
|
padding-right: 8px;
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
- font-family: Helvetica, 'Microsoft YaHei';
|
|
|
|
|
|
+ font-family: Helvetica, "Microsoft YaHei";
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
color: #101116;
|
|
color: #101116;
|
|
letter-spacing: 0;
|
|
letter-spacing: 0;
|