提交 96d400d7 编写于 作者: ibizdev's avatar ibizdev

Mosher 发布系统代码 [后台服务,演示应用]

上级 d54169d4
......@@ -663,7 +663,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public load(opt: any = {}): void {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr9GridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKGroupByCodelistListView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -699,7 +699,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public loadDraft(opt: any = {},mode?:string): void {
if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr9GridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKGroupByCodelistListView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return;
}
const arg: any = { ...opt } ;
......
<template>
<div class='app-dr-bar' :style="{ width: `${width}px` }">
<el-menu
:mode="menuDir"
:default-openeds="defaultOpeneds"
:default-active="items[0].id"
@select="onSelect"
@open="onOpen"
@close="onClose">
<app-sider-menus :menus="items"></app-sider-menus>
</el-menu>
</div>
<el-menu
:mode="menuDir"
:default-openeds="defaultOpeneds"
:default-active="items[0].id"
@select="onSelect"
@open="onOpen"
@close="onClose">
<app-sider-menus :menus="items"></app-sider-menus>
</el-menu>
</template>
<script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch, Model,Inject } from 'vue-property-decorator';
......@@ -214,6 +214,20 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public selection: any = {};
public menuItems: any[] = [
{
caption: '详细信息',
id: 'a7c7923d37319b42645a41908d62bae9',
name: 'a7c7923d37319b42645a41908d62bae9',
codeName: 'a7c7923d37319b42645a41908d62bae9',
hidden: false,
items: this.items.find((item: any) => item.groupCodeName === 'a7c7923d37319b42645a41908d62bae9')
},
{
},
]
/**
* 关系栏数据项
*
......@@ -225,18 +239,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
text: "订单明细",
disabled: false,
id: "dritem2",
},
];
/**
* 关系栏数据项导航参数集合
*
* @type {any[]}
* @memberof DefaultBase
*/
public navParamsArray:Array<any> = [
{
id:'dritem2',
groupCodeName: 'a7c7923d37319b42645a41908d62bae9',
drView: 'IBIZOrderDetailSGridView',
localContext:{CONTEXTPARAM1:"%orderstate%"},
localViewParam:{param2:"%orderstate%"}
}
......@@ -395,27 +399,27 @@ export default class DefaultBase extends Vue implements ControlInterface {
* @memberof DefaultBase
*/
public initNavParam(drItem:any){
let returnNavParam:any = {};
if(drItem && drItem.id){
let curDRItem:any = this.navParamsArray.find((item:any) =>{
return Object.is(item.id,drItem.id);
})
if(curDRItem){
let localContext:any = curDRItem.localContext;
let localViewParam:any = curDRItem.localViewParam;
if(localContext && Object.keys(localContext).length >0){
let _context:any = this.$util.computedNavData(this.formData,this.context,this.viewparams,localContext);
returnNavParam.localContext = _context;
}
if(localViewParam && Object.keys(localViewParam).length >0){
let _params:any = this.$util.computedNavData(this.formData,this.context,this.viewparams,localViewParam);
returnNavParam.localViewParam = _params;
}
return returnNavParam;
}else{
return null;
}
}
// let returnNavParam:any = {};
// if(drItem && drItem.id){
// let curDRItem:any = this.navParamsArray.find((item:any) =>{
// return Object.is(item.id,drItem.id);
// })
// if(curDRItem){
// let localContext:any = curDRItem.localContext;
// let localViewParam:any = curDRItem.localViewParam;
// if(localContext && Object.keys(localContext).length >0){
// let _context:any = this.$util.computedNavData(this.formData,this.context,this.viewparams,localContext);
// returnNavParam.localContext = _context;
// }
// if(localViewParam && Object.keys(localViewParam).length >0){
// let _params:any = this.$util.computedNavData(this.formData,this.context,this.viewparams,localViewParam);
// returnNavParam.localViewParam = _params;
// }
// return returnNavParam;
// }else{
// return null;
// }
// }
}
/**
......@@ -425,27 +429,30 @@ export default class DefaultBase extends Vue implements ControlInterface {
* @memberof DefaultBase
*/
public onSelect($event: any): void {
const item = this.getItem(this.items, $event);
if (Object.is(item.id, this.selection.id)) {
if (key === this.selection.id) {
return;
}
this.$emit('selectionchange', [item]);
let localNavParam:any = this.initNavParam(item);
const refview = this.getDRBarItem({ nodetype: item.id });
this.selection = {};
const _context: any = { ...JSON.parse(JSON.stringify(this.context)) };
if(localNavParam && localNavParam.localContext){
Object.assign(_context,localNavParam.localContext);
}
const _params: any = {};
if(localNavParam && localNavParam.localViewParam){
Object.assign(_params,localNavParam.localViewParam);
}
if (refview && refview.parentdatajo) {
Object.assign(_context, refview.parentdatajo);
Object.assign(this.selection, { view: { viewname: refview.viewname }, data: _context, param: _params });
}
Object.assign(this.selection, item);
const selectItem = this.getItem(this.items, key);
const tempContext = Util.deepCopy(this.context);
const tempViewParams = Util.deepCopy(this.viewparams);
// this.$emit('selectionchange', [item]);
// let localNavParam:any = this.initNavParam(item);
// const refview = this.getDRBarItem({ nodetype: item.id });
// this.selection = {};
// const _context: any = { ...JSON.parse(JSON.stringify(this.context)) };
// if(localNavParam && localNavParam.localContext){
// Object.assign(_context,localNavParam.localContext);
// }
// const _params: any = {};
// if(localNavParam && localNavParam.localViewParam){
// Object.assign(_params,localNavParam.localViewParam);
// }
// if (refview && refview.parentdatajo) {
// Object.assign(_context, refview.parentdatajo);
// Object.assign(this.selection, { view: { viewname: refview.viewname }, data: _context, param: _params });
// }
// Object.assign(this.selection, item);
}
/**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册