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