提交 c0ceb20f 编写于 作者: Mosher's avatar Mosher

update:更新

1、调整视图及部件状态参数导出逻辑
2、数据视图样式调整
3、卡片视图部件支持面板
上级 10ad4d5c
...@@ -12,6 +12,7 @@ import net.ibizsys.model.control.IPSControl; ...@@ -12,6 +12,7 @@ import net.ibizsys.model.control.IPSControl;
import net.ibizsys.model.control.IPSControlContainer; import net.ibizsys.model.control.IPSControlContainer;
import net.ibizsys.model.control.dashboard.IPSDBContainerPortletPart; import net.ibizsys.model.control.dashboard.IPSDBContainerPortletPart;
import net.ibizsys.model.control.dashboard.IPSDBPortletPart; import net.ibizsys.model.control.dashboard.IPSDBPortletPart;
import net.ibizsys.model.control.dataview.IPSDEDataView;
import net.ibizsys.model.control.grid.IPSDEGrid; import net.ibizsys.model.control.grid.IPSDEGrid;
import net.ibizsys.model.control.grid.IPSDEGridColumn; import net.ibizsys.model.control.grid.IPSDEGridColumn;
import net.ibizsys.model.control.list.IPSList; import net.ibizsys.model.control.list.IPSList;
...@@ -122,6 +123,7 @@ public class CtrlModel extends BaseModel{ ...@@ -122,6 +123,7 @@ public class CtrlModel extends BaseModel{
public void handleChildControls() { public void handleChildControls() {
IPSControl control = getControl(); IPSControl control = getControl();
// 具有子部件的容器部件
if (control instanceof IPSControlContainer) { if (control instanceof IPSControlContainer) {
IPSControlContainer controlContainer = (IPSControlContainer)control; IPSControlContainer controlContainer = (IPSControlContainer)control;
List<IPSControl> controls = controlContainer.getPSControls(); List<IPSControl> controls = controlContainer.getPSControls();
...@@ -204,6 +206,7 @@ public class CtrlModel extends BaseModel{ ...@@ -204,6 +206,7 @@ public class CtrlModel extends BaseModel{
} }
} }
} }
// 列表部件项布局面板
if (control instanceof IPSList) { if (control instanceof IPSList) {
IPSList list = (IPSList)control; IPSList list = (IPSList)control;
IPSLayoutPanel layoutPanel = list.getItemPSLayoutPanel(); IPSLayoutPanel layoutPanel = list.getItemPSLayoutPanel();
...@@ -220,6 +223,24 @@ public class CtrlModel extends BaseModel{ ...@@ -220,6 +223,24 @@ public class CtrlModel extends BaseModel{
} }
} }
} }
// 卡片视图部件项布局面板
if (control instanceof IPSDEDataView) {
IPSDEDataView dataView = (IPSDEDataView) control;
IPSLayoutPanel layoutPanel = dataView.getItemPSLayoutPanel();
if (layoutPanel != null) {
CtrlModel ctrlModel = new CtrlModel(app, layoutPanel);
if (ctrlModel.getControl().getPSAppDataEntity() != null) {
AppEntityModel ctrlAppEntity = app.getAppEntity(ctrlModel.getControl().getPSAppDataEntity().getCodeName());
ctrlModel.setAppEntity(ctrlAppEntity);
ctrlAppEntity.addCtrl(ctrlModel.getId(), ctrlModel);
}
addCtrl(ctrlModel.getId(), ctrlModel);
if(!app.getCtrlsMap().containsKey(ctrlModel.getId())) {
app.getCtrlsMap().put(ctrlModel.getId(),ctrlModel);
}
}
}
} }
public void handleAllPortlets(IPSControlContainer control) { public void handleAllPortlets(IPSControlContainer control) {
......
...@@ -7,5 +7,11 @@ import { MainControlProps } from "../main-control"; ...@@ -7,5 +7,11 @@ import { MainControlProps } from "../main-control";
* @extends {MainControlProps} * @extends {MainControlProps}
*/ */
export interface PanelControlProps extends MainControlProps { export interface PanelControlProps extends MainControlProps {
/**
* 导航数据
*
* @type {any[]}
* @memberof PanelControlProps
*/
navDatas: any[];
} }
\ No newline at end of file
import { IActionParam, IParam } from "@core"; import { IActionParam, IParam } from "@core";
import { MainControl } from "../main-control"; import { MainControl } from "../main-control";
import { PanelControlProps } from "./panel-control-prop";
import { PanelControlState } from "./panel-control-state"; import { PanelControlState } from "./panel-control-state";
/** /**
...@@ -17,6 +18,14 @@ export class PanelControl extends MainControl { ...@@ -17,6 +18,14 @@ export class PanelControl extends MainControl {
*/ */
public declare state: PanelControlState; public declare state: PanelControlState;
/**
* 面板部件输入参数
*
* @type {PanelControlProps}
* @memberof PanelControl
*/
public declare props: PanelControlProps;
/** /**
* 获取当前激活数据 * 获取当前激活数据
* *
...@@ -34,14 +43,9 @@ export class PanelControl extends MainControl { ...@@ -34,14 +43,9 @@ export class PanelControl extends MainControl {
* @memberof PanelControl * @memberof PanelControl
*/ */
protected useNavDatas() { protected useNavDatas() {
const navDatas: any = toRef(this.props, 'navDatas'); watch(() => this.props.navDatas, (newVal: any, oldVal: any) => {
if (this.props.panelType === 'LAYOUT') {
this.load(); this.load();
} }, { immediate: true, deep: true });
watch(navDatas, (newVal: any, oldVal: any) => {
this.load();
});
this.state.navDatas = navDatas;
} }
/** /**
...@@ -60,7 +64,8 @@ export class PanelControl extends MainControl { ...@@ -60,7 +64,8 @@ export class PanelControl extends MainControl {
const { viewSubject, controlName } = this.state; const { viewSubject, controlName } = this.state;
const load = async (opts: IParam = {}) => { const load = async (opts: IParam = {}) => {
const { dataMode } = this.state; const { dataMode } = this.state;
const { navDatas, data } = toRefs(this.state); const { navDatas } = toRefs(this.props);
const { data } = toRefs(this.state);
if (dataMode === 0) { if (dataMode === 0) {
// 不获取,使用传入数据 // 不获取,使用传入数据
if (navDatas && navDatas.value && navDatas.value.length) { if (navDatas && navDatas.value && navDatas.value.length) {
...@@ -153,10 +158,10 @@ export class PanelControl extends MainControl { ...@@ -153,10 +158,10 @@ export class PanelControl extends MainControl {
*/ */
public moduleInstall() { public moduleInstall() {
const superParams = super.moduleInstall(); const superParams = super.moduleInstall();
this.useLoad();
this.useNavDatas(); this.useNavDatas();
return { return {
...superParams, ...superParams,
load: this.useLoad(),
onPanelItemEvents: this.onPanelItemEvents.bind(this) onPanelItemEvents: this.onPanelItemEvents.bind(this)
} }
} }
......
export const viewState = { export const viewState = () => {
{{> @macro/front-end/views/view-base-config.hbs}} return {
{{#if page.defPSAppView}} {{> @macro/front-end/views/view-base-config.hbs}}
{{#if page.defPSAppView}}
defaultView: '{{page.defPSAppView.codeName}}', defaultView: '{{page.defPSAppView.codeName}}',
{{/if}} {{/if}}
}
}; };
\ No newline at end of file
...@@ -31,7 +31,7 @@ interface ViewEmit { ...@@ -31,7 +31,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const indexView = new IndexView(viewState, props, emit).moduleInstall(); const indexView = new IndexView(viewState(), props, emit).moduleInstall();
const { state, menu } = indexView; const { state, menu } = indexView;
const collapsed: Ref<boolean> = ref(false); const collapsed: Ref<boolean> = ref(false);
const collapsedChange = () => { const collapsedChange = () => {
......
export const viewState = { export const viewState = () => {
{{> @macro/front-end/views/view-base-config.hbs}} return {
{{> @macro/front-end/views/view-base-config.hbs}}
}
}; };
\ No newline at end of file
...@@ -29,7 +29,7 @@ interface ViewEmit { ...@@ -29,7 +29,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const portalView = new PortalView(viewState, props, emit).moduleInstall(); const portalView = new PortalView(viewState(), props, emit).moduleInstall();
const { state, dashboard, onCtrlEvent } = portalView; const { state, dashboard, onCtrlEvent } = portalView;
</script> </script>
......
export const viewState = { export const viewState = () => {
return {
enableQuickSearch: {{#if page.enableQuickSearch}}{{page.enableQuickSearch}}{{else}}false{{/if}}, enableQuickSearch: {{#if page.enableQuickSearch}}{{page.enableQuickSearch}}{{else}}false{{/if}},
expandSearchForm: {{#if page.expandSearchForm}}{{page.expandSearchForm}}{{else}}false{{/if}}, expandSearchForm: {{#if page.expandSearchForm}}{{page.expandSearchForm}}{{else}}false{{/if}},
{{> @macro/front-end/views/view-base-config.hbs}} {{> @macro/front-end/views/view-base-config.hbs}}
}
}; };
\ No newline at end of file
...@@ -14,7 +14,7 @@ import { {{codeName}}SearchForm } from '@widgets/{{spinalCase psAppDataEntity.co ...@@ -14,7 +14,7 @@ import { {{codeName}}SearchForm } from '@widgets/{{spinalCase psAppDataEntity.co
import { {{codeName}}QuickSearchForm } from '@widgets/{{spinalCase psAppDataEntity.codeName}}/{{spinalCase codeName}}-quick-search-form'; import { {{codeName}}QuickSearchForm } from '@widgets/{{spinalCase psAppDataEntity.codeName}}/{{spinalCase codeName}}-quick-search-form';
{{/if}} {{/if}}
{{#eq controlType "SEARCHBAR"}} {{#eq controlType "SEARCHBAR"}}
import { {{codeName}}SearchBar } from '@widgets/{{spinalCase psAppDataEntity.codeName}}/{{spinalCase codeName}}-searchBar'; import { {{codeName}}SearchBar } from '@widgets/{{spinalCase psAppDataEntity.codeName}}/{{spinalCase codeName}}-searchbar';
{{/eq}} {{/eq}}
{{/page.ctrls}} {{/page.ctrls}}
...@@ -39,7 +39,7 @@ interface ViewEmit { ...@@ -39,7 +39,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const dataView = new DataView(viewState, props, emit).moduleInstall(); const dataView = new DataView(viewState(), props, emit).moduleInstall();
const { state, dataViewControl, searchForm, quickSearchForm, onCtrlEvent, onToolbarEvent, onQuickGroupEvent, onQuickSearchEvent } = dataView; const { state, dataViewControl, searchForm, quickSearchForm, onCtrlEvent, onToolbarEvent, onQuickGroupEvent, onQuickSearchEvent } = dataView;
{{#if page.psAppCounterRefs}} {{#if page.psAppCounterRefs}}
// 计数器数据 // 计数器数据
......
export const viewState = { export const viewState = () => {
{{> @macro/front-end/views/view-base-config.hbs}} return {
{{> @macro/front-end/views/view-base-config.hbs}}
}
}; };
\ No newline at end of file
...@@ -29,7 +29,7 @@ interface ViewEmit { ...@@ -29,7 +29,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const editView = new EditView(viewState, props, emit).moduleInstall(); const editView = new EditView(viewState(), props, emit).moduleInstall();
const { state, form, onToolbarEvent, onCtrlEvent } = editView; const { state, form, onToolbarEvent, onCtrlEvent } = editView;
{{#if page.psAppCounterRefs}} {{#if page.psAppCounterRefs}}
// 计数器数据 // 计数器数据
......
export const viewState = { export const viewState = () => {
return {
{{#each page.ctrls as | ctrl |}} {{#each page.ctrls as | ctrl |}}
{{#if (eq ctrl.controlType "GRIDEXPBAR")}} {{#if (eq ctrl.controlType "GRIDEXPBAR")}}
gridExpBarName: '{{ctrl.name}}', gridExpBarName: '{{ctrl.name}}',
{{/if}} {{/if}}
{{/each}} {{/each}}
{{> @macro/front-end/views/view-base-config.hbs}} {{> @macro/front-end/views/view-base-config.hbs}}
}
}; };
\ No newline at end of file
...@@ -25,7 +25,7 @@ interface ViewEmit { ...@@ -25,7 +25,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块 // 安装功能模块
const gridExpView = new GridExpView(viewState, props, emit).moduleInstall() const gridExpView = new GridExpView(viewState(), props, emit).moduleInstall()
const { state, onCtrlEvent, onToolbarEvent } = gridExpView; const { state, onCtrlEvent, onToolbarEvent } = gridExpView;
</script> </script>
......
export const viewState = { export const viewState = () => {
return {
gridRowActiveMode: {{page.gridRowActiveMode}}, gridRowActiveMode: {{page.gridRowActiveMode}},
rowEditState: {{#if page.enableRowEdit}}{{page.rowEditDefault}}{{else}}false{{/if}}, rowEditState: {{#if page.enableRowEdit}}{{page.rowEditDefault}}{{else}}false{{/if}},
enableQuickSearch: {{#if page.enableQuickSearch}}{{page.enableQuickSearch}}{{else}}false{{/if}}, enableQuickSearch: {{#if page.enableQuickSearch}}{{page.enableQuickSearch}}{{else}}false{{/if}},
expandSearchForm: {{#if page.expandSearchForm}}{{page.expandSearchForm}}{{else}}false{{/if}}, expandSearchForm: {{#if page.expandSearchForm}}{{page.expandSearchForm}}{{else}}false{{/if}},
{{> @macro/front-end/views/view-base-config.hbs}} {{> @macro/front-end/views/view-base-config.hbs}}
}
}; };
\ No newline at end of file
...@@ -14,7 +14,7 @@ import { {{codeName}}SearchForm } from '@widgets/{{spinalCase psAppDataEntity.co ...@@ -14,7 +14,7 @@ import { {{codeName}}SearchForm } from '@widgets/{{spinalCase psAppDataEntity.co
import { {{codeName}}QuickSearchForm } from '@widgets/{{spinalCase psAppDataEntity.codeName}}/{{spinalCase codeName}}-quick-search-form'; import { {{codeName}}QuickSearchForm } from '@widgets/{{spinalCase psAppDataEntity.codeName}}/{{spinalCase codeName}}-quick-search-form';
{{/if}} {{/if}}
{{#eq controlType "SEARCHBAR"}} {{#eq controlType "SEARCHBAR"}}
import { {{codeName}}SearchBar } from '@widgets/{{spinalCase psAppDataEntity.codeName}}/{{spinalCase codeName}}-searchBar'; import { {{codeName}}SearchBar } from '@widgets/{{spinalCase psAppDataEntity.codeName}}/{{spinalCase codeName}}-searchbar';
{{/eq}} {{/eq}}
{{/page.ctrls}} {{/page.ctrls}}
...@@ -39,7 +39,7 @@ interface ViewEmit { ...@@ -39,7 +39,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const gridView = new GridView(viewState, props, emit).moduleInstall(); const gridView = new GridView(viewState(), props, emit).moduleInstall();
const { state, grid, searchForm, quickSearchForm, onCtrlEvent, onToolbarEvent, onQuickGroupEvent, onQuickSearchEvent } = gridView; const { state, grid, searchForm, quickSearchForm, onCtrlEvent, onToolbarEvent, onQuickGroupEvent, onQuickSearchEvent } = gridView;
{{#if page.psAppCounterRefs}} {{#if page.psAppCounterRefs}}
// 计数器数据 // 计数器数据
......
export const viewState = { export const viewState = () => {
return {
{{#each page.ctrls as | ctrl |}} {{#each page.ctrls as | ctrl |}}
{{#if (eq ctrl.controlType "LISTEXPBAR")}} {{#if (eq ctrl.controlType "LISTEXPBAR")}}
listExpBarName: '{{ctrl.name}}', listExpBarName: '{{ctrl.name}}',
{{/if}} {{/if}}
{{/each}} {{/each}}
{{> @macro/front-end/views/view-base-config.hbs}} {{> @macro/front-end/views/view-base-config.hbs}}
}
}; };
\ No newline at end of file
...@@ -25,7 +25,7 @@ interface ViewEmit { ...@@ -25,7 +25,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块 // 安装功能模块
const listExpView = new ListExpView(viewState, props, emit).moduleInstall() const listExpView = new ListExpView(viewState(), props, emit).moduleInstall()
const { state, onCtrlEvent, onToolbarEvent } = listExpView; const { state, onCtrlEvent, onToolbarEvent } = listExpView;
</script> </script>
......
export const viewState = { export const viewState = () => {
return {
enableQuickSearch: {{#if page.enableQuickSearch}}{{page.enableQuickSearch}}{{else}}false{{/if}}, enableQuickSearch: {{#if page.enableQuickSearch}}{{page.enableQuickSearch}}{{else}}false{{/if}},
expandSearchForm: {{#if page.expandSearchForm}}{{page.expandSearchForm}}{{else}}false{{/if}}, expandSearchForm: {{#if page.expandSearchForm}}{{page.expandSearchForm}}{{else}}false{{/if}},
{{> @macro/front-end/views/view-base-config.hbs}} {{> @macro/front-end/views/view-base-config.hbs}}
}
}; };
\ No newline at end of file
...@@ -14,7 +14,7 @@ import { {{codeName}}SearchForm } from '@widgets/{{spinalCase psAppDataEntity.co ...@@ -14,7 +14,7 @@ import { {{codeName}}SearchForm } from '@widgets/{{spinalCase psAppDataEntity.co
import { {{codeName}}QuickSearchForm } from '@widgets/{{spinalCase psAppDataEntity.codeName}}/{{spinalCase codeName}}-quick-search-form'; import { {{codeName}}QuickSearchForm } from '@widgets/{{spinalCase psAppDataEntity.codeName}}/{{spinalCase codeName}}-quick-search-form';
{{/if}} {{/if}}
{{#eq controlType "SEARCHBAR"}} {{#eq controlType "SEARCHBAR"}}
import { {{codeName}}SearchBar } from '@widgets/{{spinalCase psAppDataEntity.codeName}}/{{spinalCase codeName}}-searchBar'; import { {{codeName}}SearchBar } from '@widgets/{{spinalCase psAppDataEntity.codeName}}/{{spinalCase codeName}}-searchbar';
{{/eq}} {{/eq}}
{{/page.ctrls}} {{/page.ctrls}}
...@@ -39,7 +39,7 @@ interface ViewEmit { ...@@ -39,7 +39,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const listView = new ListView(viewState, props, emit).moduleInstall(); const listView = new ListView(viewState(), props, emit).moduleInstall();
const { state, list, searchForm, quickSearchForm, onCtrlEvent, onToolbarEvent, onQuickGroupEvent, onQuickSearchEvent } = listView; const { state, list, searchForm, quickSearchForm, onCtrlEvent, onToolbarEvent, onQuickGroupEvent, onQuickSearchEvent } = listView;
{{#if page.psAppCounterRefs}} {{#if page.psAppCounterRefs}}
// 计数器数据 // 计数器数据
......
export const viewState = { export const viewState = () => {
return {
// 实际选中数据 // 实际选中数据
selections: [], selections: [],
selectedData: [], selectedData: [],
// 右侧面板选中数据 // 右侧面板选中数据
rightPanelSelections: [], rightPanelSelections: [],
{{> @macro/front-end/views/view-base-config.hbs}} {{> @macro/front-end/views/view-base-config.hbs}}
}
}; };
\ No newline at end of file
...@@ -29,7 +29,7 @@ interface ViewEmit { ...@@ -29,7 +29,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const mpickupView = new MPickupView(viewState, props, emit).moduleInstall(); const mpickupView = new MPickupView(viewState(), props, emit).moduleInstall();
const { state, pickupViewPanel, onCancel, onConfirm, onCtrlEvent, onMoveRight, onMoveLeft, onAllMoveRight, onAllMoveLeft, onRightPanelClick } = mpickupView; const { state, pickupViewPanel, onCancel, onConfirm, onCtrlEvent, onMoveRight, onMoveLeft, onAllMoveRight, onAllMoveLeft, onRightPanelClick } = mpickupView;
</script> </script>
......
export const viewState = { export const viewState = () => {
{{> @macro/front-end/views/view-base-config.hbs}} return {
{{> @macro/front-end/views/view-base-config.hbs}}
}
}; };
\ No newline at end of file
...@@ -29,7 +29,7 @@ interface ViewEmit { ...@@ -29,7 +29,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const panelView = new PanelView(viewState, props, emit).moduleInstall(); const panelView = new PanelView(viewState(), props, emit).moduleInstall();
const { state, panel, onToolbarEvent, onCtrlEvent } = panelView; const { state, panel, onToolbarEvent, onCtrlEvent } = panelView;
{{#if page.psAppCounterRefs}} {{#if page.psAppCounterRefs}}
// 计数器数据 // 计数器数据
......
export const viewState = { export const viewState = () => {
return {
enableQuickSearch: {{#if page.enableQuickSearch}}{{page.enableQuickSearch}}{{else}}false{{/if}}, enableQuickSearch: {{#if page.enableQuickSearch}}{{page.enableQuickSearch}}{{else}}false{{/if}},
expandSearchForm: {{#if page.expandSearchForm}}{{page.expandSearchForm}}{{else}}false{{/if}}, expandSearchForm: {{#if page.expandSearchForm}}{{page.expandSearchForm}}{{else}}false{{/if}},
gridRowActiveMode: {{page.gridRowActiveMode}}, gridRowActiveMode: {{page.gridRowActiveMode}},
rowEditState: {{#if page.enableRowEdit}}{{page.rowEditDefault}}{{else}}false{{/if}}, rowEditState: {{#if page.enableRowEdit}}{{page.rowEditDefault}}{{else}}false{{/if}},
{{> @macro/front-end/views/view-base-config.hbs}} {{> @macro/front-end/views/view-base-config.hbs}}
}
}; };
\ No newline at end of file
...@@ -40,7 +40,7 @@ interface ViewEmit { ...@@ -40,7 +40,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const pickupGridView = new PickupGridView(viewState, props, emit).moduleInstall(); const pickupGridView = new PickupGridView(viewState(), props, emit).moduleInstall();
const { state, grid, onCtrlEvent, onQuickGroupEvent, onQuickSearchEvent } = pickupGridView; const { state, grid, onCtrlEvent, onQuickGroupEvent, onQuickSearchEvent } = pickupGridView;
</script> </script>
......
export const viewState = { export const viewState = () => {
return {
enableQuickSearch: {{#if page.enableQuickSearch}}{{page.enableQuickSearch}}{{else}}false{{/if}}, enableQuickSearch: {{#if page.enableQuickSearch}}{{page.enableQuickSearch}}{{else}}false{{/if}},
expandSearchForm: {{#if page.expandSearchForm}}{{page.expandSearchForm}}{{else}}false{{/if}}, expandSearchForm: {{#if page.expandSearchForm}}{{page.expandSearchForm}}{{else}}false{{/if}},
{{> @macro/front-end/views/view-base-config.hbs}} {{> @macro/front-end/views/view-base-config.hbs}}
}
}; };
\ No newline at end of file
...@@ -40,7 +40,7 @@ interface ViewEmit { ...@@ -40,7 +40,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const pickupTreeView = new PickupTreeView(viewState, props, emit).moduleInstall(); const pickupTreeView = new PickupTreeView(viewState(), props, emit).moduleInstall();
const { state, tree, onCtrlEvent, onQuickGroupEvent, onQuickSearchEvent } = pickupTreeView; const { state, tree, onCtrlEvent, onQuickGroupEvent, onQuickSearchEvent } = pickupTreeView;
</script> </script>
......
export const viewState = { export const viewState = () => {
{{> @macro/front-end/views/view-base-config.hbs}} return {
{{> @macro/front-end/views/view-base-config.hbs}}
}
}; };
\ No newline at end of file
...@@ -28,7 +28,7 @@ interface ViewEmit { ...@@ -28,7 +28,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const pickupView = new PickupView(viewState, props, emit).moduleInstall(); const pickupView = new PickupView(viewState(), props, emit).moduleInstall();
const { state, onCancel, onConfirm, onCtrlEvent } = pickupView; const { state, onCancel, onConfirm, onCtrlEvent } = pickupView;
</script> </script>
......
export const viewState = { export const viewState = () => {
{{> @macro/front-end/views/view-base-config.hbs}} return {
{{> @macro/front-end/views/view-base-config.hbs}}
}
}; };
\ No newline at end of file
...@@ -28,7 +28,7 @@ interface ViewEmit { ...@@ -28,7 +28,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const tabExpView = new TabExpView(viewState, props, emit).moduleInstall(); const tabExpView = new TabExpView(viewState(), props, emit).moduleInstall();
const { state, onCtrlEvent } = tabExpView; const { state, onCtrlEvent } = tabExpView;
</script> </script>
......
export const viewState = { export const viewState = () => {
return {
{{#each page.ctrls as | ctrl |}} {{#each page.ctrls as | ctrl |}}
{{#if (eq ctrl.controlType "TREEEXPBAR")}} {{#if (eq ctrl.controlType "TREEEXPBAR")}}
treeExpBarName: '{{ctrl.name}}', treeExpBarName: '{{ctrl.name}}',
{{/if}} {{/if}}
{{/each}} {{/each}}
{{> @macro/front-end/views/view-base-config.hbs}} {{> @macro/front-end/views/view-base-config.hbs}}
}
}; };
\ No newline at end of file
...@@ -25,7 +25,7 @@ interface ViewEmit { ...@@ -25,7 +25,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块 // 安装功能模块
const treeExpView = new TreeExpView(viewState, props, emit).moduleInstall() const treeExpView = new TreeExpView(viewState(), props, emit).moduleInstall()
const { state, onCtrlEvent, onToolbarEvent } = treeExpView; const { state, onCtrlEvent, onToolbarEvent } = treeExpView;
</script> </script>
......
export const viewState = { export const viewState = () => {
return {
enableQuickSearch: {{#if page.enableQuickSearch}}{{page.enableQuickSearch}}{{else}}false{{/if}}, enableQuickSearch: {{#if page.enableQuickSearch}}{{page.enableQuickSearch}}{{else}}false{{/if}},
expandSearchForm: {{#if page.expandSearchForm}}{{page.expandSearchForm}}{{else}}false{{/if}}, expandSearchForm: {{#if page.expandSearchForm}}{{page.expandSearchForm}}{{else}}false{{/if}},
{{> @macro/front-end/views/view-base-config.hbs}} {{> @macro/front-end/views/view-base-config.hbs}}
}
}; };
\ No newline at end of file
...@@ -13,7 +13,7 @@ import { {{codeName}}SearchForm } from '@widgets/{{spinalCase psAppDataEntity.co ...@@ -13,7 +13,7 @@ import { {{codeName}}SearchForm } from '@widgets/{{spinalCase psAppDataEntity.co
import { {{codeName}}QuickSearchForm } from '@widgets/{{spinalCase psAppDataEntity.codeName}}/{{spinalCase codeName}}-quick-search-form'; import { {{codeName}}QuickSearchForm } from '@widgets/{{spinalCase psAppDataEntity.codeName}}/{{spinalCase codeName}}-quick-search-form';
{{/if}} {{/if}}
{{#eq controlType "SEARCHBAR"}} {{#eq controlType "SEARCHBAR"}}
import { {{codeName}}SearchBar } from '@widgets/{{spinalCase psAppDataEntity.codeName}}/{{spinalCase codeName}}-searchBar'; import { {{codeName}}SearchBar } from '@widgets/{{spinalCase psAppDataEntity.codeName}}/{{spinalCase codeName}}-searchbar';
{{/eq}} {{/eq}}
{{/page.ctrls}} {{/page.ctrls}}
...@@ -38,7 +38,7 @@ interface ViewEmit { ...@@ -38,7 +38,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const treeView = new TreeView(viewState, props, emit).moduleInstall(); const treeView = new TreeView(viewState(), props, emit).moduleInstall();
const { state, tree, onCtrlEvent, onToolbarEvent, onQuickGroupEvent, onQuickSearchEvent } = treeView; const { state, tree, onCtrlEvent, onToolbarEvent, onQuickGroupEvent, onQuickSearchEvent } = treeView;
{{#if page.psAppCounterRefs}} {{#if page.psAppCounterRefs}}
// 计数器数据 // 计数器数据
......
export const ctrlState = { export const ctrlState = () => {
return {
controlCodeName: '{{ctrl.codeName}}', controlCodeName: '{{ctrl.codeName}}',
controlName: '{{ctrl.name}}', controlName: '{{ctrl.name}}',
defaultOpens: [], defaultOpens: [],
...@@ -9,4 +10,5 @@ export const ctrlState = { ...@@ -9,4 +10,5 @@ export const ctrlState = {
{{/each}} {{/each}}
], ],
funcs: App.getAllFuncs(), funcs: App.getAllFuncs(),
}; }
\ No newline at end of file }
\ No newline at end of file
...@@ -23,7 +23,7 @@ interface CtrlEmit { ...@@ -23,7 +23,7 @@ interface CtrlEmit {
} }
const emit = defineEmits <CtrlEmit> (); const emit = defineEmits <CtrlEmit> ();
const { name, state, onMenuSelect, load } = new MenuControl(ctrlState, props, emit).moduleInstall(); const { name, state, onMenuSelect, load } = new MenuControl(ctrlState(), props, emit).moduleInstall();
// 暴露内部状态及能力 // 暴露内部状态及能力
defineExpose({ name, state, load }); defineExpose({ name, state, load });
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
{{~/eq~}} {{~/eq~}}
{{/inline}} {{/inline}}
// 部件配置对象 // 部件配置对象
export const ctrlState = { export const ctrlState = () => {
return {
controlCodeName: '{{ctrl.codeName}}', controlCodeName: '{{ctrl.codeName}}',
controlName: '{{ctrl.name}}', controlName: '{{ctrl.name}}',
isEnableCustomized: {{ctrl.enableCustomized}}, isEnableCustomized: {{ctrl.enableCustomized}},
...@@ -19,4 +20,5 @@ export const ctrlState = { ...@@ -19,4 +20,5 @@ export const ctrlState = {
{{> getPortlet portlet=portlet}}{{#unless @last}},{{/unless}} {{> getPortlet portlet=portlet}}{{#unless @last}},{{/unless}}
{{~/each~}} {{~/each~}}
] ]
}; }
\ No newline at end of file }
\ No newline at end of file
...@@ -31,7 +31,7 @@ interface CtrlEmit { ...@@ -31,7 +31,7 @@ interface CtrlEmit {
const emit = defineEmits <CtrlEmit> (); const emit = defineEmits <CtrlEmit> ();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const dashboardControl = new DashboardControl(ctrlState, props, emit).moduleInstall(); const dashboardControl = new DashboardControl(ctrlState(), props, emit).moduleInstall();
const { name, state, onCtrlEvent } = dashboardControl; const { name, state, onCtrlEvent } = dashboardControl;
// 暴露内部状态及能力 // 暴露内部状态及能力
......
...@@ -27,7 +27,8 @@ export class ControlVO extends ControlVOBase { ...@@ -27,7 +27,8 @@ export class ControlVO extends ControlVOBase {
{{/each}} {{/each}}
} }
export const ctrlState = { export const ctrlState = () => {
return {
controlCodeName: '{{ctrl.codeName}}', controlCodeName: '{{ctrl.codeName}}',
controlName: '{{ctrl.name}}', controlName: '{{ctrl.name}}',
appEntityCodeName: '{{ctrl.psAppDataEntity.codeName}}', appEntityCodeName: '{{ctrl.psAppDataEntity.codeName}}',
...@@ -96,4 +97,5 @@ export const ctrlState = { ...@@ -96,4 +97,5 @@ export const ctrlState = {
{{/and}} {{/and}}
{{/each}} {{/each}}
} }
}
} }
\ No newline at end of file
...@@ -39,7 +39,7 @@ interface CtrlEmit { ...@@ -39,7 +39,7 @@ interface CtrlEmit {
const emit = defineEmits<CtrlEmit>(); const emit = defineEmits<CtrlEmit>();
// 安装功能模块,提供状态和能力 // 安装功能模块,提供状态和能力
const { name, state, onUIAction, newRow, remove, save, load, refresh, getData, xDataControl, exportExcel, onToolbarEvent, useCustom } = new DataViewControl(ctrlState, props, emit).moduleInstall(); const { name, state, onUIAction, newRow, remove, save, load, refresh, getData, xDataControl, exportExcel, onToolbarEvent, useCustom } = new DataViewControl(ctrlState(), props, emit).moduleInstall();
const { onDataViewItemSelected, isSelected } = useCustom(); const { onDataViewItemSelected, isSelected } = useCustom();
// 暴露内部状态及能力 // 暴露内部状态及能力
...@@ -54,7 +54,20 @@ defineExpose({ name, state, newRow, remove, save, load, refresh, getData, export ...@@ -54,7 +54,20 @@ defineExpose({ name, state, newRow, remove, save, load, refresh, getData, export
justify="start"> justify="start">
<template v-for="(item, index) in state.items" :key="index"> <template v-for="(item, index) in state.items" :key="index">
<a-col {{#if ctrl.cardWidth}}:style="{ width: '{{ctrl.cardWidth}}px'{{#if ctrl.cardHeight}}, height: '{{ctrl.cardHeight}}px'{{/if}} }"{{else}}:span="6"{{#if ctrl.cardHeight}}:style="{ height: '{{ctrl.cardHeight}}px' }"{{/if}}{{/if}}> <a-col {{#if ctrl.cardWidth}}:style="{ width: '{{ctrl.cardWidth}}px'{{#if ctrl.cardHeight}}, height: '{{ctrl.cardHeight}}px'{{/if}} }"{{else}}:span="6"{{#if ctrl.cardHeight}}:style="{ height: '{{ctrl.cardHeight}}px' }"{{/if}}{{/if}}>
<a-card :class="['app-dataview-item', isSelected(item) ? 'app-dataview-item__selection' : '']" @click="(event) => onDataViewItemSelected(item, event)"> {{#if ctrl.itemPSLayoutPanel}}
<{{ctrl.itemPSLayoutPanel.codeName}}Panel
:class="['app-dataview-item', isSelected(item) ? 'app-dataview-item__selection' : '']"
{{#if ctrl.cardHeight}}
:style="{ height: '{{ctrl.cardHeight}}px' }"
{{/if}}
@click="(event) => onDataViewItemSelected(item, event)"
:context="state.context"
:viewParams="state.viewParams"
:navDatas="[item]"
panelType="LAYOUT">
</{{ctrl.itemPSLayoutPanel.codeName}}Panel>
{{else}}
<a-card :class="['app-dataview-item', isSelected(item) ? 'app-dataview-item__selection' : '']" @click="(event) => onDataViewItemSelected(item, event)" {{#if ctrl.cardHeight}}:style="{ height: '{{ctrl.cardHeight}}px' }"{{/if}}>
<template #title> <template #title>
\{{item.srfmajortext}} \{{item.srfmajortext}}
</template> </template>
...@@ -77,6 +90,7 @@ defineExpose({ name, state, newRow, remove, save, load, refresh, getData, export ...@@ -77,6 +90,7 @@ defineExpose({ name, state, newRow, remove, save, load, refresh, getData, export
</template> </template>
<span class="app-dataview-item__description">\{{item.srfdescription}}</span> <span class="app-dataview-item__description">\{{item.srfdescription}}</span>
</a-card> </a-card>
{{/if}}
</a-col> </a-col>
</template> </template>
</a-row> </a-row>
......
...@@ -46,7 +46,8 @@ export class ControlVO extends ControlVOBase { ...@@ -46,7 +46,8 @@ export class ControlVO extends ControlVOBase {
} }
// 部件配置对象 // 部件配置对象
export const ctrlState = { export const ctrlState = () => {
return {
controlCodeName: '{{ctrl.codeName}}', controlCodeName: '{{ctrl.codeName}}',
controlName: '{{ctrl.name}}', controlName: '{{ctrl.name}}',
controlService: new EditFormService<ControlVO>(ControlVO, new {{pascalCase ctrl.psAppDataEntity.codeName}}Service() ), controlService: new EditFormService<ControlVO>(ControlVO, new {{pascalCase ctrl.psAppDataEntity.codeName}}Service() ),
...@@ -166,4 +167,5 @@ export const ctrlState = { ...@@ -166,4 +167,5 @@ export const ctrlState = {
}, },
// 锚点数据集合 // 锚点数据集合
anchorDatas: [], anchorDatas: [],
}
}; };
\ No newline at end of file
...@@ -40,7 +40,7 @@ interface CtrlEmit { ...@@ -40,7 +40,7 @@ interface CtrlEmit {
const emit = defineEmits <CtrlEmit> (); const emit = defineEmits <CtrlEmit> ();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { name, state, load, loadDraft, save, remove, refresh, onEditorEvent, onComponentEvent, getData, xDataCtrl } = new FormControl(ctrlState, props, emit).moduleInstall(); const { name, state, load, loadDraft, save, remove, refresh, onEditorEvent, onComponentEvent, getData, xDataCtrl } = new FormControl(ctrlState(), props, emit).moduleInstall();
// 暴露内部状态及能力 // 暴露内部状态及能力
defineExpose({ name, state, load, loadDraft, save, remove, refresh, getData }); defineExpose({ name, state, load, loadDraft, save, remove, refresh, getData });
......
export const ctrlState = { export const ctrlState = () => {
return {
controlCodeName: '{{ctrl.codeName}}', controlCodeName: '{{ctrl.codeName}}',
controlName: '{{ctrl.name}}', controlName: '{{ctrl.name}}',
counter: 0, counter: 0,
...@@ -46,4 +47,5 @@ export const ctrlState = { ...@@ -46,4 +47,5 @@ export const ctrlState = {
{{/if}} {{/if}}
{{/eq}} {{/eq}}
{{/each}} {{/each}}
}
}; };
...@@ -34,7 +34,7 @@ interface CtrlEmit { ...@@ -34,7 +34,7 @@ interface CtrlEmit {
const emit = defineEmits <CtrlEmit> (); const emit = defineEmits <CtrlEmit> ();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { name, state, onCtrlEvent, xDataControl, search, onToolbarEvent } = new GridExpBarControl(ctrlState, props, emit).moduleInstall(); const { name, state, onCtrlEvent, xDataControl, search, onToolbarEvent } = new GridExpBarControl(ctrlState(), props, emit).moduleInstall();
// 暴露内部状态及能力 // 暴露内部状态及能力
defineExpose({ name, state }); defineExpose({ name, state });
......
...@@ -27,7 +27,8 @@ export class ControlVO extends ControlVOBase { ...@@ -27,7 +27,8 @@ export class ControlVO extends ControlVOBase {
} }
export const ctrlState = { export const ctrlState = () => {
return {
controlCodeName: '{{ctrl.codeName}}', controlCodeName: '{{ctrl.codeName}}',
controlName: '{{ctrl.name}}', controlName: '{{ctrl.name}}',
totalColumnWidth: {{ctrl.totalColumnWidth}}, totalColumnWidth: {{ctrl.totalColumnWidth}},
...@@ -265,4 +266,5 @@ export const ctrlState = { ...@@ -265,4 +266,5 @@ export const ctrlState = {
], ],
{{/each}} {{/each}}
} }
}
}; };
\ No newline at end of file
...@@ -39,7 +39,7 @@ interface CtrlEmit { ...@@ -39,7 +39,7 @@ interface CtrlEmit {
const emit = defineEmits<CtrlEmit>(); const emit = defineEmits<CtrlEmit>();
// 安装功能模块,提供状态和能力 // 安装功能模块,提供状态和能力
const { name, state, useCustom, onEditorEvent, onToolbarEvent, onActionColEvent, newRow, remove, save, load, refresh, getData, exportExcel } = new GridControl(ctrlState, props, emit).moduleInstall(); const { name, state, useCustom, onEditorEvent, onToolbarEvent, onActionColEvent, newRow, remove, save, load, refresh, getData, exportExcel } = new GridControl(ctrlState(), props, emit).moduleInstall();
const { useScrollOption, useRowKey, useRowClassName, useCustomRow, useRowSelectionOption, onResizeColumn, onGridChange, useExpandedRowKeys, onExpandedRowsChange, formRef } = useCustom; const { useScrollOption, useRowKey, useRowClassName, useCustomRow, useRowSelectionOption, onResizeColumn, onGridChange, useExpandedRowKeys, onExpandedRowsChange, formRef } = useCustom;
{{#if ctrl.batchToolBarItems}} {{#if ctrl.batchToolBarItems}}
const renderBatchToolbar = (total: number, range: IParam[]) => { const renderBatchToolbar = (total: number, range: IParam[]) => {
......
export const ctrlState = { export const ctrlState = () => {
return {
controlCodeName: '{{ctrl.codeName}}', controlCodeName: '{{ctrl.codeName}}',
controlName: '{{ctrl.name}}', controlName: '{{ctrl.name}}',
counter: 0, counter: 0,
...@@ -46,4 +47,5 @@ export const ctrlState = { ...@@ -46,4 +47,5 @@ export const ctrlState = {
{{/if}} {{/if}}
{{/eq}} {{/eq}}
{{/each}} {{/each}}
}
}; };
...@@ -34,7 +34,7 @@ interface CtrlEmit { ...@@ -34,7 +34,7 @@ interface CtrlEmit {
const emit = defineEmits <CtrlEmit> (); const emit = defineEmits <CtrlEmit> ();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { name, state, onCtrlEvent, xDataControl, search, onToolbarEvent } = new ListExpBarControl(ctrlState, props, emit).moduleInstall(); const { name, state, onCtrlEvent, xDataControl, search, onToolbarEvent } = new ListExpBarControl(ctrlState(), props, emit).moduleInstall();
// 暴露内部状态及能力 // 暴露内部状态及能力
defineExpose({ name, state }); defineExpose({ name, state });
......
...@@ -35,7 +35,8 @@ export class ControlVO extends ControlVOBase { ...@@ -35,7 +35,8 @@ export class ControlVO extends ControlVOBase {
{{/each}} {{/each}}
} }
export const ctrlState = { export const ctrlState = () => {
return {
controlCodeName: '{{ctrl.codeName}}', controlCodeName: '{{ctrl.codeName}}',
controlName: '{{ctrl.name}}', controlName: '{{ctrl.name}}',
appEntityCodeName: '{{ctrl.psAppDataEntity.codeName}}', appEntityCodeName: '{{ctrl.psAppDataEntity.codeName}}',
...@@ -120,4 +121,5 @@ export const ctrlState = { ...@@ -120,4 +121,5 @@ export const ctrlState = {
{{/and}} {{/and}}
{{/each}} {{/each}}
} }
}
} }
\ No newline at end of file
...@@ -39,7 +39,7 @@ interface CtrlEmit { ...@@ -39,7 +39,7 @@ interface CtrlEmit {
const emit = defineEmits<CtrlEmit>(); const emit = defineEmits<CtrlEmit>();
// 安装功能模块,提供状态和能力 // 安装功能模块,提供状态和能力
const { name, state, onUIAction, newRow, remove, save, load, refresh, getData, xDataControl, exportExcel, useCustom, onToolbarEvent} = new ListControl(ctrlState, props, emit).moduleInstall(); const { name, state, onUIAction, newRow, remove, save, load, refresh, getData, xDataControl, exportExcel, useCustom, onToolbarEvent} = new ListControl(ctrlState(), props, emit).moduleInstall();
const { onListItemSelected, isSelected, loadMore } = useCustom; const { onListItemSelected, isSelected, loadMore } = useCustom;
// 暴露内部状态及能力 // 暴露内部状态及能力
......
export const ctrlState = { export const ctrlState = () => {
return {
controlCodeName: '{{ctrl.codeName}}', controlCodeName: '{{ctrl.codeName}}',
controlName: '{{ctrl.name}}', controlName: '{{ctrl.name}}',
appEntityCodeName: '{{ctrl.psAppDataEntity.codeName}}', appEntityCodeName: '{{ctrl.psAppDataEntity.codeName}}',
...@@ -14,4 +15,5 @@ export const ctrlState = { ...@@ -14,4 +15,5 @@ export const ctrlState = {
{{/each}} {{/each}}
}, },
navDatas: [] navDatas: []
}
} }
\ No newline at end of file
...@@ -28,13 +28,14 @@ interface CtrlEmit { ...@@ -28,13 +28,14 @@ interface CtrlEmit {
const emit = defineEmits <CtrlEmit> (); const emit = defineEmits <CtrlEmit> ();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { name, state, load, onPanelItemEvents, getData, xDataCtrl } = new PanelControl(ctrlState, props, emit).moduleInstall(); const { name, state, onPanelItemEvents, getData, xDataControl } = new PanelControl(ctrlState(), props, emit).moduleInstall();
// 暴露内部状态及能力 // 暴露内部状态及能力
defineExpose({ name, state, load, getData }); defineExpose({ name, state, getData });
</script> </script>
<template> <template>
<AppRow <AppRow
ref="xDataControl"
:class="[ :class="[
'app-panel', 'app-panel',
panelType === 'LAYOUT' ? 'app-layout-panel' : '', panelType === 'LAYOUT' ? 'app-layout-panel' : '',
......
export const ctrlState = { export const ctrlState = () => {
return {
appEntityCodeName: '{{ctrl.psAppDataEntity.codeName}}', appEntityCodeName: '{{ctrl.psAppDataEntity.codeName}}',
appDeCodeName:'{{ctrl.psAppDataEntity.codeName}}', appDeCodeName:'{{ctrl.psAppDataEntity.codeName}}',
appDeLogicName: '{{ctrl.psAppDataEntity.logicName}}', appDeLogicName: '{{ctrl.psAppDataEntity.logicName}}',
...@@ -9,4 +10,5 @@ export const ctrlState = { ...@@ -9,4 +10,5 @@ export const ctrlState = {
selectedData: [], selectedData: [],
data: {}, data: {},
items: [] items: []
}
}; };
\ No newline at end of file
...@@ -37,7 +37,7 @@ interface CtrlEmit { ...@@ -37,7 +37,7 @@ interface CtrlEmit {
const emit = defineEmits <CtrlEmit> (); const emit = defineEmits <CtrlEmit> ();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { name, state, onViewEvent } = new PickupViewPanelControl(ctrlState, props, emit).moduleInstall(); const { name, state, onViewEvent } = new PickupViewPanelControl(ctrlState(), props, emit).moduleInstall();
// 暴露内部状态及能力 // 暴露内部状态及能力
defineExpose({ name, state }); defineExpose({ name, state });
......
// 部件配置对象 // 部件配置对象
export const ctrlState = { export const ctrlState = () => {
return {
controlCodeName: '{{ctrl.codeName}}', controlCodeName: '{{ctrl.codeName}}',
controlName: '{{ctrl.name}}', controlName: '{{ctrl.name}}',
portletType: '{{ctrl.portletType}}', portletType: '{{ctrl.portletType}}',
...@@ -70,4 +71,5 @@ export const ctrlState = { ...@@ -70,4 +71,5 @@ export const ctrlState = {
} }
{{/ctrl.psControls}} {{/ctrl.psControls}}
{{/eq}} {{/eq}}
}
}; };
\ No newline at end of file
...@@ -42,7 +42,7 @@ interface CtrlEmit { ...@@ -42,7 +42,7 @@ interface CtrlEmit {
const emit = defineEmits <CtrlEmit> (); const emit = defineEmits <CtrlEmit> ();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { name, state, onViewEvent, onCtrlEvent, handleItemClick, handleActionClick } = new PortletControl(ctrlState, props, emit).moduleInstall(); const { name, state, onViewEvent, onCtrlEvent, handleItemClick, handleActionClick } = new PortletControl(ctrlState(), props, emit).moduleInstall();
// 暴露内部状态及能力 // 暴露内部状态及能力
defineExpose({ name, state }); defineExpose({ name, state });
......
...@@ -49,7 +49,8 @@ export class ControlVO extends ControlVOBase { ...@@ -49,7 +49,8 @@ export class ControlVO extends ControlVOBase {
} }
// 部件配置对象 // 部件配置对象
export const ctrlState = { export const ctrlState = () => {
return {
controlCodeName: '{{ctrl.codeName}}', controlCodeName: '{{ctrl.codeName}}',
controlName: '{{ctrl.name}}', controlName: '{{ctrl.name}}',
controlService: new EditFormService<ControlVO>(ControlVO, new {{pascalCase ctrl.psAppDataEntity.codeName}}Service() ), controlService: new EditFormService<ControlVO>(ControlVO, new {{pascalCase ctrl.psAppDataEntity.codeName}}Service() ),
...@@ -85,5 +86,6 @@ export const ctrlState = { ...@@ -85,5 +86,6 @@ export const ctrlState = {
{{/if}} {{/if}}
{{/neq}} {{/neq}}
{{/each}} {{/each}}
}, }
}
}; };
\ No newline at end of file
...@@ -27,7 +27,7 @@ interface CtrlEmit { ...@@ -27,7 +27,7 @@ interface CtrlEmit {
const emit = defineEmits<CtrlEmit>(); const emit = defineEmits<CtrlEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { name, state, getData, onEditorEvent } = new QuickSearchFormControl(ctrlState, props, emit).moduleInstall(); const { name, state, getData, onEditorEvent } = new QuickSearchFormControl(ctrlState(), props, emit).moduleInstall();
defineExpose({ name, state, getData }); defineExpose({ name, state, getData });
</script> </script>
......
import {{ctrl.codeName}}SearchBar from "./{{spinalCase ctrl.codeName}}-searchBar.vue"; import {{ctrl.codeName}}SearchBar from "./{{spinalCase ctrl.codeName}}-searchbar.vue";
export { {{ctrl.codeName}}SearchBar }; export { {{ctrl.codeName}}SearchBar };
\ No newline at end of file
export const CtrlConfig = {
controlCodeName: "{{ctrl.codeName}}",
controlName: "{{ctrl.name}}",
detailsModel: {
{{#each ctrl.psSearchBarFilters as | filter | }}
{{filter.name}} : {
label: '{{filter.psAppDEField.logicName}}',
name: '{{filter.name}}',
prop: '{{lowerCase filter.psAppDEField.codeName}}',
disabled: false,
{{#if filter.psDEFSearchMode}}mode: '{{filter.psDEFSearchMode.valueOP}}',{{/if}}
},
{{/each}}
},
}
\ No newline at end of file
<script setup lang="ts"> <script setup lang="ts">
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import { CtrlConfig } from './{{spinalCase ctrl.codeName}}-searchBar-config'; import { ctrlState } from './{{spinalCase ctrl.codeName}}-searchbar-state';
import { SearchBarControl, IActionParam, IParam, IContext, ControlAction, deepCopy } from '@core'; import { SearchBarControl, IActionParam, IParam, IContext, ControlAction, deepCopy } from '@core';
interface Props { interface Props {
...@@ -22,7 +21,7 @@ interface CtrlEmit { ...@@ -22,7 +21,7 @@ interface CtrlEmit {
const emit = defineEmits<CtrlEmit>(); const emit = defineEmits<CtrlEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { name, state } = new SearchBarControl(CtrlConfig, props, emit).moduleInstall(); const { name, state } = new SearchBarControl(ctrlState(), props, emit).moduleInstall();
// 暴露内部状态及能力 // 暴露内部状态及能力
defineExpose({ name, state}); defineExpose({ name, state});
......
export const ctrlState = () => {
return {
controlCodeName: "{{ctrl.codeName}}",
controlName: "{{ctrl.name}}",
detailsModel: {
{{#each ctrl.psSearchBarFilters as | filter | }}
{{filter.name}} : {
label: '{{filter.psAppDEField.logicName}}',
name: '{{filter.name}}',
prop: '{{lowerCase filter.psAppDEField.codeName}}',
disabled: false,
{{#if filter.psDEFSearchMode}}mode: '{{filter.psDEFSearchMode.valueOP}}',{{/if}}
},
{{/each}}
},
}
}
\ No newline at end of file
...@@ -48,7 +48,8 @@ export class ControlVO extends ControlVOBase { ...@@ -48,7 +48,8 @@ export class ControlVO extends ControlVOBase {
} }
// 部件配置对象 // 部件配置对象
export const ctrlState = { export const ctrlState = () => {
return {
autoSearch: {{ctrl.enableAutoSearch}}, autoSearch: {{ctrl.enableAutoSearch}},
controlCodeName: '{{ctrl.codeName}}', controlCodeName: '{{ctrl.codeName}}',
controlName: '{{ctrl.name}}', controlName: '{{ctrl.name}}',
...@@ -86,4 +87,5 @@ export const ctrlState = { ...@@ -86,4 +87,5 @@ export const ctrlState = {
{{/neq}} {{/neq}}
{{/each}} {{/each}}
}, },
}
}; };
\ No newline at end of file
...@@ -27,7 +27,7 @@ interface CtrlEmit { ...@@ -27,7 +27,7 @@ interface CtrlEmit {
const emit = defineEmits<CtrlEmit>(); const emit = defineEmits<CtrlEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { name, state, getData, onEditorEvent, onComponentEvent, onSearch, loadDraft, onSaveHistoryItem, onCancel, onRemoveHistoryItem } = new SearchFormControl(ctrlState, props, emit).moduleInstall(); const { name, state, getData, onEditorEvent, onComponentEvent, onSearch, loadDraft, onSaveHistoryItem, onCancel, onRemoveHistoryItem } = new SearchFormControl(ctrlState(), props, emit).moduleInstall();
defineExpose({ name, state, getData }); defineExpose({ name, state, getData });
</script> </script>
<template> <template>
......
export const ctrlState = { export const ctrlState = () => {
return {
controlCodeName: '{{ctrl.codeName}}', controlCodeName: '{{ctrl.codeName}}',
controlName: '{{ctrl.name}}', controlName: '{{ctrl.name}}',
data: {}, data: {},
...@@ -28,4 +29,5 @@ export const ctrlState = { ...@@ -28,4 +29,5 @@ export const ctrlState = {
{{/each}} {{/each}}
{{/if}} {{/if}}
{{/if}} {{/if}}
}
}; };
\ No newline at end of file
...@@ -36,7 +36,7 @@ interface CtrlEmit { ...@@ -36,7 +36,7 @@ interface CtrlEmit {
const emit = defineEmits <CtrlEmit> (); const emit = defineEmits <CtrlEmit> ();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const tabExpPanelControl = new TabExpPanelControl(ctrlState, props, emit).moduleInstall(); const tabExpPanelControl = new TabExpPanelControl(ctrlState(), props, emit).moduleInstall();
const { name, state, onCtrlEvent, getCounterData } = tabExpPanelControl; const { name, state, onCtrlEvent, getCounterData } = tabExpPanelControl;
// 暴露内部状态及能力 // 暴露内部状态及能力
......
export const ctrlState = { export const ctrlState = () => {
return {
controlCodeName: '{{ctrl.codeName}}', controlCodeName: '{{ctrl.codeName}}',
controlName: '{{ctrl.name}}', controlName: '{{ctrl.name}}',
appDeCodeName: '{{ctrl.psAppDataEntity.codeName}}', appDeCodeName: '{{ctrl.psAppDataEntity.codeName}}',
...@@ -11,10 +12,11 @@ export const ctrlState = { ...@@ -11,10 +12,11 @@ export const ctrlState = {
{{/if}} {{/if}}
} }
{{/if}} {{/if}}
{{#if ctrl.psNavigateContexts}} {{#if ctrl.psNavigateContexts}}
navContexts:{{> @macro/front-end/common/navparam.hbs appNavParams=ctrl.psNavigateContexts}}, navContexts:{{> @macro/front-end/common/navparam.hbs appNavParams=ctrl.psNavigateContexts}},
{{/if}} {{/if}}
{{#if ctrl.psNavigateParams}} {{#if ctrl.psNavigateParams}}
navParams:{{> @macro/front-end/common/navparam.hbs appNavParams=ctrl.psNavigateParams}}, navParams:{{> @macro/front-end/common/navparam.hbs appNavParams=ctrl.psNavigateParams}},
{{/if}} {{/if}}
}
}; };
\ No newline at end of file
...@@ -30,7 +30,7 @@ interface CtrlEmit { ...@@ -30,7 +30,7 @@ interface CtrlEmit {
const emit = defineEmits <CtrlEmit> (); const emit = defineEmits <CtrlEmit> ();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { name, state, onViewEvent } = new TabViewPanelControl(ctrlState, props, emit).moduleInstall(); const { name, state, onViewEvent } = new TabViewPanelControl(ctrlState(), props, emit).moduleInstall();
// 暴露内部状态及能力 // 暴露内部状态及能力
defineExpose({ name, state }); defineExpose({ name, state });
......
export const ctrlState = { export const ctrlState = () => {
return {
controlCodeName: '{{ctrl.codeName}}', controlCodeName: '{{ctrl.codeName}}',
controlName: '{{ctrl.name}}', controlName: '{{ctrl.name}}',
counter: 0, counter: 0,
...@@ -32,4 +33,5 @@ export const ctrlState = { ...@@ -32,4 +33,5 @@ export const ctrlState = {
}, },
{{/each}} {{/each}}
] ]
}
}; };
...@@ -55,7 +55,7 @@ interface CtrlEmit { ...@@ -55,7 +55,7 @@ interface CtrlEmit {
const emit = defineEmits <CtrlEmit> (); const emit = defineEmits <CtrlEmit> ();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { name, state, onCtrlEvent, xDataControl, search, onToolbarEvent } = new TreeExpBarControl(ctrlState, props, emit).moduleInstall(); const { name, state, onCtrlEvent, xDataControl, search, onToolbarEvent } = new TreeExpBarControl(ctrlState(), props, emit).moduleInstall();
// 暴露内部状态及能力 // 暴露内部状态及能力
defineExpose({ name, state }); defineExpose({ name, state });
......
...@@ -184,7 +184,8 @@ export class ControlVO extends ControlVOBase implements TreeControlVO { ...@@ -184,7 +184,8 @@ export class ControlVO extends ControlVOBase implements TreeControlVO {
} }
} }
export const ctrlState = { export const ctrlState = () => {
return {
appEntityCodeName: '{{ctrl.psAppDataEntity.codeName}}', appEntityCodeName: '{{ctrl.psAppDataEntity.codeName}}',
appDeCodeName:'{{ctrl.psAppDataEntity.codeName}}', appDeCodeName:'{{ctrl.psAppDataEntity.codeName}}',
appDeLogicName: '{{ctrl.psAppDataEntity.logicName}}', appDeLogicName: '{{ctrl.psAppDataEntity.logicName}}',
...@@ -227,4 +228,5 @@ export const ctrlState = { ...@@ -227,4 +228,5 @@ export const ctrlState = {
selectedKeys: [], selectedKeys: [],
selectedNodes: [], selectedNodes: [],
selections: [] selections: []
}
}; };
\ No newline at end of file
...@@ -49,7 +49,7 @@ const getCustomText = (scriptCode: any) => { ...@@ -49,7 +49,7 @@ const getCustomText = (scriptCode: any) => {
} }
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { name, state, load, refresh, onTreeNodeSelect, onContextMenuClick, onRightClick, onCheck, getCounterData } = new TreeControl(ctrlState, props, emit).moduleInstall(); const { name, state, load, refresh, onTreeNodeSelect, onContextMenuClick, onRightClick, onCheck, getCounterData } = new TreeControl(ctrlState(), props, emit).moduleInstall();
// 暴露内部状态及能力 // 暴露内部状态及能力
defineExpose({ name, state, load, refresh }); defineExpose({ name, state, load, refresh });
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册