风机矩阵双击跳转单风机页面
This commit is contained in:
parent
adefe40ca4
commit
a5fe5cc1f8
@ -2,7 +2,7 @@
|
||||
<div class="FanList-content">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8" v-for="(item, index) in props.parentData" style="margin-bottom: 10px;">
|
||||
<div class="grid-content ep-bg-purple">
|
||||
<div class="grid-content ep-bg-purple" @dblclick="handleDoubleClick(item)">
|
||||
<div class="FanList-panel" :class="item.standard==true ? 'wind-mark' : 'wind-default'">
|
||||
<div class="fanlist-top">
|
||||
<span :class="item.standard==true ? 'wind-mark-icon' : 'fanlist-icon'">
|
||||
@ -69,6 +69,8 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import {reactive,defineProps, defineEmits} from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
const router = useRouter()
|
||||
const props = defineProps({
|
||||
parentData: {
|
||||
type: Array,
|
||||
@ -80,7 +82,30 @@ const rotationspeed = 4;
|
||||
const animationDuration=reactive({
|
||||
'animation-duration': rotationspeed+'s',
|
||||
})
|
||||
const handleDoubleClick = (row) => {
|
||||
debugger
|
||||
if (!router.hasRoute('windTurbine')) {
|
||||
router.addRoute('admin', {
|
||||
path: '/windTurbine',
|
||||
name: 'windTurbine',
|
||||
component: () => import('/@/views/backend/WindBlower/index.vue'),
|
||||
meta: {
|
||||
title: '单风机详情',
|
||||
menuDesc: '单风机详情',
|
||||
addtab: true,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
router.push({
|
||||
name: 'windTurbine',
|
||||
query: {
|
||||
irn: row.irn,
|
||||
iotModelId: row.modelId,
|
||||
name: row.name,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user