🔨 添加规格信息.
This commit is contained in:
@@ -51,6 +51,16 @@ public class HostSpecExtraModel implements GenericsDataModel {
|
||||
*/
|
||||
private String sn;
|
||||
|
||||
/**
|
||||
* 制造商
|
||||
*/
|
||||
private String vendor;
|
||||
|
||||
/**
|
||||
* 型号
|
||||
*/
|
||||
private String model;
|
||||
|
||||
/**
|
||||
* 系统名称
|
||||
*/
|
||||
|
||||
@@ -49,6 +49,8 @@ export interface HostLabelExtraSettingModel {
|
||||
// 标签规格模型
|
||||
export interface HostSpecExtraModel {
|
||||
sn: string;
|
||||
vendor: string;
|
||||
model: string;
|
||||
osName: string;
|
||||
cpuCount: number;
|
||||
cpuPhysicalCore: number;
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
}
|
||||
|
||||
.card-filter-wrapper {
|
||||
padding: 18px 24px;
|
||||
padding: 24px 24px 16px 24px;
|
||||
|
||||
.card-filter-form {
|
||||
width: 320px;
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { CardProps } from '../types/props';
|
||||
import { ref, computed } from 'vue';
|
||||
import { ref, computed, nextTick } from 'vue';
|
||||
import { useAppStore } from '@/store';
|
||||
import { triggerMouseEvent } from '@/utils/event';
|
||||
import { HeaderEmitter } from '../types/emits';
|
||||
@@ -157,7 +157,9 @@
|
||||
// 搜索
|
||||
const filterSearch = () => {
|
||||
bubblesEmitter(HeaderEmitter.SEARCH);
|
||||
triggerMouseEvent(filterRef);
|
||||
nextTick(() => {
|
||||
triggerMouseEvent(filterRef);
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
@@ -37,5 +37,5 @@ export const triggerMouseEvent = (ref: Ref, e = 'click') => {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
});
|
||||
ref.value.dispatchEvent(event);
|
||||
ref.value?.dispatchEvent?.(event);
|
||||
};
|
||||
|
||||
@@ -11,6 +11,24 @@
|
||||
allow-clear />
|
||||
<span v-else class="text">{{ formModel.sn }}</span>
|
||||
</a-descriptions-item>
|
||||
<!-- 制造商 -->
|
||||
<a-descriptions-item label="制造商" :span="2">
|
||||
<a-input v-if="editing"
|
||||
v-model="formModel.vendor"
|
||||
class="input"
|
||||
size="mini"
|
||||
allow-clear />
|
||||
<span v-else class="text">{{ formModel.vendor }}</span>
|
||||
</a-descriptions-item>
|
||||
<!-- 设备型号 -->
|
||||
<a-descriptions-item label="设备型号" :span="2">
|
||||
<a-input v-if="editing"
|
||||
v-model="formModel.model"
|
||||
class="input"
|
||||
size="mini"
|
||||
allow-clear />
|
||||
<span v-else class="text">{{ formModel.model }}</span>
|
||||
</a-descriptions-item>
|
||||
<!-- 系统名称 -->
|
||||
<a-descriptions-item label="系统名称" :span="2">
|
||||
<a-input v-if="editing"
|
||||
@@ -121,19 +139,29 @@
|
||||
</a-descriptions-item>
|
||||
<!-- 公网地址 -->
|
||||
<a-descriptions-item label="公网地址" :span="2">
|
||||
<a-input-tag v-model="formModel.publicIpAddresses"
|
||||
:readonly="!editing"
|
||||
<a-input-tag v-if="editing"
|
||||
v-model="formModel.publicIpAddresses"
|
||||
class="input"
|
||||
size="mini"
|
||||
allow-clear />
|
||||
<a-space v-else>
|
||||
<a-tag v-for="addr in (formModel.publicIpAddresses || [])">
|
||||
{{ addr }}
|
||||
</a-tag>
|
||||
</a-space>
|
||||
</a-descriptions-item>
|
||||
<!-- 私网地址 -->
|
||||
<a-descriptions-item label="私网地址" :span="2">
|
||||
<a-input-tag v-model="formModel.privateIpAddresses"
|
||||
:readonly="!editing"
|
||||
<a-input-tag v-if="editing"
|
||||
v-model="formModel.privateIpAddresses"
|
||||
class="input"
|
||||
size="mini"
|
||||
allow-clear />
|
||||
<a-space v-else>
|
||||
<a-tag v-for="addr in (formModel.privateIpAddresses || [])">
|
||||
{{ addr }}
|
||||
</a-tag>
|
||||
</a-space>
|
||||
</a-descriptions-item>
|
||||
<!-- 负责人 -->
|
||||
<a-descriptions-item label="负责人" :span="2">
|
||||
|
||||
@@ -13,10 +13,17 @@ const columns = [
|
||||
title: '主机信息',
|
||||
dataIndex: 'hostInfo',
|
||||
slotName: 'hostInfo',
|
||||
width: 248,
|
||||
width: 268,
|
||||
align: 'left',
|
||||
fixed: 'left',
|
||||
default: true,
|
||||
}, {
|
||||
title: '主机规格',
|
||||
dataIndex: 'hostSpec',
|
||||
slotName: 'hostSpec',
|
||||
width: 248,
|
||||
align: 'left',
|
||||
default: true,
|
||||
}, {
|
||||
title: '告警策略',
|
||||
dataIndex: 'alarmPolicy',
|
||||
|
||||
Reference in New Issue
Block a user