45 lines
1.0 KiB
TypeScript
45 lines
1.0 KiB
TypeScript
/*
|
||
* Copyright (c) 2020. bmy
|
||
*/
|
||
|
||
import { Autowired } from "@ann/Ioc.annotation";
|
||
import { UserServiceImpl } from "@impl/User.service.impl";
|
||
import { VueCustomize } from "@logic/Base.type";
|
||
|
||
/**
|
||
* logic 层的父类
|
||
* 主要实现 页面公共参数和ajax方法的地方
|
||
*/
|
||
export class BaseLogic {
|
||
|
||
@Autowired
|
||
public readonly UserServiceImpl!: UserServiceImpl;
|
||
|
||
// 保存Vue对象
|
||
public _!: VueCustomize;
|
||
|
||
public page: number = 1;
|
||
public total_page: number = 1;
|
||
public count: number = 10;
|
||
|
||
// $refs 类型
|
||
public $refs!: { [key: string]: Vue | Element | Vue[] | Element[] };
|
||
public $confirm!: any;
|
||
public $message!: any;
|
||
// 请求的总页数
|
||
public TotalCount!: string;
|
||
|
||
// 请求参数
|
||
public PageParams: { limit: number, page: number } = {
|
||
limit : 10, page : 1
|
||
}
|
||
|
||
/**
|
||
* 【页面中公共的多次被用到的接口】可以在这个父类中定义,
|
||
* 子类logic中直接使用,避免方法的冗余
|
||
* @constructor
|
||
*/
|
||
public async DepartmentListRequest(): Promise<void> {
|
||
}
|
||
}
|