提交 74cba60a 编写于 作者: KK's avatar KK

部件服务增加 store

上级 6367b57f
import { appEntityServiceConstructor } from '@/app-core/service/app-entity-service-constructor'; import { appEntityServiceConstructor } from '@/app-core/service/app-entity-service-constructor';
import { Util, Http, Loading, HttpResponse } from '../utils'; import { Util, Http, Loading, HttpResponse } from '../utils';
import { CodeListService } from '@ibiz-core'; import { CodeListService } from '@ibiz-core';
import { Store } from 'vuex';
/** /**
* 部件服务基类 * 部件服务基类
* *
...@@ -63,7 +63,7 @@ export class ControlServiceBase { ...@@ -63,7 +63,7 @@ export class ControlServiceBase {
* @type {CodeListService} * @type {CodeListService}
* @memberof ControlServiceBase * @memberof ControlServiceBase
*/ */
protected codeListService: CodeListService = new CodeListService(); protected codeListService: CodeListService;
/** /**
* 请求服务对象 * 请求服务对象
...@@ -358,5 +358,34 @@ export class ControlServiceBase { ...@@ -358,5 +358,34 @@ export class ControlServiceBase {
*/ */
protected mergeDefaults(response: any = {}): void { } protected mergeDefaults(response: any = {}): void { }
/**
* Vue 状态管理器
*
* @public
* @type {(any | null)}
* @memberof AuthService
*/
public $store: Store<any> | null = null;
/**
* Creates an instance of ControlService.
*
* @param {*} [opts={}]
* @memberof ControlService
*/
constructor(opts: any = {}) {
this.$store = opts.$store;
this.codeListService = new CodeListService({ $store:opts.$store });
}
/**
* 获取状态管理器
*
* @returns {(any | null)}
* @memberof ControlService
*/
public getStore(): Store<any> | null {
return this.$store;
}
} }
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册