UPDATE: VERSION-20260326
This commit is contained in:
@@ -103,9 +103,16 @@
|
||||
@edit="onEditParameterTab">
|
||||
<a-tab-pane v-for="(grouped,index) in groupedParameters" :key="index" :tab="`平台 ${index + 1}`" :closable="true">
|
||||
<a-form-item v-for="setting in grouped" :label="setting.description">
|
||||
<a-input-number v-if="setting.dataType === 'double'" v-model:value="setting.defaultValue"
|
||||
<a-input-number v-if="setting.dataType === 'double'"
|
||||
v-model:value="setting.defaultValue"
|
||||
:placeholder="setting.description" size="small" style="width:100%;" />
|
||||
<a-input v-else v-model:value="setting.defaultValue" :placeholder="setting.description" size="small" />
|
||||
<a-select :placeholder="`请选择${setting.description}`"
|
||||
allow-clear
|
||||
v-else-if="setting.paramKey === 'platforms'" v-model:value="setting.defaultValue">
|
||||
<a-select-option v-for="pl in platforms" :value="pl.id">{{pl.description}}</a-select-option>
|
||||
</a-select>
|
||||
<a-input v-else v-model:value="setting.defaultValue"
|
||||
:placeholder="setting.description" size="small" />
|
||||
</a-form-item>
|
||||
</a-tab-pane>
|
||||
<!-- <template #leftExtra>-->
|
||||
@@ -154,6 +161,7 @@ import type { ElementParameter, ElementVariable, GraphTaskElement } from '../gra
|
||||
import type { BehaviorTree } from './tree';
|
||||
import type { Graph, Node, NodeProperties } from '@antv/x6';
|
||||
import { generateKey } from '@/utils/strings';
|
||||
import type { Platform } from '@/views/decision/types';
|
||||
|
||||
const actionSpaceColumns = [
|
||||
{ title: '序号', dataIndex: 'index', key: 'index', width: 40 },
|
||||
@@ -170,9 +178,12 @@ export default defineComponent({
|
||||
treeEditing: { type: Boolean as PropType<boolean>, required: true, default: false },
|
||||
node: { type: [Object, null] as PropType<Node<NodeProperties> | null | undefined>, required: false },
|
||||
graph: { type: [Object, null] as PropType<Graph | null | undefined>, required: true },
|
||||
platforms: { type: Array as PropType<Platform[]>, required: true },
|
||||
},
|
||||
emits: ['update-element', 'update-tree'],
|
||||
setup(props, { emit }) {
|
||||
const platforms = ref<Platform[]>(props.platforms ?? []);
|
||||
|
||||
const activeTopTabsKey = ref<string>('1');
|
||||
const activeBottomTabsKey = ref<string>('1');
|
||||
const activeBottomTabs2Key = ref<string>('1');
|
||||
@@ -187,6 +198,8 @@ export default defineComponent({
|
||||
const multiableParameters = ref<boolean>(false);
|
||||
const groupedParametersActiveTab = ref<number>(0);
|
||||
|
||||
console.error(platforms.value)
|
||||
|
||||
const createEmptyParameters = (): ElementParameter[] => {
|
||||
try {
|
||||
return JSON.parse(JSON.stringify(currentElement.value?.parameters ?? [])) as ElementParameter[];
|
||||
@@ -359,9 +372,12 @@ export default defineComponent({
|
||||
|
||||
watch(() => currentElement.value, () => updateNode(), { deep: true });
|
||||
|
||||
watch(() => props.platforms, (n: Platform[] | null | undefined) => platforms.value = n ?? [], { deep: true, immediate: true });
|
||||
|
||||
onMounted(() => load());
|
||||
|
||||
return {
|
||||
platforms,
|
||||
addParameterTab,
|
||||
groupedParametersActiveTab,
|
||||
multiableParameters,
|
||||
|
||||
Reference in New Issue
Block a user