提交 6434e651 编写于 作者: ibizdev's avatar ibizdev

chitanda 发布系统代码

上级 aa091410
......@@ -18,6 +18,15 @@ export class ViewBase extends Vue {
*/
public viewState: Subject<ViewState> = new Subject();
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected appDeName: string = '';
/**
* 数据变化
*
......@@ -413,27 +422,28 @@ export class ViewBase extends Vue {
if (this.$store.getters.getAppData() && this.$store.getters.getAppData().context) {
Object.assign(this.context, this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
return;
}
const path = (this.$route.matched[this.$route.matched.length - 1]).path;
const keys: Array<any> = [];
const curReg = this.$pathToRegExp.pathToRegexp(path, keys);
const matchArray = curReg.exec(this.$route.path);
const tempValue: Object = {};
keys.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item.name, {
enumerable: true,
value: matchArray[index + 1]
} else {
const path = (this.$route.matched[this.$route.matched.length - 1]).path;
const keys: Array<any> = [];
const curReg = this.$pathToRegExp.pathToRegexp(path, keys);
const matchArray = curReg.exec(this.$route.path);
const tempValue: Object = {};
keys.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item.name, {
enumerable: true,
value: matchArray[index + 1]
});
});
});
this.$viewTool.formatRouteParams(tempValue, this.$route, this.context, this.viewparams);
if (this.$store.getters.getAppData() && this.$store.getters.getAppData().context) {
Object.assign(this.context, this.$store.getters.getAppData().context);
this.$viewTool.formatRouteParams(tempValue, this.$route, this.context, this.viewparams);
if (this.$store.getters.getAppData() && this.$store.getters.getAppData().context) {
Object.assign(this.context, this.$store.getters.getAppData().context);
}
if (this.isDeView) {
this.context.srfsessionid = this.$util.createUUID();
}
}
if (this.isDeView) {
//初始化视图唯一标识
Object.assign(this.context, { srfsessionid: this.$util.createUUID() });
if (this.isDeView && !isEmpty(this.appDeName)) {
this.context.srfappdename = this.appDeName;
}
this.handleCustomViewData();
}
......
......@@ -188,7 +188,6 @@ export class ControlBase extends Vue {
* @memberof ControlBase
*/
public mounted(): void {
this.context.srfappdename = this.appDeName;
this.ctrlMounted();
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册