imm-element-ui 2.3.7 → 2.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/am/am.component.mjs +2 -1
- package/esm2022/lib/mock/index.mjs +2 -0
- package/esm2022/lib/mock/mssf-task.mock.mjs +950 -0
- package/esm2022/lib/page-form/page-form.component.mjs +7 -17
- package/fesm2022/imm-element-ui.mjs +7 -16
- package/fesm2022/imm-element-ui.mjs.map +1 -1
- package/lib/crumb-action/crumb-action.component.d.ts +1 -1
- package/lib/grid/grid/grid.component.d.ts +1 -1
- package/lib/mock/index.d.ts +1 -0
- package/lib/mock/mssf-task.mock.d.ts +142 -0
- package/lib/page-form/page-form.component.d.ts +1 -2
- package/package.json +1 -1
|
@@ -399,6 +399,7 @@ class AmComponent {
|
|
|
399
399
|
if (!param.hasOwnProperty('modelName')) {
|
|
400
400
|
param.modelName = this.modelName;
|
|
401
401
|
}
|
|
402
|
+
console.log(`web_get`, param);
|
|
402
403
|
// this.loadingService.setLoading(true);
|
|
403
404
|
return this.http.post(apiPath + 'get', param).pipe(map((response) => {
|
|
404
405
|
this.getPrm.data = response;
|
|
@@ -9218,7 +9219,6 @@ class PageFormComponent extends AmComponent {
|
|
|
9218
9219
|
this.saveFunc = input();
|
|
9219
9220
|
this.configNewPath = input();
|
|
9220
9221
|
this.customLeftPanel = input(null);
|
|
9221
|
-
this.selectedId = input();
|
|
9222
9222
|
this.currentIdAndModelName = {};
|
|
9223
9223
|
this.userHistoryService = inject(UserHistoryService);
|
|
9224
9224
|
this.pageFormService = inject(PageFormService);
|
|
@@ -9241,7 +9241,7 @@ class PageFormComponent extends AmComponent {
|
|
|
9241
9241
|
this.slotMap = new Map();
|
|
9242
9242
|
this.slotContextMap = new Map();
|
|
9243
9243
|
this.slotRenderStates = [];
|
|
9244
|
-
this.id =
|
|
9244
|
+
this.id = Number(this.route.snapshot.paramMap.get('id'));
|
|
9245
9245
|
this.pageUrl = this.route.snapshot.url
|
|
9246
9246
|
.map((segment) => segment.path)
|
|
9247
9247
|
.join('/')
|
|
@@ -9250,8 +9250,8 @@ class PageFormComponent extends AmComponent {
|
|
|
9250
9250
|
effect(() => {
|
|
9251
9251
|
this.modelName = this.getPrmInput().modelName;
|
|
9252
9252
|
this.getPrm = { ...this.getPrmInput() };
|
|
9253
|
-
this.id && (this.getPrm.id = this.
|
|
9254
|
-
if (this.
|
|
9253
|
+
this.id && (this.getPrm.id = this.id);
|
|
9254
|
+
if (this.modelName) {
|
|
9255
9255
|
typeof this.formDetail() == 'function' ? this.formDetail()(this.id) : this.getDetail();
|
|
9256
9256
|
}
|
|
9257
9257
|
else {
|
|
@@ -9316,7 +9316,6 @@ class PageFormComponent extends AmComponent {
|
|
|
9316
9316
|
this.refreshSlotRenderStates();
|
|
9317
9317
|
});
|
|
9318
9318
|
this.pageFormService.updateDataByKey$.pipe(takeUntil(this.destroy$)).subscribe(({ key, value }) => {
|
|
9319
|
-
console.log(key, value);
|
|
9320
9319
|
this.mergeUpsert(value);
|
|
9321
9320
|
this.refreshSlotRenderStates();
|
|
9322
9321
|
this.cdr.markForCheck();
|
|
@@ -9344,7 +9343,6 @@ class PageFormComponent extends AmComponent {
|
|
|
9344
9343
|
let sub = this.upsertPrm.subsert[index];
|
|
9345
9344
|
if (action == 'add') {
|
|
9346
9345
|
let mainField = this.gridList()[index]['gridOptions']['mainField'];
|
|
9347
|
-
console.log('mainField', mainField, field, recordIndex);
|
|
9348
9346
|
sub['maptmp']?.set(recordIndex, { ...data });
|
|
9349
9347
|
if (field == mainField) {
|
|
9350
9348
|
sub['logtmp']?.set(recordIndex + field, { newValue: newValue, id: 0, label: headerName });
|
|
@@ -9386,7 +9384,6 @@ class PageFormComponent extends AmComponent {
|
|
|
9386
9384
|
dt.push(value);
|
|
9387
9385
|
});
|
|
9388
9386
|
sub['subData'] = dt;
|
|
9389
|
-
console.log('upsert-----', this.upsertPrm);
|
|
9390
9387
|
this.action.saveSignal.set(true);
|
|
9391
9388
|
}
|
|
9392
9389
|
ngAfterViewInit() {
|
|
@@ -9401,7 +9398,6 @@ class PageFormComponent extends AmComponent {
|
|
|
9401
9398
|
}
|
|
9402
9399
|
submitForm() {
|
|
9403
9400
|
// this.tabForm.validate()
|
|
9404
|
-
console.log('getPrm---test---', this.getPrm);
|
|
9405
9401
|
let subForm = true;
|
|
9406
9402
|
if (this.tabForm.length > 0) {
|
|
9407
9403
|
this.tabForm.forEach((item) => {
|
|
@@ -9411,8 +9407,6 @@ class PageFormComponent extends AmComponent {
|
|
|
9411
9407
|
});
|
|
9412
9408
|
}
|
|
9413
9409
|
if (this.cForm.validate() && subForm) {
|
|
9414
|
-
console.log('submitForm', this.cForm, subForm);
|
|
9415
|
-
console.log(`this.upsertPrm`, this.upsertPrm);
|
|
9416
9410
|
let cb = this.id === 0 ? null : this.upCb;
|
|
9417
9411
|
this.action.loading.set(true);
|
|
9418
9412
|
typeof this.saveFunc() == 'function' ? this.saveFunc()(this.upsertPrm, this.id, cb) : this.upsert(null, cb);
|
|
@@ -9477,8 +9471,6 @@ class PageFormComponent extends AmComponent {
|
|
|
9477
9471
|
});
|
|
9478
9472
|
this.action.saveSignal.set(true);
|
|
9479
9473
|
}
|
|
9480
|
-
console.log(`grid`, grid, grid.selectData);
|
|
9481
|
-
console.log({ type: 'add', data: grid.selectData });
|
|
9482
9474
|
this.action.updateGridAction({ type: 'add', data: grid.selectData });
|
|
9483
9475
|
if (!!grid.slotKey) {
|
|
9484
9476
|
const { subDataKey } = grid;
|
|
@@ -9523,6 +9515,7 @@ class PageFormComponent extends AmComponent {
|
|
|
9523
9515
|
}
|
|
9524
9516
|
}
|
|
9525
9517
|
getDetail() {
|
|
9518
|
+
this.indexValue = 0;
|
|
9526
9519
|
this.web_get(this.getPrm).subscribe((res) => {
|
|
9527
9520
|
this.detailCb(res);
|
|
9528
9521
|
});
|
|
@@ -9560,7 +9553,6 @@ class PageFormComponent extends AmComponent {
|
|
|
9560
9553
|
this.userHistoryService.setLastTitle(title);
|
|
9561
9554
|
}
|
|
9562
9555
|
dataSourceShow() {
|
|
9563
|
-
console.log(`dataSourceShow`);
|
|
9564
9556
|
const grid = this.gridList()[this.indexValue];
|
|
9565
9557
|
this.dialogSearchPrm = {};
|
|
9566
9558
|
this.selectOptions = this.gridList()[this.indexValue]['selectOptions'];
|
|
@@ -9773,7 +9765,6 @@ class PageFormComponent extends AmComponent {
|
|
|
9773
9765
|
context: this.getOrCreatePageFormSlotContext(grid, index, slotKey),
|
|
9774
9766
|
};
|
|
9775
9767
|
});
|
|
9776
|
-
console.log(`refreshSlotRenderStates`, this.slotRenderStates, this.gridList());
|
|
9777
9768
|
}
|
|
9778
9769
|
getOrCreatePageFormSlotContext(grid, index, slotKey) {
|
|
9779
9770
|
const renderKey = this.getGridRenderKey(grid, index);
|
|
@@ -9832,7 +9823,7 @@ class PageFormComponent extends AmComponent {
|
|
|
9832
9823
|
}
|
|
9833
9824
|
}
|
|
9834
9825
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PageFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9835
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: PageFormComponent, isStandalone: true, selector: "app-page-form", inputs: { addVisible: { classPropertyName: "addVisible", publicName: "addVisible", isSignal: true, isRequired: false, transformFunction: null }, gridList: { classPropertyName: "gridList", publicName: "gridList", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null }, getPrmInput: { classPropertyName: "getPrmInput", publicName: "getPrmInput", isSignal: true, isRequired: true, transformFunction: null }, statusSteps: { classPropertyName: "statusSteps", publicName: "statusSteps", isSignal: true, isRequired: false, transformFunction: null }, statusKey: { classPropertyName: "statusKey", publicName: "statusKey", isSignal: true, isRequired: false, transformFunction: null }, hrefBtnList: { classPropertyName: "hrefBtnList", publicName: "hrefBtnList", isSignal: true, isRequired: false, transformFunction: null }, setTitle: { classPropertyName: "setTitle", publicName: "setTitle", isSignal: true, isRequired: false, transformFunction: null }, actionList: { classPropertyName: "actionList", publicName: "actionList", isSignal: true, isRequired: false, transformFunction: null }, modelLog: { classPropertyName: "modelLog", publicName: "modelLog", isSignal: true, isRequired: false, transformFunction: null }, formDisabled: { classPropertyName: "formDisabled", publicName: "formDisabled", isSignal: true, isRequired: false, transformFunction: null }, statusConf: { classPropertyName: "statusConf", publicName: "statusConf", isSignal: true, isRequired: false, transformFunction: null }, formDetail: { classPropertyName: "formDetail", publicName: "formDetail", isSignal: true, isRequired: false, transformFunction: null }, saveFunc: { classPropertyName: "saveFunc", publicName: "saveFunc", isSignal: true, isRequired: false, transformFunction: null }, configNewPath: { classPropertyName: "configNewPath", publicName: "configNewPath", isSignal: true, isRequired: false, transformFunction: null }, customLeftPanel: { classPropertyName: "customLeftPanel", publicName: "customLeftPanel", isSignal: true, isRequired: false, transformFunction: null }, selectedId: { classPropertyName: "selectedId", publicName: "selectedId", isSignal: true, isRequired: false, transformFunction: null }, authLevel: { classPropertyName: "authLevel", publicName: "authLevel", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "window:resize": "onResize()" } }, providers: [], queries: [{ propertyName: "pageFormSlots", predicate: PageFormSlotDirective, descendants: true }], viewQueries: [{ propertyName: "cForm", first: true, predicate: ["cForm"], descendants: true }, { propertyName: "customGrid", predicate: ["customGrid"], descendants: true }, { propertyName: "tabForm", predicate: ["tabForm"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"md:overflow-hidden\">\n <!-- \u4FDD\u5B58\u65B0\u5EFA\u64CD\u4F5C\u533A -->\n\t<div class=\"flex md:flex-wrap lg:flex-nowrap items-center md:justify-between py-1 px-1 border-b-[1px] border-[#dbdbdb] bg-white\">\n\t\t<div class=\"lg:basis-1/3 order-1\">\n\t\t\t<app-crumb-action\n\t\t\t\t[addVisible]=\"addVisible()\"\n\t\t\t\t[newUrl]=\"newUrl\"\n\t\t\t\t[isShowCog]=\"true\"\n\t\t\t\t[outlined]=\"true\"\n\t\t\t\t[authLevel]=\"authLevel()\"\n\t\t\t\t[actionList]=\"actionList()\"\n\t\t\t\t[configNewPath]=\"configNewPath()\"\n\t\t\t\t[data]=\"getPrm.data ?? {}\"\n\t\t\t\t[saveBtnDisable]=\"saveBtnDisable\"\n\t\t\t\t(actionEvent)=\"authClick($event)\"\n\t\t\t\t(saveEvent)=\"submitForm()\">\n\t\t\t</app-crumb-action>\n\t\t</div>\n\n\t\t<div class=\"basis-1/5 lg:basis-2/3 order-2 lg:order-2 md:order-last md:basis-full md:mt-[6px]\">\n\t\t\t<href-btn-list\n\t\t\t\t[hrefs]=\"hrefBtnList()\"\n\t\t\t\t(hrefClick)=\"goRun($event)\"></href-btn-list>\n\t\t\t<!-- @if (id) {\n\t\t\t\t@for (btn of hrefBtnList(); track btn) {\n\t\t\t\t\t<p-button\n\t\t\t\t\t\t[variant]=\"btn?.variant\"\n\t\t\t\t\t\t[severity]=\"btn?.severity\"\n\t\t\t\t\t\tclass=\"mr-[6px]\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t[icon]=\"btn?.icon\"\n\t\t\t\t\t\tlabel=\"{{ btn.i18nKey ? i18n.fanyi(btn.i18nKey) : btn.label }}\"\n\t\t\t\t\t\t(click)=\"goRun(btn)\">\n\t\t\t\t\t</p-button>\n\t\t\t\t}\n\t\t\t} -->\n\t\t</div>\n\t\t<div class=\"basis-1/3 order-3 flex flex-row-reverse\">\n\t\t\t@if (modelLog()) {\n\t\t\t\t<div class=\"hidden md:block\">\n\t\t\t\t\t<span\n\t\t\t\t\t\t[class]=\"'iconfont icon-sidebar icon-sidebar-' + sidebarMode()\"\n\t\t\t\t\t\t(click)=\"toggleLog()\"></span>\n\t\t\t\t</div>\n\t\t\t}\n\t\t</div>\n\t</div>\n\t<div class=\"flex\">\n\t\t<div class=\"px-2 flex flex-wrap items-center flex-1\">\n\t\t\t<div class=\"hidden md:basis-1/3 py-1 basis-full md:flex items-center flex-row order-1\">\n\t\t\t\t@for (action of actionList(); let i = $index; track action) {\n\t\t\t\t\t<p-button\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t[icon]=\"getPrm.data?.icon\"\n\t\t\t\t\t\t[loading]=\"action.loading\"\n\t\t\t\t\t\t[label]=\"action.i18nKey ? (action.i18nKey | translate) : action.label\"\n\t\t\t\t\t\t[disabled]=\"action.btnDisabled ? action.btnDisabled(getPrm.data) : false\"\n\t\t\t\t\t\t[styleClass]=\"\n\t\t\t\t\t\t\t(action.auth || 0) > (authLevel() || 0) || !!action.btnHidden?.(getPrm.data)\n\t\t\t\t\t\t\t\t? 'form-action hidden'\n\t\t\t\t\t\t\t\t: 'form-action block mr-[.5rem]'\n\t\t\t\t\t\t\"\n\t\t\t\t\t\t(onClick)=\"action.onClick != '' && action.onClick?.(getPrm.data, action)\">\n\t\t\t\t\t</p-button>\n\t\t\t\t}\n\t\t\t</div>\n\t\t\t<div class=\"md:basis-2/3 basis-full flex md:flex-row-reverse flex-row md:order-2 order-first w-full\">\n\t\t\t\t@if (stepsVisible) {\n\t\t\t\t\t<custom-steps\n\t\t\t\t\t\t#customSteps\n\t\t\t\t\t\tclass=\"w-full\"\n\t\t\t\t\t\t[steps]=\"statusSteps()\"\n\t\t\t\t\t\t[modelLog]=\"showLog()\"\n\t\t\t\t\t\t[current]=\"getPrm.data && getPrm.data[statusKey()] !== undefined ? getPrm.data[statusKey()] : 0\"\n\t\t\t\t\t\t[authLevel]=\"authLevel()\"\n\t\t\t\t\t\t[isClick]=\"this.statusConf().isClick\"\n\t\t\t\t\t\t(change)=\"statusChange($event, customSteps)\">\n\t\t\t\t\t</custom-steps>\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t\t@if (showLog()) {\n\t\t\t<div class=\"lg:w-[400px] md:w-[300px] hidden md:block\"></div>\n\t\t}\n\t</div>\n <!-- form \u4E3B\u533A\u57DF-->\n @if(this.form().form) {\n <div class=\"main flex flex-wrap\">\n @if (customLeftPanel()) {\n <div class=\"hidden md:block md:h-full md:overflow-y-auto md:flex-none md:w-fit md:max-w-full\">\n <ng-container *ngTemplateOutlet=\"customLeftPanel()\"></ng-container>\n </div>\n }\n <div class=\"w-full md:min-w-0 md:flex-1 md:h-full md:overflow-y-auto\">\n <div class=\"bg-white mx-2 form-panel\">\n <div class=\"p-2 flex-1\">\n <form [formGroup]=\"form().form!\">\n <custom-form\n #cForm\n [options]=\"formOptions\"\n [upsert]=\"upsertPrm\"\n [model]=\"getPrm.data ?? {}\"></custom-form>\n </form>\n </div>\n @if (gridList() && gridList().length > 0) {\n <div class=\"relative mb-2\">\n <p-tabs [(value)]=\"indexValue\">\n <p-tablist>\n @for (fchild of gridList(); let i = $index; track fchild.gridOptions?.modelName || fchild.subDataKey || fchild.slotKey || $index) {\n <p-tab\n [value]=\"i\"\n (click)=\"tabClick()\">\n {{ fchild.i18nKey ? i18n.fanyi(fchild.i18nKey) : fchild.title }}\n </p-tab>\n }\n </p-tablist>\n </p-tabs>\n </div>\n }\n @for (grid of gridList(); let i = $index; track grid.gridOptions?.modelName || grid.subDataKey || grid.slotKey || $index) {\n @let slotState = slotRenderStates[i];\n @let slot = slotState?.slot;\n <div [hidden]=\"indexValue != i\" [style.height]=\"slot ? grid.gridOptions.scrollHeight : null\">\n @if (slot && indexValue === i) {\n <ng-container *ngTemplateOutlet=\"slot.templateRef; context: slotState.context\"> </ng-container>\n <div class=\"flex justify-end py-[5px] pr-[8px] bg-white\">\n @if (grid.subTableSource != 'none') {\n <p-button\n icon=\"pi pi-plus\"\n [text]=\"true\"\n severity=\"success\"\n [disabled]=\"gridDisable\"\n (onClick)=\"addRowClickHandler(grid)\" />\n }\n @if (grid.showDelete) {\n <p-button\n icon=\"pi pi-trash\"\n [text]=\"true\"\n severity=\"danger\"\n [disabled]=\"gridDisable\"\n (onClick)=\"delRowClickHandler(grid)\" />\n }\n </div>\n } @else {\n @if (grid.type == 'grid') {\n <custom-grid\n #customGrid\n [rowData]=\"getPrm.data?.[grid.subDataKey!]\"\n [upsert]=\"upsertPrm\"\n (deleteEmit)=\"delRows($event)\"\n [addType]=\"grid.subTableSource\"\n (addEmit)=\"dataSourceShow()\"\n [gridOptions]=\"grid.gridOptions\"\n [gridDisable]=\"gridDisable\"\n [authLevel]=\"authLevel()\"\n [showDelete]=\"grid.showDelete\"\n [selectData]=\"grid.selectData\"\n [addSort]=\"grid.addSort\">\n </custom-grid>\n } @else {\n <custom-form\n #tabForm\n [options]=\"grid\"\n [upsert]=\"upsertPrm\"\n [model]=\"subFormModel[grid.subDataKey!] || {}\">\n </custom-form>\n }\n }\n </div>\n }\n </div>\n </div>\n @if (showLog()) {\n <div class=\"w-full lg:w-[400px] md:w-[300px] md:h-full md:overflow-y-auto hidden md:block\">\n <custom-log [logs]=\"getPrm.data?.log ?? []\"></custom-log>\n </div>\n }\n </div>\n }\n</div>\n<row-selector\n\t[(visible)]=\"visible\"\n\t[searchPrm]=\"dialogSearchPrm\"\n\t[gridOptions]=\"selectOptions\"\n\t[selectionKeys]=\"selectionKeys\"\n\t(onOk)=\"onOk($event)\"\n\t(cancelSelect)=\"onCancelSelected($event)\">\n</row-selector>\n", styles: ["@charset \"UTF-8\";.main{height:calc(100vh - 128px)}:host ::ng-deep .main .ag-root-wrapper{border-left:none!important;border-right:none!important;border-bottom:none!important}:host ::ng-deep .form-action{background:#e7e9ed!important;color:var(--ag-text-color)!important;border-color:#e7e9ed!important}:host ::ng-deep .form-action:not(:disabled):hover{background-color:#d8dadd!important;border-color:#d8dadd}.form-panel{border:solid 1px #dbdbdb}.icon-sidebar{color:#334155;padding:2.5px}.icon-sidebar:hover{color:var(--p-primary-color);cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i2$4.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: FormComponent, selector: "custom-form", inputs: ["options", "model", "upsert"] }, { kind: "component", type: LogComponent, selector: "custom-log", inputs: ["logs", "id"] }, { kind: "component", type: CrumbActionComponent, selector: "app-crumb-action", inputs: ["isShowCog", "addVisible", "importVisible", "exportVisible", "newUrl", "configNewPath", "onExport", "outlined", "isList", "authLevel", "actionList", "data", "menus", "saveBtnDisable"], outputs: ["saveEvent", "cancelEvent", "actionEvent"] }, { kind: "component", type: StepsComponent, selector: "custom-steps", inputs: ["modelLog", "needSelfAdjusting", "steps", "current", "authLevel", "isClick"], outputs: ["change"] }, { kind: "component", type: GridComponent, selector: "custom-grid", inputs: ["gridOptions", "selectionKeys", "upsert", "rowData", "searchPrm", "addType", "selectData", "showAct", "actPos", "authLevel", "showDelete", "gridDisable", "addSort"], outputs: ["deleteEmit", "addEmit"] }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i4.Tabs, selector: "p-tabs", inputs: ["value", "scrollable", "lazy", "selectOnFocus", "showNavigators", "tabindex"], outputs: ["valueChange"] }, { kind: "component", type: i4.TabList, selector: "p-tablist" }, { kind: "component", type: i4.Tab, selector: "p-tab", inputs: ["value", "disabled"], outputs: ["valueChange"] }, { kind: "component", type: RowSelectorComponent$1, selector: "row-selector", inputs: ["title", "selectionKeys", "gridOptions", "searchPrm", "visible", "showSearch"], outputs: ["onOk", "visibleChange", "cancelSelect"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "component", type: HrefBtnListComponent, selector: "href-btn-list", inputs: ["hrefs"], outputs: ["hrefClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9826
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: PageFormComponent, isStandalone: true, selector: "app-page-form", inputs: { addVisible: { classPropertyName: "addVisible", publicName: "addVisible", isSignal: true, isRequired: false, transformFunction: null }, gridList: { classPropertyName: "gridList", publicName: "gridList", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null }, getPrmInput: { classPropertyName: "getPrmInput", publicName: "getPrmInput", isSignal: true, isRequired: true, transformFunction: null }, statusSteps: { classPropertyName: "statusSteps", publicName: "statusSteps", isSignal: true, isRequired: false, transformFunction: null }, statusKey: { classPropertyName: "statusKey", publicName: "statusKey", isSignal: true, isRequired: false, transformFunction: null }, hrefBtnList: { classPropertyName: "hrefBtnList", publicName: "hrefBtnList", isSignal: true, isRequired: false, transformFunction: null }, setTitle: { classPropertyName: "setTitle", publicName: "setTitle", isSignal: true, isRequired: false, transformFunction: null }, actionList: { classPropertyName: "actionList", publicName: "actionList", isSignal: true, isRequired: false, transformFunction: null }, modelLog: { classPropertyName: "modelLog", publicName: "modelLog", isSignal: true, isRequired: false, transformFunction: null }, formDisabled: { classPropertyName: "formDisabled", publicName: "formDisabled", isSignal: true, isRequired: false, transformFunction: null }, statusConf: { classPropertyName: "statusConf", publicName: "statusConf", isSignal: true, isRequired: false, transformFunction: null }, formDetail: { classPropertyName: "formDetail", publicName: "formDetail", isSignal: true, isRequired: false, transformFunction: null }, saveFunc: { classPropertyName: "saveFunc", publicName: "saveFunc", isSignal: true, isRequired: false, transformFunction: null }, configNewPath: { classPropertyName: "configNewPath", publicName: "configNewPath", isSignal: true, isRequired: false, transformFunction: null }, customLeftPanel: { classPropertyName: "customLeftPanel", publicName: "customLeftPanel", isSignal: true, isRequired: false, transformFunction: null }, authLevel: { classPropertyName: "authLevel", publicName: "authLevel", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "window:resize": "onResize()" } }, providers: [], queries: [{ propertyName: "pageFormSlots", predicate: PageFormSlotDirective, descendants: true }], viewQueries: [{ propertyName: "cForm", first: true, predicate: ["cForm"], descendants: true }, { propertyName: "customGrid", predicate: ["customGrid"], descendants: true }, { propertyName: "tabForm", predicate: ["tabForm"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"md:overflow-hidden\">\n <!-- \u4FDD\u5B58\u65B0\u5EFA\u64CD\u4F5C\u533A -->\n\t<div class=\"flex md:flex-wrap lg:flex-nowrap items-center md:justify-between py-1 px-1 border-b-[1px] border-[#dbdbdb] bg-white\">\n\t\t<div class=\"lg:basis-1/3 order-1\">\n\t\t\t<app-crumb-action\n\t\t\t\t[addVisible]=\"addVisible()\"\n\t\t\t\t[newUrl]=\"newUrl\"\n\t\t\t\t[isShowCog]=\"true\"\n\t\t\t\t[outlined]=\"true\"\n\t\t\t\t[authLevel]=\"authLevel()\"\n\t\t\t\t[actionList]=\"actionList()\"\n\t\t\t\t[configNewPath]=\"configNewPath()\"\n\t\t\t\t[data]=\"getPrm.data ?? {}\"\n\t\t\t\t[saveBtnDisable]=\"saveBtnDisable\"\n\t\t\t\t(actionEvent)=\"authClick($event)\"\n\t\t\t\t(saveEvent)=\"submitForm()\">\n\t\t\t</app-crumb-action>\n\t\t</div>\n\n\t\t<div class=\"basis-1/5 lg:basis-2/3 order-2 lg:order-2 md:order-last md:basis-full md:mt-[6px]\">\n\t\t\t<href-btn-list\n\t\t\t\t[hrefs]=\"hrefBtnList()\"\n\t\t\t\t(hrefClick)=\"goRun($event)\"></href-btn-list>\n\t\t\t<!-- @if (id) {\n\t\t\t\t@for (btn of hrefBtnList(); track btn) {\n\t\t\t\t\t<p-button\n\t\t\t\t\t\t[variant]=\"btn?.variant\"\n\t\t\t\t\t\t[severity]=\"btn?.severity\"\n\t\t\t\t\t\tclass=\"mr-[6px]\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t[icon]=\"btn?.icon\"\n\t\t\t\t\t\tlabel=\"{{ btn.i18nKey ? i18n.fanyi(btn.i18nKey) : btn.label }}\"\n\t\t\t\t\t\t(click)=\"goRun(btn)\">\n\t\t\t\t\t</p-button>\n\t\t\t\t}\n\t\t\t} -->\n\t\t</div>\n\t\t<div class=\"basis-1/3 order-3 flex flex-row-reverse\">\n\t\t\t@if (modelLog()) {\n\t\t\t\t<div class=\"hidden md:block\">\n\t\t\t\t\t<span\n\t\t\t\t\t\t[class]=\"'iconfont icon-sidebar icon-sidebar-' + sidebarMode()\"\n\t\t\t\t\t\t(click)=\"toggleLog()\"></span>\n\t\t\t\t</div>\n\t\t\t}\n\t\t</div>\n\t</div>\n\t<div class=\"flex\">\n\t\t<div class=\"px-2 flex flex-wrap items-center flex-1\">\n\t\t\t<div class=\"hidden md:basis-1/3 py-1 basis-full md:flex items-center flex-row order-1\">\n\t\t\t\t@for (action of actionList(); let i = $index; track action) {\n\t\t\t\t\t<p-button\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t[icon]=\"getPrm.data?.icon\"\n\t\t\t\t\t\t[loading]=\"action.loading\"\n\t\t\t\t\t\t[label]=\"action.i18nKey ? (action.i18nKey | translate) : action.label\"\n\t\t\t\t\t\t[disabled]=\"action.btnDisabled ? action.btnDisabled(getPrm.data) : false\"\n\t\t\t\t\t\t[styleClass]=\"\n\t\t\t\t\t\t\t(action.auth || 0) > (authLevel() || 0) || !!action.btnHidden?.(getPrm.data)\n\t\t\t\t\t\t\t\t? 'form-action hidden'\n\t\t\t\t\t\t\t\t: 'form-action block mr-[.5rem]'\n\t\t\t\t\t\t\"\n\t\t\t\t\t\t(onClick)=\"action.onClick != '' && action.onClick?.(getPrm.data, action)\">\n\t\t\t\t\t</p-button>\n\t\t\t\t}\n\t\t\t</div>\n\t\t\t<div class=\"md:basis-2/3 basis-full flex md:flex-row-reverse flex-row md:order-2 order-first w-full\">\n\t\t\t\t@if (stepsVisible) {\n\t\t\t\t\t<custom-steps\n\t\t\t\t\t\t#customSteps\n\t\t\t\t\t\tclass=\"w-full\"\n\t\t\t\t\t\t[steps]=\"statusSteps()\"\n\t\t\t\t\t\t[modelLog]=\"showLog()\"\n\t\t\t\t\t\t[current]=\"getPrm.data && getPrm.data[statusKey()] !== undefined ? getPrm.data[statusKey()] : 0\"\n\t\t\t\t\t\t[authLevel]=\"authLevel()\"\n\t\t\t\t\t\t[isClick]=\"this.statusConf().isClick\"\n\t\t\t\t\t\t(change)=\"statusChange($event, customSteps)\">\n\t\t\t\t\t</custom-steps>\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t\t@if (showLog()) {\n\t\t\t<div class=\"lg:w-[400px] md:w-[300px] hidden md:block\"></div>\n\t\t}\n\t</div>\n <!-- form \u4E3B\u533A\u57DF-->\n @if(this.form().form) {\n <div class=\"main flex flex-wrap\">\n @if (customLeftPanel()) {\n <div class=\"hidden md:block md:h-full md:overflow-y-auto md:flex-none md:w-fit md:max-w-full\">\n <ng-container *ngTemplateOutlet=\"customLeftPanel()\"></ng-container>\n </div>\n }\n <div class=\"w-full md:min-w-0 md:flex-1 md:h-full md:overflow-y-auto\">\n <div class=\"bg-white mx-2 form-panel\">\n <div class=\"p-2 flex-1\">\n <form [formGroup]=\"form().form!\">\n <custom-form\n #cForm\n [options]=\"formOptions\"\n [upsert]=\"upsertPrm\"\n [model]=\"getPrm.data ?? {}\"></custom-form>\n </form>\n </div>\n @if (gridList() && gridList().length > 0) {\n <div class=\"relative mb-2\">\n <p-tabs [(value)]=\"indexValue\">\n <p-tablist>\n @for (fchild of gridList(); let i = $index; track $index) {\n <p-tab\n [value]=\"i\"\n (click)=\"tabClick()\">\n {{ fchild.i18nKey ? i18n.fanyi(fchild.i18nKey) : fchild.title }}\n </p-tab>\n }\n </p-tablist>\n </p-tabs>\n </div>\n }\n @for (grid of gridList(); let i = $index; track $index) {\n @let slotState = slotRenderStates[i];\n @let slot = slotState?.slot;\n <div [hidden]=\"indexValue != i\" [style.height]=\"slot ? grid.gridOptions.scrollHeight : null\">\n @if (slot && indexValue === i) {\n <ng-container *ngTemplateOutlet=\"slot.templateRef; context: slotState.context\"> </ng-container>\n <div class=\"flex justify-end py-[5px] pr-[8px] bg-white\">\n @if (grid.subTableSource != 'none') {\n <p-button\n icon=\"pi pi-plus\"\n [text]=\"true\"\n severity=\"success\"\n [disabled]=\"gridDisable\"\n (onClick)=\"addRowClickHandler(grid)\" />\n }\n @if (grid.showDelete) {\n <p-button\n icon=\"pi pi-trash\"\n [text]=\"true\"\n severity=\"danger\"\n [disabled]=\"gridDisable\"\n (onClick)=\"delRowClickHandler(grid)\" />\n }\n </div>\n } @else {\n @if (grid.type == 'grid') {\n <custom-grid\n #customGrid\n [rowData]=\"getPrm.data?.[grid.subDataKey!]\"\n [upsert]=\"upsertPrm\"\n (deleteEmit)=\"delRows($event)\"\n [addType]=\"grid.subTableSource\"\n (addEmit)=\"dataSourceShow()\"\n [gridOptions]=\"grid.gridOptions\"\n [gridDisable]=\"gridDisable\"\n [authLevel]=\"authLevel()\"\n [showDelete]=\"grid.showDelete\"\n [selectData]=\"grid.selectData\"\n [addSort]=\"grid.addSort\">\n </custom-grid>\n } @else {\n <custom-form\n #tabForm\n [options]=\"grid\"\n [upsert]=\"upsertPrm\"\n [model]=\"subFormModel[grid.subDataKey!] || {}\">\n </custom-form>\n }\n }\n </div>\n }\n </div>\n </div>\n @if (showLog()) {\n <div class=\"w-full lg:w-[400px] md:w-[300px] md:h-full md:overflow-y-auto hidden md:block\">\n <custom-log [logs]=\"getPrm.data?.log ?? []\"></custom-log>\n </div>\n }\n </div>\n }\n</div>\n<row-selector\n\t[(visible)]=\"visible\"\n\t[searchPrm]=\"dialogSearchPrm\"\n\t[gridOptions]=\"selectOptions\"\n\t[selectionKeys]=\"selectionKeys\"\n\t(onOk)=\"onOk($event)\"\n\t(cancelSelect)=\"onCancelSelected($event)\">\n</row-selector>\n", styles: ["@charset \"UTF-8\";.main{height:calc(100vh - 128px)}:host ::ng-deep .main .ag-root-wrapper{border-left:none!important;border-right:none!important;border-bottom:none!important}:host ::ng-deep .form-action{background:#e7e9ed!important;color:var(--ag-text-color)!important;border-color:#e7e9ed!important}:host ::ng-deep .form-action:not(:disabled):hover{background-color:#d8dadd!important;border-color:#d8dadd}.form-panel{border:solid 1px #dbdbdb}.icon-sidebar{color:#334155;padding:2.5px}.icon-sidebar:hover{color:var(--p-primary-color);cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i2$4.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: FormComponent, selector: "custom-form", inputs: ["options", "model", "upsert"] }, { kind: "component", type: LogComponent, selector: "custom-log", inputs: ["logs", "id"] }, { kind: "component", type: CrumbActionComponent, selector: "app-crumb-action", inputs: ["isShowCog", "addVisible", "importVisible", "exportVisible", "newUrl", "configNewPath", "onExport", "outlined", "isList", "authLevel", "actionList", "data", "menus", "saveBtnDisable"], outputs: ["saveEvent", "cancelEvent", "actionEvent"] }, { kind: "component", type: StepsComponent, selector: "custom-steps", inputs: ["modelLog", "needSelfAdjusting", "steps", "current", "authLevel", "isClick"], outputs: ["change"] }, { kind: "component", type: GridComponent, selector: "custom-grid", inputs: ["gridOptions", "selectionKeys", "upsert", "rowData", "searchPrm", "addType", "selectData", "showAct", "actPos", "authLevel", "showDelete", "gridDisable", "addSort"], outputs: ["deleteEmit", "addEmit"] }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i4.Tabs, selector: "p-tabs", inputs: ["value", "scrollable", "lazy", "selectOnFocus", "showNavigators", "tabindex"], outputs: ["valueChange"] }, { kind: "component", type: i4.TabList, selector: "p-tablist" }, { kind: "component", type: i4.Tab, selector: "p-tab", inputs: ["value", "disabled"], outputs: ["valueChange"] }, { kind: "component", type: RowSelectorComponent$1, selector: "row-selector", inputs: ["title", "selectionKeys", "gridOptions", "searchPrm", "visible", "showSearch"], outputs: ["onOk", "visibleChange", "cancelSelect"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "component", type: HrefBtnListComponent, selector: "href-btn-list", inputs: ["hrefs"], outputs: ["hrefClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9836
9827
|
}
|
|
9837
9828
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PageFormComponent, decorators: [{
|
|
9838
9829
|
type: Component,
|
|
@@ -9849,7 +9840,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
9849
9840
|
RowSelectorComponent$1,
|
|
9850
9841
|
TranslatePipe,
|
|
9851
9842
|
HrefBtnListComponent,
|
|
9852
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [], template: "<div class=\"md:overflow-hidden\">\n <!-- \u4FDD\u5B58\u65B0\u5EFA\u64CD\u4F5C\u533A -->\n\t<div class=\"flex md:flex-wrap lg:flex-nowrap items-center md:justify-between py-1 px-1 border-b-[1px] border-[#dbdbdb] bg-white\">\n\t\t<div class=\"lg:basis-1/3 order-1\">\n\t\t\t<app-crumb-action\n\t\t\t\t[addVisible]=\"addVisible()\"\n\t\t\t\t[newUrl]=\"newUrl\"\n\t\t\t\t[isShowCog]=\"true\"\n\t\t\t\t[outlined]=\"true\"\n\t\t\t\t[authLevel]=\"authLevel()\"\n\t\t\t\t[actionList]=\"actionList()\"\n\t\t\t\t[configNewPath]=\"configNewPath()\"\n\t\t\t\t[data]=\"getPrm.data ?? {}\"\n\t\t\t\t[saveBtnDisable]=\"saveBtnDisable\"\n\t\t\t\t(actionEvent)=\"authClick($event)\"\n\t\t\t\t(saveEvent)=\"submitForm()\">\n\t\t\t</app-crumb-action>\n\t\t</div>\n\n\t\t<div class=\"basis-1/5 lg:basis-2/3 order-2 lg:order-2 md:order-last md:basis-full md:mt-[6px]\">\n\t\t\t<href-btn-list\n\t\t\t\t[hrefs]=\"hrefBtnList()\"\n\t\t\t\t(hrefClick)=\"goRun($event)\"></href-btn-list>\n\t\t\t<!-- @if (id) {\n\t\t\t\t@for (btn of hrefBtnList(); track btn) {\n\t\t\t\t\t<p-button\n\t\t\t\t\t\t[variant]=\"btn?.variant\"\n\t\t\t\t\t\t[severity]=\"btn?.severity\"\n\t\t\t\t\t\tclass=\"mr-[6px]\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t[icon]=\"btn?.icon\"\n\t\t\t\t\t\tlabel=\"{{ btn.i18nKey ? i18n.fanyi(btn.i18nKey) : btn.label }}\"\n\t\t\t\t\t\t(click)=\"goRun(btn)\">\n\t\t\t\t\t</p-button>\n\t\t\t\t}\n\t\t\t} -->\n\t\t</div>\n\t\t<div class=\"basis-1/3 order-3 flex flex-row-reverse\">\n\t\t\t@if (modelLog()) {\n\t\t\t\t<div class=\"hidden md:block\">\n\t\t\t\t\t<span\n\t\t\t\t\t\t[class]=\"'iconfont icon-sidebar icon-sidebar-' + sidebarMode()\"\n\t\t\t\t\t\t(click)=\"toggleLog()\"></span>\n\t\t\t\t</div>\n\t\t\t}\n\t\t</div>\n\t</div>\n\t<div class=\"flex\">\n\t\t<div class=\"px-2 flex flex-wrap items-center flex-1\">\n\t\t\t<div class=\"hidden md:basis-1/3 py-1 basis-full md:flex items-center flex-row order-1\">\n\t\t\t\t@for (action of actionList(); let i = $index; track action) {\n\t\t\t\t\t<p-button\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t[icon]=\"getPrm.data?.icon\"\n\t\t\t\t\t\t[loading]=\"action.loading\"\n\t\t\t\t\t\t[label]=\"action.i18nKey ? (action.i18nKey | translate) : action.label\"\n\t\t\t\t\t\t[disabled]=\"action.btnDisabled ? action.btnDisabled(getPrm.data) : false\"\n\t\t\t\t\t\t[styleClass]=\"\n\t\t\t\t\t\t\t(action.auth || 0) > (authLevel() || 0) || !!action.btnHidden?.(getPrm.data)\n\t\t\t\t\t\t\t\t? 'form-action hidden'\n\t\t\t\t\t\t\t\t: 'form-action block mr-[.5rem]'\n\t\t\t\t\t\t\"\n\t\t\t\t\t\t(onClick)=\"action.onClick != '' && action.onClick?.(getPrm.data, action)\">\n\t\t\t\t\t</p-button>\n\t\t\t\t}\n\t\t\t</div>\n\t\t\t<div class=\"md:basis-2/3 basis-full flex md:flex-row-reverse flex-row md:order-2 order-first w-full\">\n\t\t\t\t@if (stepsVisible) {\n\t\t\t\t\t<custom-steps\n\t\t\t\t\t\t#customSteps\n\t\t\t\t\t\tclass=\"w-full\"\n\t\t\t\t\t\t[steps]=\"statusSteps()\"\n\t\t\t\t\t\t[modelLog]=\"showLog()\"\n\t\t\t\t\t\t[current]=\"getPrm.data && getPrm.data[statusKey()] !== undefined ? getPrm.data[statusKey()] : 0\"\n\t\t\t\t\t\t[authLevel]=\"authLevel()\"\n\t\t\t\t\t\t[isClick]=\"this.statusConf().isClick\"\n\t\t\t\t\t\t(change)=\"statusChange($event, customSteps)\">\n\t\t\t\t\t</custom-steps>\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t\t@if (showLog()) {\n\t\t\t<div class=\"lg:w-[400px] md:w-[300px] hidden md:block\"></div>\n\t\t}\n\t</div>\n <!-- form \u4E3B\u533A\u57DF-->\n @if(this.form().form) {\n <div class=\"main flex flex-wrap\">\n @if (customLeftPanel()) {\n <div class=\"hidden md:block md:h-full md:overflow-y-auto md:flex-none md:w-fit md:max-w-full\">\n <ng-container *ngTemplateOutlet=\"customLeftPanel()\"></ng-container>\n </div>\n }\n <div class=\"w-full md:min-w-0 md:flex-1 md:h-full md:overflow-y-auto\">\n <div class=\"bg-white mx-2 form-panel\">\n <div class=\"p-2 flex-1\">\n <form [formGroup]=\"form().form!\">\n <custom-form\n #cForm\n [options]=\"formOptions\"\n [upsert]=\"upsertPrm\"\n [model]=\"getPrm.data ?? {}\"></custom-form>\n </form>\n </div>\n @if (gridList() && gridList().length > 0) {\n <div class=\"relative mb-2\">\n <p-tabs [(value)]=\"indexValue\">\n <p-tablist>\n @for (fchild of gridList(); let i = $index; track
|
|
9843
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [], template: "<div class=\"md:overflow-hidden\">\n <!-- \u4FDD\u5B58\u65B0\u5EFA\u64CD\u4F5C\u533A -->\n\t<div class=\"flex md:flex-wrap lg:flex-nowrap items-center md:justify-between py-1 px-1 border-b-[1px] border-[#dbdbdb] bg-white\">\n\t\t<div class=\"lg:basis-1/3 order-1\">\n\t\t\t<app-crumb-action\n\t\t\t\t[addVisible]=\"addVisible()\"\n\t\t\t\t[newUrl]=\"newUrl\"\n\t\t\t\t[isShowCog]=\"true\"\n\t\t\t\t[outlined]=\"true\"\n\t\t\t\t[authLevel]=\"authLevel()\"\n\t\t\t\t[actionList]=\"actionList()\"\n\t\t\t\t[configNewPath]=\"configNewPath()\"\n\t\t\t\t[data]=\"getPrm.data ?? {}\"\n\t\t\t\t[saveBtnDisable]=\"saveBtnDisable\"\n\t\t\t\t(actionEvent)=\"authClick($event)\"\n\t\t\t\t(saveEvent)=\"submitForm()\">\n\t\t\t</app-crumb-action>\n\t\t</div>\n\n\t\t<div class=\"basis-1/5 lg:basis-2/3 order-2 lg:order-2 md:order-last md:basis-full md:mt-[6px]\">\n\t\t\t<href-btn-list\n\t\t\t\t[hrefs]=\"hrefBtnList()\"\n\t\t\t\t(hrefClick)=\"goRun($event)\"></href-btn-list>\n\t\t\t<!-- @if (id) {\n\t\t\t\t@for (btn of hrefBtnList(); track btn) {\n\t\t\t\t\t<p-button\n\t\t\t\t\t\t[variant]=\"btn?.variant\"\n\t\t\t\t\t\t[severity]=\"btn?.severity\"\n\t\t\t\t\t\tclass=\"mr-[6px]\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t[icon]=\"btn?.icon\"\n\t\t\t\t\t\tlabel=\"{{ btn.i18nKey ? i18n.fanyi(btn.i18nKey) : btn.label }}\"\n\t\t\t\t\t\t(click)=\"goRun(btn)\">\n\t\t\t\t\t</p-button>\n\t\t\t\t}\n\t\t\t} -->\n\t\t</div>\n\t\t<div class=\"basis-1/3 order-3 flex flex-row-reverse\">\n\t\t\t@if (modelLog()) {\n\t\t\t\t<div class=\"hidden md:block\">\n\t\t\t\t\t<span\n\t\t\t\t\t\t[class]=\"'iconfont icon-sidebar icon-sidebar-' + sidebarMode()\"\n\t\t\t\t\t\t(click)=\"toggleLog()\"></span>\n\t\t\t\t</div>\n\t\t\t}\n\t\t</div>\n\t</div>\n\t<div class=\"flex\">\n\t\t<div class=\"px-2 flex flex-wrap items-center flex-1\">\n\t\t\t<div class=\"hidden md:basis-1/3 py-1 basis-full md:flex items-center flex-row order-1\">\n\t\t\t\t@for (action of actionList(); let i = $index; track action) {\n\t\t\t\t\t<p-button\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t[icon]=\"getPrm.data?.icon\"\n\t\t\t\t\t\t[loading]=\"action.loading\"\n\t\t\t\t\t\t[label]=\"action.i18nKey ? (action.i18nKey | translate) : action.label\"\n\t\t\t\t\t\t[disabled]=\"action.btnDisabled ? action.btnDisabled(getPrm.data) : false\"\n\t\t\t\t\t\t[styleClass]=\"\n\t\t\t\t\t\t\t(action.auth || 0) > (authLevel() || 0) || !!action.btnHidden?.(getPrm.data)\n\t\t\t\t\t\t\t\t? 'form-action hidden'\n\t\t\t\t\t\t\t\t: 'form-action block mr-[.5rem]'\n\t\t\t\t\t\t\"\n\t\t\t\t\t\t(onClick)=\"action.onClick != '' && action.onClick?.(getPrm.data, action)\">\n\t\t\t\t\t</p-button>\n\t\t\t\t}\n\t\t\t</div>\n\t\t\t<div class=\"md:basis-2/3 basis-full flex md:flex-row-reverse flex-row md:order-2 order-first w-full\">\n\t\t\t\t@if (stepsVisible) {\n\t\t\t\t\t<custom-steps\n\t\t\t\t\t\t#customSteps\n\t\t\t\t\t\tclass=\"w-full\"\n\t\t\t\t\t\t[steps]=\"statusSteps()\"\n\t\t\t\t\t\t[modelLog]=\"showLog()\"\n\t\t\t\t\t\t[current]=\"getPrm.data && getPrm.data[statusKey()] !== undefined ? getPrm.data[statusKey()] : 0\"\n\t\t\t\t\t\t[authLevel]=\"authLevel()\"\n\t\t\t\t\t\t[isClick]=\"this.statusConf().isClick\"\n\t\t\t\t\t\t(change)=\"statusChange($event, customSteps)\">\n\t\t\t\t\t</custom-steps>\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t\t@if (showLog()) {\n\t\t\t<div class=\"lg:w-[400px] md:w-[300px] hidden md:block\"></div>\n\t\t}\n\t</div>\n <!-- form \u4E3B\u533A\u57DF-->\n @if(this.form().form) {\n <div class=\"main flex flex-wrap\">\n @if (customLeftPanel()) {\n <div class=\"hidden md:block md:h-full md:overflow-y-auto md:flex-none md:w-fit md:max-w-full\">\n <ng-container *ngTemplateOutlet=\"customLeftPanel()\"></ng-container>\n </div>\n }\n <div class=\"w-full md:min-w-0 md:flex-1 md:h-full md:overflow-y-auto\">\n <div class=\"bg-white mx-2 form-panel\">\n <div class=\"p-2 flex-1\">\n <form [formGroup]=\"form().form!\">\n <custom-form\n #cForm\n [options]=\"formOptions\"\n [upsert]=\"upsertPrm\"\n [model]=\"getPrm.data ?? {}\"></custom-form>\n </form>\n </div>\n @if (gridList() && gridList().length > 0) {\n <div class=\"relative mb-2\">\n <p-tabs [(value)]=\"indexValue\">\n <p-tablist>\n @for (fchild of gridList(); let i = $index; track $index) {\n <p-tab\n [value]=\"i\"\n (click)=\"tabClick()\">\n {{ fchild.i18nKey ? i18n.fanyi(fchild.i18nKey) : fchild.title }}\n </p-tab>\n }\n </p-tablist>\n </p-tabs>\n </div>\n }\n @for (grid of gridList(); let i = $index; track $index) {\n @let slotState = slotRenderStates[i];\n @let slot = slotState?.slot;\n <div [hidden]=\"indexValue != i\" [style.height]=\"slot ? grid.gridOptions.scrollHeight : null\">\n @if (slot && indexValue === i) {\n <ng-container *ngTemplateOutlet=\"slot.templateRef; context: slotState.context\"> </ng-container>\n <div class=\"flex justify-end py-[5px] pr-[8px] bg-white\">\n @if (grid.subTableSource != 'none') {\n <p-button\n icon=\"pi pi-plus\"\n [text]=\"true\"\n severity=\"success\"\n [disabled]=\"gridDisable\"\n (onClick)=\"addRowClickHandler(grid)\" />\n }\n @if (grid.showDelete) {\n <p-button\n icon=\"pi pi-trash\"\n [text]=\"true\"\n severity=\"danger\"\n [disabled]=\"gridDisable\"\n (onClick)=\"delRowClickHandler(grid)\" />\n }\n </div>\n } @else {\n @if (grid.type == 'grid') {\n <custom-grid\n #customGrid\n [rowData]=\"getPrm.data?.[grid.subDataKey!]\"\n [upsert]=\"upsertPrm\"\n (deleteEmit)=\"delRows($event)\"\n [addType]=\"grid.subTableSource\"\n (addEmit)=\"dataSourceShow()\"\n [gridOptions]=\"grid.gridOptions\"\n [gridDisable]=\"gridDisable\"\n [authLevel]=\"authLevel()\"\n [showDelete]=\"grid.showDelete\"\n [selectData]=\"grid.selectData\"\n [addSort]=\"grid.addSort\">\n </custom-grid>\n } @else {\n <custom-form\n #tabForm\n [options]=\"grid\"\n [upsert]=\"upsertPrm\"\n [model]=\"subFormModel[grid.subDataKey!] || {}\">\n </custom-form>\n }\n }\n </div>\n }\n </div>\n </div>\n @if (showLog()) {\n <div class=\"w-full lg:w-[400px] md:w-[300px] md:h-full md:overflow-y-auto hidden md:block\">\n <custom-log [logs]=\"getPrm.data?.log ?? []\"></custom-log>\n </div>\n }\n </div>\n }\n</div>\n<row-selector\n\t[(visible)]=\"visible\"\n\t[searchPrm]=\"dialogSearchPrm\"\n\t[gridOptions]=\"selectOptions\"\n\t[selectionKeys]=\"selectionKeys\"\n\t(onOk)=\"onOk($event)\"\n\t(cancelSelect)=\"onCancelSelected($event)\">\n</row-selector>\n", styles: ["@charset \"UTF-8\";.main{height:calc(100vh - 128px)}:host ::ng-deep .main .ag-root-wrapper{border-left:none!important;border-right:none!important;border-bottom:none!important}:host ::ng-deep .form-action{background:#e7e9ed!important;color:var(--ag-text-color)!important;border-color:#e7e9ed!important}:host ::ng-deep .form-action:not(:disabled):hover{background-color:#d8dadd!important;border-color:#d8dadd}.form-panel{border:solid 1px #dbdbdb}.icon-sidebar{color:#334155;padding:2.5px}.icon-sidebar:hover{color:var(--p-primary-color);cursor:pointer}\n"] }]
|
|
9853
9844
|
}], ctorParameters: () => [], propDecorators: { cForm: [{
|
|
9854
9845
|
type: ViewChild,
|
|
9855
9846
|
args: ['cForm']
|