first commit
This commit is contained in:
44
moehu/moehu_admin/src/application/logic/Base.logic.ts
Normal file
44
moehu/moehu_admin/src/application/logic/Base.logic.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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> {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user