import { VueLifeCycleProcessing } from '@ibizstudio/dynamic-design'; import { PSPanelEngine } from '@ibizstudio/api'; import { Component } from 'vue-property-decorator'; import { PanelMaterialBase } from '../panel-material-base'; /** * 面板引擎素材项 * * @export * @class PanelEngine * @extends {Vue} */ @Component({}) @VueLifeCycleProcessing() export class PanelEngine extends PanelMaterialBase { componentCreated() { this.load(); } generateOption() { return { group: { name: this.ctx.tag + '-engine', }, }; } async load() { const s = await ___ibz___.gs?.getPSUIEngineTypeService(); const res = await s?.FetchValid(this.ctx.context); if (res?.ok) { const items: any[] = res.data; if (items) { this.list = []; items.forEach((item: any) => { this.list.push({ text: item.psuienginetypename, tooltip: item.psuienginetypename, iconcls: 'iconfont icon-code', data: new PSPanelEngine({ psuienginetypename: item.psuienginetypename, psuienginetypeid: item.psuienginetypeid, }), }); }); } } } }