update: 设备功能组件替换

This commit is contained in:
JiangQiming 2023-03-08 16:11:45 +08:00
parent 8622bfe8f1
commit 56122ac90c
3 changed files with 50 additions and 50 deletions

View File

@ -1,13 +1,13 @@
<template>
<div class="wrapper">
<a-tabs v-model="activeKey" tab-position="left">
<a-tab-pane
<j-tabs v-model="activeKey" tab-position="left">
<j-tab-pane
v-for="func in newFunctions"
:key="func.id"
:tab="func.name"
>
<a-row :gutter="30">
<a-col :span="15">
<j-row :gutter="30">
<j-col :span="15">
<MonacoEditor
:ref="`monacoEditor${func.id}`"
v-model="func.json"
@ -15,31 +15,31 @@
style="height: 400px"
/>
<div class="editor-btn">
<a-space>
<a-button
<j-space>
<j-button
type="primary"
@click="handleExecute(func)"
>
执行
</a-button>
<a-button
</j-button>
<j-button
type="default"
@click="handleClear(func)"
>
清空
</a-button>
</a-space>
</j-button>
</j-space>
</div>
</a-col>
<a-col :span="9">
</j-col>
<j-col :span="9">
<h6>执行结果</h6>
<span class="execute-result">
{{ func.executeResult }}
</span>
</a-col>
</a-row>
</a-tab-pane>
</a-tabs>
</j-col>
</j-row>
</j-tab-pane>
</j-tabs>
</div>
</template>

View File

@ -1,21 +1,21 @@
<template>
<div class="wrapper">
<div class="tips">
<a-space>
<j-space>
<AIcon type="QuestionCircleOutlined" />
<span>精简模式下参数只支持输入框的方式录入</span>
</a-space>
</j-space>
</div>
<a-tabs v-model="activeKey" tab-position="left">
<a-tab-pane
<j-tabs v-model="activeKey" tab-position="left">
<j-tab-pane
v-for="func in newFunctions"
:key="func.id"
:tab="func.name"
>
<a-row :gutter="30">
<a-col :span="15">
<a-form :ref="`${func.id}Ref`" :model="func">
<a-table
<j-row :gutter="30">
<j-col :span="15">
<j-form :ref="`${func.id}Ref`" :model="func">
<j-table
:columns="columns"
:data-source="func.table"
:pagination="false"
@ -26,7 +26,7 @@
v-if="column.dataIndex === 'type'"
>
<span>{{ record.type }}</span>
<a-tooltip
<j-tooltip
v-if="record.type === 'object'"
>
<template slot="title">
@ -40,12 +40,12 @@
cursor: 'help',
}"
/>
</a-tooltip>
</j-tooltip>
</template>
<template
v-if="column.dataIndex === 'value'"
>
<a-form-item
<j-form-item
:name="['table', index, 'value']"
:rules="{
required: true,
@ -82,37 +82,37 @@
: undefined
"
/>
</a-form-item>
</j-form-item>
</template>
</template>
</a-table>
</a-form>
</j-table>
</j-form>
<div class="editor-btn">
<a-space>
<a-button
<j-space>
<j-button
type="primary"
@click="handleExecute(func)"
>
执行
</a-button>
<a-button
</j-button>
<j-button
type="default"
@click="handleClear(func)"
>
清空
</a-button>
</a-space>
</j-button>
</j-space>
</div>
</a-col>
<a-col :span="9">
</j-col>
<j-col :span="9">
<h6>执行结果</h6>
<span class="execute-result">
{{ func.executeResult }}
</span>
</a-col>
</a-row>
</a-tab-pane>
</a-tabs>
</j-col>
</j-row>
</j-tab-pane>
</j-tabs>
</div>
</template>

View File

@ -1,6 +1,6 @@
<template>
<a-card>
<a-empty
<j-card>
<j-empty
v-if="!metadata || (metadata && !metadata.functions.length)"
style="margin-top: 50px"
>
@ -9,15 +9,15 @@
<!-- <a @click="emits('onJump', 'Metadata')">物模型属性功能</a> -->
<a @click="onJump">物模型属性功能</a>
</template>
</a-empty>
</j-empty>
<template v-else>
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="Simple" tab="精简模式" />
<a-tab-pane key="Advance" tab="高级模式" />
</a-tabs>
<j-tabs v-model:activeKey="activeKey">
<j-tab-pane key="Simple" tab="精简模式" />
<j-tab-pane key="Advance" tab="高级模式" />
</j-tabs>
<component :is="tabs[activeKey]" />
</template>
</a-card>
</j-card>
</template>
<script setup lang="ts">