单风机页面跳转添加adminPath

单风机:页面ui调整
This commit is contained in:
高云鹏 2024-11-08 17:51:17 +08:00
parent 805f0d1906
commit a9163d3156
4 changed files with 553 additions and 566 deletions

File diff suppressed because it is too large Load Diff

View File

@ -163,7 +163,7 @@
<script setup lang="ts">
import { SelectTypeObjType, SelectTypeKeyUnionType, TableDataObjType, TableColumnType } from './type'
import { onUnmounted, reactive, ref, watch, nextTick } from 'vue'
import { onUnmounted, reactive, ref, watch, nextTick, KeepAlive } from 'vue'
import { useI18n } from 'vue-i18n'
import { getAirBlowerListReq, getBelongLineListReq, runAirBlowerReq } from '/@/api/backend/airBlower/request'
import { CircleCheck, CircleClose, Loading } from '@element-plus/icons-vue'
@ -171,6 +171,7 @@ import { ElMessage, TableInstance, ElPopconfirm } from 'element-plus'
import { useRouter, useRoute } from 'vue-router'
import { getRealTimeState } from './utils'
import { sendCommandReq } from '/@/api/backend/control/request'
import { adminBaseRoutePath } from '/@/router/static/adminBase'
const router = useRouter()
@ -533,11 +534,11 @@ watch(autoUpdate, (newVal: boolean) => {
const openWindTurbine = (row: TableDataObjType) => {
if (!router.hasRoute('windTurbine')) {
router.addRoute('admin', {
path: '/windTurbine',
path: adminBaseRoutePath + '/windTurbine',
name: 'windTurbine',
component: () => import('/@/views/backend/WindBlower/index.vue'),
meta: {
title: '单风机详情',
title: 'WindBlower',
menuDesc: '单风机详情',
addtab: true,
},

View File

@ -15,11 +15,14 @@
<div class="realTimeValueText">{{ scope.row.realTimeValue }}</div>
</div>
<div v-if="item.prop === 'operate'" @click="openLineChart(scope.row)" class="operate">
<svg xmlns="http://www.w3.org/2000/svg" class="icon" width="20px" height="20px" viewBox="0 0 1024 1024" version="1.1">
<path
d="M896 896H96a32 32 0 0 1-32-32V224a32 32 0 0 1 64 0v608h768a32 32 0 1 1 0 64zM247.008 640a32 32 0 0 1-20.992-56.192l200.992-174.24a32 32 0 0 1 42.272 0.288l172.128 153.44 229.088-246.304a32 32 0 0 1 46.88 43.616l-250.432 269.216a31.936 31.936 0 0 1-44.704 2.08l-174.56-155.52-179.744 155.84a31.872 31.872 0 0 1-20.928 7.776z"
/>
</svg>
<template v-if="!enumStore.keys.includes(scope.row.attributeCode)">
<svg xmlns="http://www.w3.org/2000/svg" class="icon" width="20px" height="20px" viewBox="0 0 1024 1024" version="1.1">
{{ scope.row }}
<path
d="M896 896H96a32 32 0 0 1-32-32V224a32 32 0 0 1 64 0v608h768a32 32 0 1 1 0 64zM247.008 640a32 32 0 0 1-20.992-56.192l200.992-174.24a32 32 0 0 1 42.272 0.288l172.128 153.44 229.088-246.304a32 32 0 0 1 46.88 43.616l-250.432 269.216a31.936 31.936 0 0 1-44.704 2.08l-174.56-155.52-179.744 155.84a31.872 31.872 0 0 1-20.928 7.776z"
/>
</svg>
</template>
</div>
</template>
</el-table-column>

View File

@ -70,6 +70,8 @@
<script setup lang="ts">
import {reactive,defineProps, defineEmits} from 'vue'
import { useRouter } from 'vue-router'
import { adminBaseRoutePath } from '/@/router/static/adminBase'
const router = useRouter()
const props = defineProps({
parentData: {
@ -85,7 +87,7 @@ const animationDuration=reactive({
const handleDoubleClick = (row) => {
if (!router.hasRoute('windTurbine')) {
router.addRoute('admin', {
path: '/windTurbine',
path: adminBaseRoutePath+'/windTurbine',
name: 'windTurbine',
component: () => import('/@/views/backend/WindBlower/index.vue'),
meta: {