提交 065b406a 编写于 作者: RedPig97's avatar RedPig97

update:命名标准---u2

上级 8347d089
...@@ -40,10 +40,10 @@ ...@@ -40,10 +40,10 @@
{{/eq}} {{/eq}}
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent" @editorEvent="onEditorEvent"
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => handleEditorEvent(index,$event)" @editorEvent="($event) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
:viewParams="state.viewParams" :viewParams="state.viewParams"
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent" @editorEvent="onEditorEvent"
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => handleEditorEvent(index,$event)" @editorEvent="($event) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
{{/if}} {{/if}}
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent" @editorEvent="onEditorEvent"
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => handleEditorEvent(index,$event)" @editorEvent="($event) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
{{/if}} {{/if}}
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent" @editorEvent="onEditorEvent"
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => handleEditorEvent(index,$event)" @editorEvent="($event) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
:context="state.context" :context="state.context"
:viewParams="state.viewParams"/> :viewParams="state.viewParams"/>
\ No newline at end of file
...@@ -26,10 +26,10 @@ ...@@ -26,10 +26,10 @@
{{/if}} {{/if}}
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent" @editorEvent="onEditorEvent"
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => handleEditorEvent(index,$event)" @editorEvent="($event) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
\ No newline at end of file
...@@ -53,10 +53,10 @@ ...@@ -53,10 +53,10 @@
{{/if}} {{/if}}
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent" @editorEvent="onEditorEvent"
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => handleEditorEvent(index,$event)" @editorEvent="($event) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
\ No newline at end of file
...@@ -47,10 +47,10 @@ ...@@ -47,10 +47,10 @@
{{/eq}} {{/eq}}
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent" @editorEvent="onEditorEvent"
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => handleEditorEvent(index,$event)" @editorEvent="($event) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -28,11 +28,11 @@ ...@@ -28,11 +28,11 @@
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
:data="state.data" :data="state.data"
@editorEvent="handleEditorEvent" @editorEvent="onEditorEvent"
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
:data="record" :data="record"
@editorEvent="($event) => handleEditorEvent(index,$event)" @editorEvent="($event) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
{{/if}} {{/if}}
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent" @editorEvent="onEditorEvent"
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => handleEditorEvent(index,$event)" @editorEvent="($event) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
{{/eq}} {{/eq}}
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent" @editorEvent="onEditorEvent"
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => handleEditorEvent(index,$event)" @editorEvent="($event) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
:viewParams="state.viewParams" :viewParams="state.viewParams"
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent" @editorEvent="onEditorEvent"
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => handleEditorEvent(index,$event)" @editorEvent="($event) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
:viewParams="state.viewParams" :viewParams="state.viewParams"
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent" @editorEvent="onEditorEvent"
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => handleEditorEvent(index,$event)" @editorEvent="($event) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
\ No newline at end of file
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
{{/if}} {{/if}}
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent" @editorEvent="onEditorEvent"
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => handleEditorEvent(index,$event)" @editorEvent="($event) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
{{/if}} {{/if}}
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent" @editorEvent="onEditorEvent"
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => handleEditorEvent(index,$event)" @editorEvent="($event) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -20,11 +20,11 @@ ...@@ -20,11 +20,11 @@
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
:data="state.data" :data="state.data"
@editorEvent="handleEditorEvent" @editorEvent="onEditorEvent"
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
:data="record" :data="record"
@editorEvent="($event) => handleEditorEvent(index,$event)" @editorEvent="($event) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
{{/if}} {{/if}}
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent" @editorEvent="onEditorEvent"
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => handleEditorEvent(index,$event)" @editorEvent="($event) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
{{/if}} {{/if}}
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent" @editorEvent="onEditorEvent"
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => handleEditorEvent(index,$event)" @editorEvent="($event) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
{{/if}} {{/if}}
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent" @editorEvent="onEditorEvent"
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => handleEditorEvent(index,$event)" @editorEvent="($event) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
{{/eq}} {{/eq}}
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}} {{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
@editorEvent="handleEditorEvent" @editorEvent="onEditorEvent"
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => handleEditorEvent(index,$event)" @editorEvent="($event) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
:titleBarCloseMode="{{item.titleBarCloseMode}}" :titleBarCloseMode="{{item.titleBarCloseMode}}"
:showCaption="{{item.showCaption}}" :showCaption="{{item.showCaption}}"
:uIActionGroup="state.detailsModel.{{item.codeName}}.uIActionGroup" :uIActionGroup="state.detailsModel.{{item.codeName}}.uIActionGroup"
@componentEvent="handleComponentEvent"> @componentEvent="onComponentEvent">
{{#eq item.psLayout.layout "FLEX"}} {{#eq item.psLayout.layout "FLEX"}}
<div class="app-form-layout-flex" style="{{#if item.psLayout.dir}}flex-direction: {{item.psLayout.dir}};{{/if}}{{#if item.psLayout.align}}justify-content: {{item.psLayout.align}};{{/if}}{{#if item.psLayout.vAlign}}align-items: {{item.psLayout.vAlign}};{{/if}}"> <div class="app-form-layout-flex" style="{{#if item.psLayout.dir}}flex-direction: {{item.psLayout.dir}};{{/if}}{{#if item.psLayout.align}}justify-content: {{item.psLayout.align}};{{/if}}{{#if item.psLayout.vAlign}}align-items: {{item.psLayout.vAlign}};{{/if}}">
{{#each item.psDEFormDetails as | formDetail |}} {{#each item.psDEFormDetails as | formDetail |}}
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
:titleBarCloseMode="{{item.titleBarCloseMode}}" :titleBarCloseMode="{{item.titleBarCloseMode}}"
:showCaption="{{item.showCaption}}" :showCaption="{{item.showCaption}}"
:uIActionGroup="state.detailsModel.{{item.codeName}}.uIActionGroup" :uIActionGroup="state.detailsModel.{{item.codeName}}.uIActionGroup"
@componentEvent="handleComponentEvent"> @componentEvent="onComponentEvent">
{{#eq item.psLayout.layout "FLEX"}} {{#eq item.psLayout.layout "FLEX"}}
<div class="app-form-layout-flex" style="{{#if item.psLayout.dir}}flex-direction: {{item.psLayout.dir}};{{/if}}{{#if item.psLayout.align}}justify-content: {{item.psLayout.align}};{{/if}}{{#if item.psLayout.vAlign}}align-items: {{item.psLayout.vAlign}};{{/if}}"> <div class="app-form-layout-flex" style="{{#if item.psLayout.dir}}flex-direction: {{item.psLayout.dir}};{{/if}}{{#if item.psLayout.align}}justify-content: {{item.psLayout.align}};{{/if}}{{#if item.psLayout.vAlign}}align-items: {{item.psLayout.vAlign}};{{/if}}">
{{#each item.psDEFormDetails as | formDetail |}} {{#each item.psDEFormDetails as | formDetail |}}
......
...@@ -29,7 +29,7 @@ export class MainView extends ViewBase { ...@@ -29,7 +29,7 @@ export class MainView extends ViewBase {
* @param {IActionParam} actionParam * @param {IActionParam} actionParam
* @memberof MainView * @memberof MainView
*/ */
public handleToolbarEvent(actionParam: IActionParam) { public onToolbarEvent(actionParam: IActionParam) {
const { tag, action, data } = actionParam; const { tag, action, data } = actionParam;
if (!tag || !action || !data) { if (!tag || !action || !data) {
console.warn("工具栏执行参数不足"); console.warn("工具栏执行参数不足");
...@@ -58,7 +58,7 @@ export class MainView extends ViewBase { ...@@ -58,7 +58,7 @@ export class MainView extends ViewBase {
* @param {IActionParam} actionParam * @param {IActionParam} actionParam
* @memberof MainView * @memberof MainView
*/ */
public handleCtrlEvent(actionParam: IActionParam) { } public onCtrlEvent(actionParam: IActionParam) { }
/** /**
* @description 安装视图所有功能模块的方法 * @description 安装视图所有功能模块的方法
...@@ -70,8 +70,8 @@ export class MainView extends ViewBase { ...@@ -70,8 +70,8 @@ export class MainView extends ViewBase {
return { return {
...superParams, ...superParams,
xDataControl: this.xDataControl, xDataControl: this.xDataControl,
handleToolbarEvent: this.handleToolbarEvent.bind(this), onToolbarEvent: this.onToolbarEvent.bind(this),
handleCtrlEvent: this.handleCtrlEvent.bind(this), onCtrlEvent: this.onCtrlEvent.bind(this),
}; };
} }
} }
...@@ -104,6 +104,18 @@ export class MDView extends MainView { ...@@ -104,6 +104,18 @@ export class MDView extends MainView {
this.state.isLoadDefault = true; this.state.isLoadDefault = true;
} }
/**
* @description 快速分组查询
* @param {*} [args={}]
* @memberof MDView
*/
public handleQuickGroupSearch(args: any = {}): void {
const { viewParams } = this.state;
Object.assign(viewParams,{quickGroup: args})
const tag = this.getMDCtrl().name;
this.next({ tag: tag, action: 'load', data: viewParams });
}
/** /**
* 搜索表单搜索 * 搜索表单搜索
* *
...@@ -210,9 +222,9 @@ export class MDView extends MainView { ...@@ -210,9 +222,9 @@ export class MDView extends MainView {
* @param {IActionParam} $event * @param {IActionParam} $event
* @memberof MDView * @memberof MDView
*/ */
public handleQuickGroupEvent($event: IActionParam) { public onQuickGroupEvent($event: IActionParam) {
if ($event) { if ($event) {
this.onSearchFormSearch($event); this.handleQuickGroupSearch($event);
} }
} }
...@@ -228,7 +240,7 @@ export class MDView extends MainView { ...@@ -228,7 +240,7 @@ export class MDView extends MainView {
xDataControl: this.xDataControl, xDataControl: this.xDataControl,
searchForm: this.searchForm, searchForm: this.searchForm,
searchBar: this.searchBar, searchBar: this.searchBar,
handleQuickGroupEvent: this.handleQuickGroupEvent.bind(this) onQuickGroupEvent: this.onQuickGroupEvent.bind(this)
}; };
} }
......
...@@ -605,7 +605,7 @@ export class FormControl extends MainControl { ...@@ -605,7 +605,7 @@ export class FormControl extends MainControl {
* @param {IActionParam} actionParam 行为参数 * @param {IActionParam} actionParam 行为参数
* @memberof FormControl * @memberof FormControl
*/ */
public handleEditorEvent(actionParam: IActionParam) { public onEditorEvent(actionParam: IActionParam) {
const { tag, action, data } = actionParam; const { tag, action, data } = actionParam;
switch (action) { switch (action) {
case 'valueChange': case 'valueChange':
...@@ -621,7 +621,7 @@ export class FormControl extends MainControl { ...@@ -621,7 +621,7 @@ export class FormControl extends MainControl {
* @param {IActionParam} actionParam 行为参数 * @param {IActionParam} actionParam 行为参数
* @memberof FormControl * @memberof FormControl
*/ */
public handleComponentEvent(actionParam: IActionParam) { public onComponentEvent(actionParam: IActionParam) {
const { tag, action, data } = actionParam; const { tag, action, data } = actionParam;
switch (action) { switch (action) {
case 'formGroupAction': case 'formGroupAction':
...@@ -654,8 +654,8 @@ export class FormControl extends MainControl { ...@@ -654,8 +654,8 @@ export class FormControl extends MainControl {
load: this.useLoad(), load: this.useLoad(),
loadDraft: this.useLoadDraft(), loadDraft: this.useLoadDraft(),
save: this.useSave(), save: this.useSave(),
handleEditorEvent: this.handleEditorEvent.bind(this), onEditorEvent: this.onEditorEvent.bind(this),
handleComponentEvent: this.handleComponentEvent.bind(this), onComponentEvent: this.onComponentEvent.bind(this),
}; };
} }
} }
...@@ -91,11 +91,11 @@ export class GridControl extends MDControl { ...@@ -91,11 +91,11 @@ export class GridControl extends MDControl {
}; };
}); });
// 列拖动 // 列拖动
const handleResizeColumn = (width: number, column: IParam) => { const onResizeColumn = (width: number, column: IParam) => {
column.width = width; column.width = width;
} }
// 处理表格变化(分页,过滤,排序) // 处理表格变化(分页,过滤,排序)
const handleGridChange = (pagination: IParam, filters: IParam, sorter: IParam, data: IParam) => { const onGridChange = (pagination: IParam, filters: IParam, sorter: IParam, data: IParam) => {
if (pagination) { if (pagination) {
this.useLoad().load(); this.useLoad().load();
} }
...@@ -106,8 +106,8 @@ export class GridControl extends MDControl { ...@@ -106,8 +106,8 @@ export class GridControl extends MDControl {
useRowClassName, useRowClassName,
useCustomRow, useCustomRow,
useRowSelectionOption, useRowSelectionOption,
handleResizeColumn, onResizeColumn,
handleGridChange onGridChange
} }
} }
......
...@@ -19,8 +19,8 @@ export class QuickSearchFormControl extends FormControl { ...@@ -19,8 +19,8 @@ export class QuickSearchFormControl extends FormControl {
* @param {IActionParam} actionParam 行为参数 * @param {IActionParam} actionParam 行为参数
* @memberof FormControl * @memberof FormControl
*/ */
public handleEditorEvent(actionParam: IActionParam) { public onEditorEvent(actionParam: IActionParam) {
super.handleEditorEvent(actionParam); super.onEditorEvent(actionParam);
this.emit("onCtrlEvent", { this.emit("onCtrlEvent", {
tag: this.state.controlName, tag: this.state.controlName,
action: "selectionChange", action: "selectionChange",
......
...@@ -40,7 +40,7 @@ export class SearchFormControl extends FormControl { ...@@ -40,7 +40,7 @@ export class SearchFormControl extends FormControl {
* @description 添加历史项 * @description 添加历史项
* @memberof SearchFormControl * @memberof SearchFormControl
*/ */
public addHistoryItem() { public onSaveHistoryItem() {
//todo saveModel服务 //todo saveModel服务
this.state.showPopover = false; this.state.showPopover = false;
} }
...@@ -50,7 +50,7 @@ export class SearchFormControl extends FormControl { ...@@ -50,7 +50,7 @@ export class SearchFormControl extends FormControl {
* @param {IParam} item * @param {IParam} item
* @memberof SearchFormControl * @memberof SearchFormControl
*/ */
public removeHistoryItem(item: IParam) { public onRemoveHistoryItem(item: IParam) {
const index = this.state.historyItems.findIndex((_item: IParam) => { const index = this.state.historyItems.findIndex((_item: IParam) => {
return item.name == _item.name && item.value == _item.value; return item.name == _item.name && item.value == _item.value;
}) })
...@@ -80,8 +80,8 @@ export class SearchFormControl extends FormControl { ...@@ -80,8 +80,8 @@ export class SearchFormControl extends FormControl {
...superParams, ...superParams,
onSearch: this.onSearch.bind(this), onSearch: this.onSearch.bind(this),
onCancel: this.onCancel.bind(this), onCancel: this.onCancel.bind(this),
addHistoryItem: this.addHistoryItem.bind(this), onSaveHistoryItem: this.onSaveHistoryItem.bind(this),
removeHistoryItem: this.removeHistoryItem.bind(this), onRemoveHistoryItem: this.onRemoveHistoryItem.bind(this),
}; };
} }
} }
...@@ -29,7 +29,7 @@ interface ViewEmit { ...@@ -29,7 +29,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { state, form, handleToolbarEvent } = new EditView(viewState, props, emit).moduleInstall(); const { state, form, onToolbarEvent } = new EditView(viewState, props, emit).moduleInstall();
</script> </script>
...@@ -51,7 +51,7 @@ const { state, form, handleToolbarEvent } = new EditView(viewState, props, emit) ...@@ -51,7 +51,7 @@ const { state, form, handleToolbarEvent } = new EditView(viewState, props, emit)
mode="button" mode="button"
name="{{lowerCase codeName}}" name="{{lowerCase codeName}}"
:actionModel="state.toolbar" :actionModel="state.toolbar"
@onToolbarEvent="handleToolbarEvent"/> @onToolbarEvent="onToolbarEvent"/>
</template> </template>
{{/eq}} {{/eq}}
{{#eq controlType "FORM"}} {{#eq controlType "FORM"}}
......
...@@ -36,7 +36,7 @@ interface ViewEmit { ...@@ -36,7 +36,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { state, grid, handleCtrlEvent, handleToolbarEvent, handleQuickGroupEvent } = new GridView(viewState, props, emit).moduleInstall(); const { state, grid, onCtrlEvent, onToolbarEvent, onQuickGroupEvent } = new GridView(viewState, props, emit).moduleInstall();
</script> </script>
...@@ -47,7 +47,7 @@ const { state, grid, handleCtrlEvent, handleToolbarEvent, handleQuickGroupEvent ...@@ -47,7 +47,7 @@ const { state, grid, handleCtrlEvent, handleToolbarEvent, handleQuickGroupEvent
</template> </template>
{{#if page.enableQuickGroup}} {{#if page.enableQuickGroup}}
<template v-slot:quickGroupSearch> <template v-slot:quickGroupSearch>
<app-quick-group :quickGroupModel="state.quickGroupPSCodeList" @onQuickGroupEvent="handleQuickGroupEvent" /> <app-quick-group :quickGroupModel="state.quickGroupPSCodeList" @onQuickGroupEvent="onQuickGroupEvent" />
</template> </template>
{{/if}} {{/if}}
{{#page.ctrls}} {{#page.ctrls}}
...@@ -57,7 +57,7 @@ const { state, grid, handleCtrlEvent, handleToolbarEvent, handleQuickGroupEvent ...@@ -57,7 +57,7 @@ const { state, grid, handleCtrlEvent, handleToolbarEvent, handleQuickGroupEvent
mode="button" mode="button"
name="{{lowerCase codeName}}" name="{{lowerCase codeName}}"
:actionModel="state.toolbar" :actionModel="state.toolbar"
@onToolbarEvent="handleToolbarEvent"/> @onToolbarEvent="onToolbarEvent"/>
</template> </template>
{{/eq}} {{/eq}}
{{#if (and (eq controlType "SEARCHFORM") (eq name 'searchform'))}} {{#if (and (eq controlType "SEARCHFORM") (eq name 'searchform'))}}
...@@ -72,7 +72,7 @@ const { state, grid, handleCtrlEvent, handleToolbarEvent, handleQuickGroupEvent ...@@ -72,7 +72,7 @@ const { state, grid, handleCtrlEvent, handleToolbarEvent, handleQuickGroupEvent
:viewParams="state.viewParams" :viewParams="state.viewParams"
:controlAction="state.{{camelCase name}}.action" :controlAction="state.{{camelCase name}}.action"
:viewSubject="state.viewSubject" :viewSubject="state.viewSubject"
@onCtrlEvent="handleCtrlEvent" @onCtrlEvent="onCtrlEvent"
></{{codeName}}SearchForm> ></{{codeName}}SearchForm>
</template> </template>
<a-button><filter-outlined /></a-button> <a-button><filter-outlined /></a-button>
...@@ -86,7 +86,7 @@ const { state, grid, handleCtrlEvent, handleToolbarEvent, handleQuickGroupEvent ...@@ -86,7 +86,7 @@ const { state, grid, handleCtrlEvent, handleToolbarEvent, handleQuickGroupEvent
:viewParams="state.viewParams" :viewParams="state.viewParams"
:controlAction="state.{{camelCase name}}.action" :controlAction="state.{{camelCase name}}.action"
:viewSubject="state.viewSubject" :viewSubject="state.viewSubject"
@onCtrlEvent="handleCtrlEvent" @onCtrlEvent="onCtrlEvent"
></{{codeName}}SearchForm> ></{{codeName}}SearchForm>
</template> </template>
{{/if}} {{/if}}
...@@ -98,7 +98,7 @@ const { state, grid, handleCtrlEvent, handleToolbarEvent, handleQuickGroupEvent ...@@ -98,7 +98,7 @@ const { state, grid, handleCtrlEvent, handleToolbarEvent, handleQuickGroupEvent
:viewParams="state.viewParams" :viewParams="state.viewParams"
:controlAction="state.{{camelCase name}}.action" :controlAction="state.{{camelCase name}}.action"
:viewSubject="state.viewSubject" :viewSubject="state.viewSubject"
@onCtrlEvent="handleCtrlEvent" @onCtrlEvent="onCtrlEvent"
></{{codeName}}QuickSearchForm> ></{{codeName}}QuickSearchForm>
</template> </template>
{{/if}} {{/if}}
...@@ -112,7 +112,7 @@ const { state, grid, handleCtrlEvent, handleToolbarEvent, handleQuickGroupEvent ...@@ -112,7 +112,7 @@ const { state, grid, handleCtrlEvent, handleToolbarEvent, handleQuickGroupEvent
:viewParams="state.viewParams" :viewParams="state.viewParams"
:controlAction="state.{{name}}.action" :controlAction="state.{{name}}.action"
:viewSubject="state.viewSubject" :viewSubject="state.viewSubject"
@onCtrlEvent="handleCtrlEvent" @onCtrlEvent="onCtrlEvent"
></{{codeName}}Grid> ></{{codeName}}Grid>
{{/eq}} {{/eq}}
{{/page.ctrls}} {{/page.ctrls}}
......
...@@ -25,7 +25,7 @@ interface CtrlEmit { ...@@ -25,7 +25,7 @@ interface CtrlEmit {
const emit = defineEmits < CtrlEmit > (); const emit = defineEmits < CtrlEmit > ();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { state, handleEditorEvent, handleComponentEvent } = new FormControl(ctrlState, props, emit).moduleInstall(); const { state, onEditorEvent, onComponentEvent } = new FormControl(ctrlState, props, emit).moduleInstall();
// 暴露内部状态及能力 // 暴露内部状态及能力
defineExpose({ state, name: '{{ctrl.name}}' }); defineExpose({ state, name: '{{ctrl.name}}' });
......
...@@ -31,7 +31,7 @@ const emit = defineEmits<{(event: 'onCtrlevent', value: IActionParam): void;}>() ...@@ -31,7 +31,7 @@ const emit = defineEmits<{(event: 'onCtrlevent', value: IActionParam): void;}>()
// 安装功能模块,提供状态和能力 // 安装功能模块,提供状态和能力
const { state, useCustom } = new GridControl(ctrlState, props, emit).moduleInstall(); const { state, useCustom } = new GridControl(ctrlState, props, emit).moduleInstall();
const { useScrollOption, useRowKey, useRowClassName, useCustomRow, useRowSelectionOption, handleResizeColumn, handleGridChange } = useCustom; const { useScrollOption, useRowKey, useRowClassName, useCustomRow, useRowSelectionOption, onResizeColumn, onGridChange } = useCustom;
// 暴露内部状态及能力 // 暴露内部状态及能力
defineExpose({ state, name: '{{ctrl.name}}' }); defineExpose({ state, name: '{{ctrl.name}}' });
...@@ -51,8 +51,8 @@ defineExpose({ state, name: '{{ctrl.name}}' }); ...@@ -51,8 +51,8 @@ defineExpose({ state, name: '{{ctrl.name}}' });
:pagination="state.mdCtrlPaging.pagination" :pagination="state.mdCtrlPaging.pagination"
:customRow="customRow" :customRow="customRow"
:rowClassName="rowClassName" :rowClassName="rowClassName"
@change="handleGridChange" @change="onGridChange"
@resizeColumn="handleResizeColumn" @resizeColumn="onResizeColumn"
> >
<template #emptyText> <template #emptyText>
<div class="not-data"> <div class="not-data">
......
...@@ -26,7 +26,7 @@ interface CtrlEmit { ...@@ -26,7 +26,7 @@ interface CtrlEmit {
const emit = defineEmits<CtrlEmit>(); const emit = defineEmits<CtrlEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { state, handleEditorEvent } = new QuickSearchFormControl(ctrlState, props, emit).moduleInstall(); const { state, onEditorEvent } = new QuickSearchFormControl(ctrlState, props, emit).moduleInstall();
</script> </script>
<template> <template>
......
...@@ -26,7 +26,7 @@ interface CtrlEmit { ...@@ -26,7 +26,7 @@ interface CtrlEmit {
const emit = defineEmits<CtrlEmit>(); const emit = defineEmits<CtrlEmit>();
// 安装功能模块,提供状态和能力方法 // 安装功能模块,提供状态和能力方法
const { state, handleEditorEvent, handleComponentEvent, onSearch, loadDraft, addHistoryItem, onCancel, removeHistoryItem } = new SearchFormControl(ctrlState, props, emit).moduleInstall(); const { state, onEditorEvent, onComponentEvent, onSearch, loadDraft, onSaveHistoryItem, onCancel, onRemoveHistoryItem } = new SearchFormControl(ctrlState, props, emit).moduleInstall();
</script> </script>
<template> <template>
...@@ -63,7 +63,7 @@ const { state, handleEditorEvent, handleComponentEvent, onSearch, loadDraft, add ...@@ -63,7 +63,7 @@ const { state, handleEditorEvent, handleComponentEvent, onSearch, loadDraft, add
v-model:Value="state.selectHistoryItem" v-model:Value="state.selectHistoryItem"
@change="handleChange" @change="handleChange"
> >
<a-select-option class="search-form-history-option" v-for="(item,index) in state.historyItems" :key="index" :value="item.value">\{{item.name}} <close-outlined @click="() => removeHistoryItem(item)" /></a-select-option> <a-select-option class="search-form-history-option" v-for="(item,index) in state.historyItems" :key="index" :value="item.value">\{{item.name}} <close-outlined @click="() => onRemoveHistoryItem(item)" /></a-select-option>
</a-select> </a-select>
<a-button class='search-button' @click="onSearch" type="primary">搜索</a-button> <a-button class='search-button' @click="onSearch" type="primary">搜索</a-button>
<a-button class='reset-button' @click='loadDraft'>重置</a-button> <a-button class='reset-button' @click='loadDraft'>重置</a-button>
...@@ -72,7 +72,7 @@ const { state, handleEditorEvent, handleComponentEvent, onSearch, loadDraft, add ...@@ -72,7 +72,7 @@ const { state, handleEditorEvent, handleComponentEvent, onSearch, loadDraft, add
<a-input /> <a-input />
<div class="search-form-buttons"> <div class="search-form-buttons">
<a-button @click="onCancel">取消</a-button> <a-button @click="onCancel">取消</a-button>
<a-button @click="addHistoryItem" type="primary">保存</a-button> <a-button @click="onSaveHistoryItem" type="primary">保存</a-button>
</div> </div>
</template> </template>
<a-button><save-outlined /></a-button> <a-button><save-outlined /></a-button>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册