|
@@ -0,0 +1,81 @@
|
|
|
|
+<template>
|
|
|
|
+ <div>
|
|
|
|
+ <a-space :size="50">
|
|
|
|
+ <div class="filter-icon" v-for="(component,i) in components" :key="component.name" :class="current===i?'active':''" @click="handleFilter(i)">
|
|
|
|
+ <my-icon :type="component.icon"></my-icon>
|
|
|
|
+ <div>{{ component.name }}</div>
|
|
|
|
+ </div>
|
|
|
|
+ </a-space>
|
|
|
|
+ <keep-alive>
|
|
|
|
+ <component :is="components[current].component" />
|
|
|
|
+ </keep-alive>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import RemoteDegree from './degree/RemoteDegree.vue'
|
|
|
|
+import RemoteDegreeLog from './degree-log/RemoteDegreeLog.vue'
|
|
|
|
+import RemoteMeasure from './measure/RemoteMeasure.vue'
|
|
|
|
+import RemoteMeasureLog from './measure-log/RemoteMeasureLog.vue'
|
|
|
|
+
|
|
|
|
+export default {
|
|
|
|
+ components: {
|
|
|
|
+ RemoteDegree,
|
|
|
|
+ RemoteMeasureLog,
|
|
|
|
+ RemoteMeasure,
|
|
|
|
+ RemoteDegreeLog
|
|
|
|
+ },
|
|
|
|
+ data () {
|
|
|
|
+ return {
|
|
|
|
+ current: 0,
|
|
|
|
+ components: [
|
|
|
|
+
|
|
|
|
+ {
|
|
|
|
+ name: '设备电度对应表',
|
|
|
|
+ icon: 'icon-shebeiguanli',
|
|
|
|
+ component: 'RemoteDegree'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '设备电度记录表',
|
|
|
|
+ icon: 'icon-shebeiguanli',
|
|
|
|
+ component: 'RemoteDegreeLog'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '设备遥测对应表',
|
|
|
|
+ icon: 'icon-shebeiguanli',
|
|
|
|
+ component: 'RemoteMeasure'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '设备遥测记录表',
|
|
|
|
+ icon: 'icon-shebeiguanli',
|
|
|
|
+ component: 'RemoteMeasureLog'
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ handleFilter (index) {
|
|
|
|
+ this.current = index
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style lang="less" scoped>
|
|
|
|
+.filter-icon{
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ color: #666;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
+ &>:first-child{
|
|
|
|
+ font-size: 30px;
|
|
|
|
+}
|
|
|
|
+&:hover{
|
|
|
|
+ color: #1890ff;
|
|
|
|
+}
|
|
|
|
+}
|
|
|
|
+.active{
|
|
|
|
+ color:#1890ff;
|
|
|
|
+}
|
|
|
|
+</style>
|