属性修改
This commit is contained in:
@@ -142,11 +142,11 @@
|
||||
:src="image.thumb"
|
||||
:alt="image.meta.title"
|
||||
fit="contain"
|
||||
class="w-full h-24"
|
||||
class="w-full h-18"
|
||||
lazy
|
||||
>
|
||||
<template #placeholder>
|
||||
<div class="w-full h-24 flex items-center justify-center bg-gray-200">
|
||||
<div class="w-full h-18 flex items-center justify-center bg-gray-200">
|
||||
<el-icon class="text-xl text-gray-400"><Picture /></el-icon>
|
||||
</div>
|
||||
</template>
|
||||
@@ -181,7 +181,7 @@
|
||||
:interval="3000"
|
||||
arrow="always"
|
||||
indicator-position="outside"
|
||||
height="200px"
|
||||
height="150px"
|
||||
class="rounded-lg overflow-hidden"
|
||||
>
|
||||
<el-carousel-item v-for="(image, index) in imageList" :key="image.id">
|
||||
@@ -330,7 +330,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
// 导入必要的Vue API
|
||||
import { computed, onMounted, ref, watch } from 'vue'
|
||||
import { computed, onMounted, ref, watch } from 'vue';
|
||||
// 导入必要的图标组件
|
||||
import {
|
||||
CopyDocument,
|
||||
@@ -345,11 +345,11 @@ import {
|
||||
Refresh,
|
||||
Warning,
|
||||
ZoomIn,
|
||||
} from '@element-plus/icons-vue'
|
||||
} from '@element-plus/icons-vue';
|
||||
// 导入Element Plus组件
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ElMessage } from 'element-plus';
|
||||
// 导入电站数据状态管理
|
||||
import { usePowerStationStore } from '~/stores/powerStation'
|
||||
import { usePowerStationStore } from '~/stores/powerStation';
|
||||
|
||||
// 定义组件属性
|
||||
const props = defineProps<{
|
||||
@@ -510,16 +510,18 @@ const fetchProperties = async (nodeId: string) => {
|
||||
const response = await $fetch('/api/power-station/properties', {
|
||||
query: { nodeId },
|
||||
})
|
||||
properties.value = response
|
||||
properties.value = response as PropertiesData
|
||||
} catch (error) {
|
||||
console.error('获取属性数据失败:', error)
|
||||
// 如果API调用失败,使用模拟数据
|
||||
properties.value = {
|
||||
basic: [
|
||||
{ label: '节点ID', value: nodeId },
|
||||
{ label: '节点名称', value: nodeId.split('~').pop() },
|
||||
{ label: 'ID', value: nodeId },
|
||||
{ label: '名称', value: '一级再热器进口连接管' },
|
||||
{ label: '节点类型', value: '设备' },
|
||||
{ label: '所属系统', value: '主系统' },
|
||||
{ label: '材质', value: 'SA213-T12' },
|
||||
{ label: '规格', value: '∅610*38' },
|
||||
],
|
||||
technical: [
|
||||
{ label: '设计压力', value: '16.5 MPa', unit: 'MPa' },
|
||||
|
||||
Reference in New Issue
Block a user