提交 d1b16d79 编写于 作者: tony001's avatar tony001

补充视图服务内容

上级 022c8410
......@@ -13,6 +13,7 @@ import { utilServiceRegister } from '@/utilservice/util-service-register';
import { entityServiceRegister } from '@/service/entity-service-register';
import { counterServiceRegister } from '@/counter/counter-service-register';
import { codeListRegister } from '@codelist/codelist-register';
import { messageServiceRegister } from '@/message/message-service-register';
import InputBox from './components/input-box/input-box.vue'
import AppKeepAlive from './components/app-keep-alive/app-keep-alive.vue'
......@@ -106,6 +107,8 @@ window['entityServiceRegister'] = entityServiceRegister;
window['counterServiceRegister'] = counterServiceRegister;
// 全局挂载代码表服务注册中心
window['codeListRegister'] = codeListRegister;
// 全局挂载视图消息服务注册中心
window['messageServiceRegister'] = messageServiceRegister;
export const AppComponents = {
install(v: any, opt: any) {
......
......@@ -4,6 +4,7 @@ import { UtilServiceRegister } from '@/utilservice/util-service-register';
import { EntityServiceRegister } from '@/service/entity-service-register';
import { CounterServiceRegister } from '@/counter/counter-service-register';
import { CodeListRegister } from '@codelist/codelist-register';
import { MessageServiceRegister } from '@/message/message-service-register';
declare global {
interface Window {
uiServiceRegister: UIServiceRegister,
......@@ -11,6 +12,7 @@ declare global {
utilServiceRegister: UtilServiceRegister,
entityServiceRegister: EntityServiceRegister,
counterServiceRegister: CounterServiceRegister,
codeListRegister:CodeListRegister
codeListRegister:CodeListRegister,
messageServiceRegister:MessageServiceRegister
}
}
\ No newline at end of file
......@@ -59,9 +59,8 @@ export default class ViewMessageGroupService {
if(ViewMessageGroupService.allViewMessageGroup){
return ViewMessageGroupService.allViewMessageGroup[tag]?ViewMessageGroupService.allViewMessageGroup[tag]:[];
}else{
this.loadAllViewMessageGroup().then((result:any) =>{
return result[tag]?result[tag]:[];
})
let result:any = this.loadAllViewMessageGroup();
return result[tag]?result[tag]:[];
}
}
......
......@@ -130,6 +130,18 @@ export default class ViewMessageService {
*/
public initBasicParam(){}
/**
* 获取视图消息服务
*
* @protected
* @param {string} name 视图消息codename
* @returns {Promise<any>}
* @memberof ViewMessageService
*/
public getService(name: string): Promise<any> {
return (window as any)['messageServiceRegister'].getService(name);
}
/**
* 通过tag获取视图消息
*
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册