1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- import { ${m1}Service } from '../service/${m2}-service';
- import { ${m1}AddComponent } from './${m2}-add/${m2}-add.component';
- import { ${m1}EditComponent } from './${m2}-edit/${m2}-edit.component';
- import { ${m1}GridComponent } from './${m2}-grid/${m2}-grid.component';
- import { Component, OnInit, ViewChild } from '@angular/core';
- @Component({
- selector: 'app-${m2}-manager',
- templateUrl: './${m2}-manager.component.html',
- styleUrls: ['./${m2}-manager.component.scss']
- })
- export class ${m1}ManagerComponent implements OnInit {
- selectSysList = [];
- @ViewChild(${m1}GridComponent) ${m2}Grid: ${m1}GridComponent; // 列表组件
- @ViewChild(${m1}AddComponent) ${m2}Add: ${m1}AddComponent; // 新增dialog
- @ViewChild(${m1}EditComponent) ${m2}Edit: ${m1}EditComponent; // 更新dialog
-
- constructor(private ${m2}Service: ${m1}Service) { }
- ngOnInit() {
- }
-
- /**
- * 打开更新面板
- * **/
- toggleEdit(event) {
- this.${m2}Edit.toggle(event);
- }
- /**
- * 打开新增面板
- */
- toggleAdd(event) {
- this.${m2}Add.toggle(event);
- }
- refreshGrid(event) {
- this.${m2}Grid.refresh();
- }
- }
|