提交 5cc87f7e 编写于 作者: Shine-zwj's avatar Shine-zwj

update:更新

上级 3156441a
controlsAction:{
{{#each page.ctrls as | ctrl | }}
{{ctrl.codeName}}:{
loadAction: '{{ctrl.getPSControlAction.psAppDEMethod.codeName}}',
removeAction: '{{ctrl.removePSControlAction.psAppDEMethod.codeName}}',
updateAction: '{{ctrl.updatePSControlAction.psAppDEMethod.codeName}}',
loadDraftAction: '{{ctrl.getDraftPSControlAction.psAppDEMethod.codeName}}',
createAction: '{{ctrl.getDraftPSControlAction.psAppDEMethod.codeName}}',
},
{{/each}}
loadAction: '{{ctrl.getPSControlAction.psAppDEMethod.codeName}}',
removeAction: '{{ctrl.removePSControlAction.psAppDEMethod.codeName}}',
updateAction: '{{ctrl.updatePSControlAction.psAppDEMethod.codeName}}',
loadDraftAction: '{{ctrl.getDraftPSControlAction.psAppDEMethod.codeName}}',
createAction: '{{ctrl.getDraftPSControlAction.psAppDEMethod.codeName}}',
}
\ No newline at end of file
......@@ -11,4 +11,14 @@
viewType: '{{page.viewType}}',
viewStyle: '{{page.viewStyle}}',
showCaptionBar: '{{page.viewStyle}}',
viewToolbarModel: [
{{#page.ctrls}}
{{#eq controlType "TOOLBAR"}}
{{#psDEToolbarItems}}
{ name:'{{name}}',caption:'{{caption}}',groupExtractMode:'{{groupExtractMode}}',itemType:'{{itemType}}',noPrivDisplayMode:'{{noPrivDisplayMode}}',showIcon:{{showIcon}},showCaption:{{showCaption}},tooltip:'{{tooltip}}' },
{{/psDEToolbarItems}}
{{/eq}}
{{/page.ctrls}}
],
\ No newline at end of file
......@@ -23,10 +23,9 @@
{{/if}}
{{#if (eq item.columnType 'UAGRIDCOLUMN')}}
<ibizToolbar
mode="uiAction"
:toolbarModel="record.{{lowerCase item.codeName}}"
:context="state.context"
:viewParams="state.viewParams"
mode="link"
name="{{lowerCase item.codeName}}"
:actionModel="record.{{lowerCase item.codeName}}"
@toolbarEvent="($event) => handleToolbarEvent(record, $event)"/>
{{/if}}
</div>
......
......@@ -43,6 +43,13 @@ export interface ViewStateBase {
*/
viewSubject: Subject<IActionParam>;
/**
* @description 视图工具栏模型
* @type {IParam[]}
* @memberof ViewStateBase
*/
viewToolbarModel: IParam[];
// 声明任意属性
[propName: string]: any;
}
......@@ -27,7 +27,7 @@ export interface GridControlState extends MainControlState {
* @type {IParam}
* @memberof GridControlState
*/
UAColumnModel: IParam;
uAColumnModel: IParam[];
/**
* @description 值规则
......
......@@ -53,10 +53,10 @@ export class GridControl extends MainControl {
* @memberof GridControl
*/
public getActionAuthState(rowData: IParam) {
const { UIService, UAColumnModel } = this.controlState;
let tempUAColumn: any = deepCopy(UAColumnModel);
calcActionItemAuthState(rowData, tempUAColumn.items, UIService);
return tempUAColumn;
const { UIService, uAColumnModel } = this.controlState;
let tempModel: any = deepCopy(uAColumnModel);
calcActionItemAuthState(rowData, tempModel, UIService);
return tempModel;
}
/**
......@@ -374,7 +374,7 @@ export class GridControl extends MainControl {
// return
// }
const data = [];
for (let i = 0; i < 100; i++) {
for (let i = 0; i < 40; i++) {
data.push({
group: i % 2 === 1 ? "分组1": "分组2",
srfkey: i,
......@@ -389,7 +389,7 @@ export class GridControl extends MainControl {
// dataRef.value = response.data;
if (enablePagingBar) {
// paginationRef.value['total'] = response.total;
paginationRef.value["total"] = 100;
paginationRef.value["total"] = 40;
}
this.calcGridAuthState();
this.handleDefaultSelect();
......
export const ViewConfig = {
{{> @macro/front-end/view/common/viewBaseConfig.hbs}}
{{#page.ctrls}}
{{#eq controlType "TOOLBAR"}}
{{lowerCase codeName}}:{
name:'{{name}}',
items:[
{{#psDEToolbarItems}}
{ name:'{{name}}',caption:'{{caption}}',groupExtractMode:'{{groupExtractMode}}',itemType:'{{itemType}}',noPrivDisplayMode:'{{noPrivDisplayMode}}',showIcon:{{showIcon}},showCaption:{{showCaption}},tooltip:'{{tooltip}}' },
{{/psDEToolbarItems}}
]
},
{{/eq}}
{{/page.ctrls}}
{{> @macro/front-end/view/common/controlAction.hbs}}
{{#each page.ctrls as | ctrl |}}
{{#if (eq ctrl.controlType "FORM")}}
{{> @macro/front-end/view/common/controlAction.hbs ctrl=ctrl}}
{{/if}}
{{/each}}
};
\ No newline at end of file
......@@ -44,26 +44,26 @@ const { state, handleToolbarEvent } = new EditView(ViewConfig).moduleInstall(pro
:text="state.viewCaption"
/>
</template>
{{#page.ctrls}}
{{#eq controlType "TOOLBAR"}}
<template v-slot:header-right>
{{#page.ctrls}}
{{#eq controlType "TOOLBAR"}}
<template v-slot:header-right>
<IbizToolbar
:toolbarModel="state.{{lowerCase codeName}}"
@toolbarEvent="handleToolbarEvent"
:context="state.context"
:viewParams="state.viewParams"/>
mode="button"
name="{{lowerCase codeName}}"
:actionModel="state.viewToolbarModel"
@toolbarEvent="handleToolbarEvent"/>
</template>
{{/eq}}
{{#eq controlType "FORM"}}
<{{codeName}}Form
:showBusyIndicator="true"
:context="state.context"
:viewParams="state.viewParams"
:controlAction="state.controlsAction.{{codeName}}"
:viewSubject="state.viewSubject"
></{{codeName}}Form>
{{/eq}}
{{/page.ctrls}}
{{/eq}}
{{#eq controlType "FORM"}}
<{{codeName}}Form
:showBusyIndicator="true"
:context="state.context"
:viewParams="state.viewParams"
:controlAction="state.controlsAction.{{codeName}}"
:viewSubject="state.viewSubject"
></{{codeName}}Form>
{{/eq}}
{{/page.ctrls}}
</IbizDefaultViewLayout>
</template>
......
export const ViewConfig = {
viewCodeName: '{{page.codeName}}',
viewName: '{{page.name}}',
viewCaption: '{{page.caption}}',
gridRowActiveMode: {{page.gridRowActiveMode}},
rowEditState: {{#if page.enableRowEdit}}{{page.rowEditDefault}}{{else}}false{{/if}},
{{> @macro/front-end/view/common/controlAction.hbs}}
{{> @macro/front-end/view/common/viewBaseConfig.hbs}}
{{#each page.ctrls as | ctrl |}}
{{#if (eq ctrl.controlType "GRID")}}
{{> @macro/front-end/view/common/controlAction.hbs ctrl=ctrl}}
{{/if}}
{{/each}}
};
\ No newline at end of file
......@@ -38,23 +38,29 @@ const { state, handleCtrlEvent } = new GridView(ViewConfig).moduleInstall(props)
<template v-slot:header-left>
<IbizIconText class="ibiz-view__caption" size="large" :text="state.viewCaption" />
</template>
{{#page.ctrls}}
{{#eq controlType "TOOLBAR"}}
<template v-slot:header-right>
<span>工具栏部件</span>
<IbizToolbar
mode="button"
name="{{lowerCase codeName}}"
:actionModel="state.viewToolbarModel"
@toolbarEvent="handleToolbarEvent"/>
</template>
{{#page.ctrls}}
{{#eq controlType "GRID"}}
<{{codeName}}Grid
:context="state.context"
:rowEditState="state.rowEditState"
:rowActiveMode="state.gridRowActiveMode"
:showBusyIndicator="true"
:viewParams="state.viewParams"
:controlAction="state.controlsAction"
:viewSubject="state.viewSubject"
@ctrlEvent="handleCtrlEvent"
></{{codeName}}Grid>
{{/eq}}
{{/page.ctrls}}
{{/eq}}
{{#eq controlType "GRID"}}
<{{codeName}}Grid
:context="state.context"
:rowEditState="state.rowEditState"
:rowActiveMode="state.gridRowActiveMode"
:showBusyIndicator="true"
:viewParams="state.viewParams"
:controlAction="state.controlsAction"
:viewSubject="state.viewSubject"
@ctrlEvent="handleCtrlEvent"
></{{codeName}}Grid>
{{/eq}}
{{/page.ctrls}}
</IbizDefaultViewLayout>
</template>
......
......@@ -43,20 +43,17 @@ export const CtrlConfig = {
enablePagingBar: false,
pagination: false,
{{/if}}
UAColumnModel:{
uAColumnModel:[
{{#each ctrl.psDEGridColumns as | column |}}
{{#if (eq column.columnType 'UAGRIDCOLUMN')}}
name: "{{lowerCase column.codeName}}",
items: [
{{#each column.psDEUIActionGroup.psUIActionGroupDetails as | action |}}
{{#action}}
{ name: "{{name}}", caption: "{{psUIAction.caption}}", showIcon: {{showIcon}}, showCaption: {{showCaption}}, separator: {{addSeparator}}, uIActionTag: "{{psUIAction.uIActionTag}}", noPrivDisplayMode: {{#if psUIAction.noPrivDisplayMode}}{{psUIAction.noPrivDisplayMode}}{{else}}6{{/if}}, disabled: false, visabled: true,{{#if psUIAction.psSysImage}}{{#if psUIAction.psSysImage.imagePath}} imgPath: "{{psUIAction.psSysImage.imagePath}}",{{/if}}{{#if psUIAction.psSysImage.cssClass}} iconCls: "{{psUIAction.psSysImage.cssClass}}",{{/if}}{{/if}} },
{{/action}}
{{/each}}
],
{{#each column.psDEUIActionGroup.psUIActionGroupDetails as | action |}}
{{#action}}
{ name: "{{name}}", caption: "{{psUIAction.caption}}", showIcon: {{showIcon}}, showCaption: {{showCaption}}, separator: {{addSeparator}}, uIActionTag: "{{psUIAction.uIActionTag}}", noPrivDisplayMode: {{#if psUIAction.noPrivDisplayMode}}{{psUIAction.noPrivDisplayMode}}{{else}}6{{/if}}, disabled: false, visabled: true,{{#if psUIAction.psSysImage}}{{#if psUIAction.psSysImage.imagePath}} imgPath: "{{psUIAction.psSysImage.imagePath}}",{{/if}}{{#if psUIAction.psSysImage.cssClass}} iconCls: "{{psUIAction.psSysImage.cssClass}}",{{/if}}{{/if}} },
{{/action}}
{{/each}}
{{/if}}
{{/each}}
},
],
columnsModel: [
{{#if ctrl.enableGroup}}
{{#if ctrl.groupPSAppDEField}}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册