提交 94c1446b 编写于 作者: ibizdev's avatar ibizdev

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

上级 bb1d22cd
import ViewEngine from './view-engine'; import { ExpViewEngine } from './exp-view-engine';
/** /**
* 日历导航视图界面引擎 * 日历导航视图界面引擎
...@@ -7,24 +7,7 @@ import ViewEngine from './view-engine'; ...@@ -7,24 +7,7 @@ import ViewEngine from './view-engine';
* @class CalendarExpViewEngine * @class CalendarExpViewEngine
* @extends {ViewEngine} * @extends {ViewEngine}
*/ */
export default class CalendarExpViewEngine extends ViewEngine { export default class CalendarExpViewEngine extends ExpViewEngine {
/**
* 日历导航栏部件
*
* @type {*}
* @memberof CalendarExpViewEngine
*/
public calendarExpBar: any = null;
/**
* Creates an instance of CalendarExpViewEngine.
*
* @memberof CalendarExpViewEngine
*/
constructor() {
super();
}
/** /**
* 初始化引擎 * 初始化引擎
...@@ -33,78 +16,17 @@ export default class CalendarExpViewEngine extends ViewEngine { ...@@ -33,78 +16,17 @@ export default class CalendarExpViewEngine extends ViewEngine {
* @memberof CalendarExpViewEngine * @memberof CalendarExpViewEngine
*/ */
public init(options: any): void { public init(options: any): void {
this.calendarExpBar = options.calendarexpbar; this.expBar = options.calendarexpbar;
super.init(options); super.init(options);
} }
/**
* 引擎加载
*
* @memberof CalendarExpViewEngine
*/
public load(): void {
super.load();
if (this.getCalendarExpBar() && this.isLoadDefault) {
const tag = this.getCalendarExpBar().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.viewparams });
} else {
this.isLoadDefault = true;
}
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof CalendarExpViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'calendarexpbar')) {
this.calendarExpBarEvent(eventName, args);
}
}
/**
* 日历导航事件
*
* @param {string} eventName
* @param {*} args
* @memberof CalendarExpViewEngine
*/
public calendarExpBarEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'load')) {
this.view.$emit('viewload', args);
}
if (Object.is(eventName, 'selectionchange')) {
this.view.$emit('viewdataschange', args);
}
if (Object.is(eventName, 'activated')) {
this.view.$emit('viewdatasactivated', args);
}
}
/**
* 获取部件对象
*
* @returns {*}
* @memberof CalendarExpViewEngine
*/
public getCalendarExpBar(): any {
return this.calendarExpBar;
}
/** /**
* @description 销毁 * @description 视图销毁
* @memberof CalendarExpViewEngine * @memberof CalendarExpViewEngine
*/ */
public destroy() { public destroyed() {
super.destroy(); super.destroyed();
this.calendarExpBar = null; this.expBar = null;
} }
} }
\ No newline at end of file
import ViewEngine from './view-engine'; import { ExpViewEngine } from './exp-view-engine';
/** /**
* 卡片视图导航视图界面引擎 * 卡片视图导航视图界面引擎
...@@ -7,24 +7,7 @@ import ViewEngine from './view-engine'; ...@@ -7,24 +7,7 @@ import ViewEngine from './view-engine';
* @class DataViewExpViewEngine * @class DataViewExpViewEngine
* @extends {ViewEngine} * @extends {ViewEngine}
*/ */
export default class DataViewExpViewEngine extends ViewEngine { export default class DataViewExpViewEngine extends ExpViewEngine {
/**
* 卡片导航栏部件
*
* @type {*}
* @memberof DataViewExpViewEngine
*/
public dataviewExpBar: any = null;
/**
* Creates an instance of DataViewExpViewEngine.
*
* @memberof DataViewExpViewEngine
*/
constructor() {
super();
}
/** /**
* 初始化引擎 * 初始化引擎
...@@ -33,79 +16,17 @@ export default class DataViewExpViewEngine extends ViewEngine { ...@@ -33,79 +16,17 @@ export default class DataViewExpViewEngine extends ViewEngine {
* @memberof DataViewExpViewEngine * @memberof DataViewExpViewEngine
*/ */
public init(options: any): void { public init(options: any): void {
this.dataviewExpBar = options.dataviewexpbar; this.expBar = options.dataviewexpbar;
super.init(options); super.init(options);
} }
/** /**
* 引擎加载 * @description 视图销毁
*
* @memberof DataViewExpViewEngine * @memberof DataViewExpViewEngine
*/ */
public load(): void { public destroyed() {
super.load(); super.destroyed();
if (this.getDataviewExpBar() && this.isLoadDefault) { this.expBar = null;
const tag = this.getDataviewExpBar().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.viewparams });
} else {
this.isLoadDefault = true;
}
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof DataViewExpViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'dataviewexpbar')) {
this.dataviewExpBarEvent(eventName, args);
}
} }
/**
* 卡片导航事件
*
* @param {string} eventName
* @param {*} args
* @memberof DataViewExpViewEngine
*/
public dataviewExpBarEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'load')) {
this.view.$emit('viewload', args);
}
if (Object.is(eventName, 'selectionchange')) {
this.view.$emit('viewdataschange', args);
}
if (Object.is(eventName, 'activated')) {
this.view.$emit('viewdatasactivated', args);
}
}
/**
* 获取部件对象
*
* @returns {*}
* @memberof DataViewExpViewEngine
*/
public getDataviewExpBar(): any {
return this.dataviewExpBar;
}
/**
* @description 销毁
* @memberof DataViewExpViewEngine
*/
public destroy() {
super.destroy();
this.dataviewExpBar = null;
}
} }
\ No newline at end of file
import ViewEngine from './view-engine'; import { ExpViewEngine } from './exp-view-engine';
/** /**
* 实体树导航视图界面引擎 * 实体树导航视图界面引擎
* *
* @export * @export
* @class TreeExpView * @class TreeExpViewEngine
* @extends {ViewEngine} * @extends {ViewEngine}
*/ */
export default class TreeExpView extends ViewEngine { export default class TreeExpViewEngine extends ExpViewEngine {
/**
* 选择视图面板
*
* @type {*}
* @memberof TreeExpView
*/
public treeExpBar: any = null;
/**
* Creates an instance of TreeExpView.
*
* @memberof TreeExpView
*/
constructor() {
super();
}
/** /**
* 初始化引擎 * 初始化引擎
* *
* @param {*} options * @param {*} options
* @memberof TreeExpView * @memberof TreeExpViewEngine
*/ */
public init(options: any): void { public init(options: any): void {
this.treeExpBar = options.treeexpbar; this.expBar = options.treeexpbar;
super.init(options); super.init(options);
} }
/**
* 引擎加载
*
* @memberof TreeExpView
*/
public load(): void {
super.load();
if (this.getTreeExpBar() && this.isLoadDefault) {
const tag = this.getTreeExpBar().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.context });
} else {
this.isLoadDefault = true;
}
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof TreeExpView
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'treeexpbar')) {
this.treeExpBarEvent(eventName, args);
}
}
/** /**
* 树导航事件 * @description 视图销毁
* * @memberof TreeExpViewEngine
* @param {string} eventName
* @param {*} args
* @memberof TreeExpView
*/ */
public treeExpBarEvent(eventName: string, args: any): void { public destroyed() {
if (Object.is(eventName, 'load')) { super.destroyed();
this.view.$emit('viewload', args); this.expBar = null;
}
if (Object.is(eventName, 'selectionchange')) {
this.view.$emit('viewdataschange', args);
}
if (Object.is(eventName, 'activated')) {
this.view.$emit('viewdatasactivated', args);
} }
}
/**
* 获取部件对象那
*
* @returns {*}
* @memberof TreeExpView
*/
public getTreeExpBar(): any {
return this.treeExpBar;
}
/**
* @description 销毁
* @memberof TreeExpView
*/
public destroy() {
super.destroy();
this.treeExpBar = null;
}
} }
\ No newline at end of file
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
<div class="view-container dedataviewexpview ibizbookdata-view-exp-view"> <div class="view-container dedataviewexpview ibizbookdata-view-exp-view">
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizbookdataviewexpview"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizbookdataviewexpview"></app-studioaction>
<card class='view-card view-no-toolbar' :dis-hover="true" :bordered="false"> <card class='view-card view-no-toolbar' :dis-hover="true" :bordered="false">
<div slot='title' class="header-container"> <div slot='title' class="header-container">
<span class='caption-info'>{{$t(model.srfCaption)}}</span> <span class='caption-info'>{{$t(model.srfCaption)}}</span>
</div> </div>
<div class="content-container"> <div class="content-container">
<split v-model="split" mode="horizontal" @on-move-end="onSplitChange">
<template slot="left">
<view_dataviewexpbar <view_dataviewexpbar
:viewState="viewState" :viewState="viewState"
:viewparams="viewparams" :viewparams="viewparams"
...@@ -25,12 +25,24 @@ ...@@ -25,12 +25,24 @@
@activated="dataviewexpbar_activated($event)" @activated="dataviewexpbar_activated($event)"
@closeview="closeView($event)"> @closeview="closeView($event)">
</view_dataviewexpbar> </view_dataviewexpbar>
</template>
<template slot="right">
<component
v-if="navItem && navItem.navView"
:is="navItem.navView"
:key="navItem.data && navItem.data.length ? navItem.data[0].srfkey : ''"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(navItem.srfnavdata.context)"
:viewparam="JSON.stringify(navItem.srfnavdata.viewparams)">
</component>
</template>
</split>
</div> </div>
</card> </card>
</div> </div>
</template> </template>
<script lang='tsx'> <script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch,Inject } from 'vue-property-decorator'; import { Vue, Component, Prop, Provide, Emit, Watch,Inject } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils'; import { UIActionTool,Util } from '@/utils';
...@@ -43,8 +55,6 @@ import DataViewExpViewEngine from '@engine/view/data-view-exp-view-engine'; ...@@ -43,8 +55,6 @@ import DataViewExpViewEngine from '@engine/view/data-view-exp-view-engine';
import IBIZBOOKUIService from '@/uiservice/ibizbook/ibizbook-ui-service'; import IBIZBOOKUIService from '@/uiservice/ibizbook/ibizbook-ui-service';
import CodeListService from "@/codelist/codelist-service";
@Component({ @Component({
components: { components: {
...@@ -567,7 +577,6 @@ export default class IBIZBOOKDataViewExpViewBase extends Vue { ...@@ -567,7 +577,6 @@ export default class IBIZBOOKDataViewExpViewBase extends Vue {
_this.loadModel(); _this.loadModel();
} }
} }
...@@ -714,7 +723,6 @@ export default class IBIZBOOKDataViewExpViewBase extends Vue { ...@@ -714,7 +723,6 @@ export default class IBIZBOOKDataViewExpViewBase extends Vue {
this.viewState.complete(); this.viewState.complete();
} }
/** /**
* 视图唯一标识 * 视图唯一标识
* *
...@@ -724,36 +732,46 @@ export default class IBIZBOOKDataViewExpViewBase extends Vue { ...@@ -724,36 +732,46 @@ export default class IBIZBOOKDataViewExpViewBase extends Vue {
public viewUID: string = 'sample-ibizbookdata-view-exp-view'; public viewUID: string = 'sample-ibizbookdata-view-exp-view';
/** /**
* 搜索值 * 分隔值
* *
* @type {string} * @type {number}
* @memberof IBIZBOOKDataViewExpViewBase * @memberof IBIZBOOKDataViewExpViewBase
*/ */
public query: string = ''; public split: number = 0.5;
/** /**
* 是否展开搜索表单 * 导航项
* *
* @type {boolean} * @type {*}
* @memberof IBIZBOOKDataViewExpViewBase * @memberof IBIZBOOKDataViewExpViewBase
*/ */
public isExpandSearchForm: boolean = false; public navItem: any = {};
/** /**
* 快速搜索 * split值变化事件
* *
* @param {*} $event
* @memberof IBIZBOOKDataViewExpViewBase * @memberof IBIZBOOKDataViewExpViewBase
*/ */
public onSearch($event: any): void { public onSplitChange() {
const refs: any = this.$refs; if (this.split) {
if (refs.kanban) { this.$store.commit("setViewSplit", { viewUID: this.viewUID, viewSplit: this.split });
refs.kanban.refresh({});
} }
} }
/**
* 初始化分隔值
*
* @memberof IBIZBOOKDataViewExpViewBase
*/
public initSplit() {
if (this.$store.getters.getViewSplit(this.viewUID)) {
this.split = this.$store.getters.getViewSplit(this.viewUID);
} else {
const containerWidth = (this.$el as any).offsetWidth;
this.split = 0 / containerWidth;
this.$store.commit("setViewSplit", { viewUID: this.viewUID, viewSplit: this.split });
}
}
} }
</script> </script>
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
<div class="view-container decalendarexpview ibizorder-calendar-exp-view"> <div class="view-container decalendarexpview ibizorder-calendar-exp-view">
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizordercalendarexpview"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizordercalendarexpview"></app-studioaction>
<card class='view-card view-no-caption view-no-toolbar' :dis-hover="true" :bordered="false"> <card class='view-card view-no-caption view-no-toolbar' :dis-hover="true" :bordered="false">
<div class='view-top-messages'> <div class='view-top-messages'>
<app-alert-group position='TOP' :context="context" :viewparam="viewparams" infoGroup='VMGroup46' viewname='ibizordercalendarexpview'></app-alert-group> </div> <app-alert-group position='TOP' :context="context" :viewparam="viewparams" infoGroup='VMGroup46' viewname='ibizordercalendarexpview'></app-alert-group> </div>
<div class="content-container"> <div class="content-container">
<split v-model="split" mode="horizontal" @on-move-end="onSplitChange">
<template slot="left">
<view_calendarexpbar <view_calendarexpbar
:viewState="viewState" :viewState="viewState"
:viewparams="viewparams" :viewparams="viewparams"
...@@ -24,6 +24,19 @@ ...@@ -24,6 +24,19 @@
@activated="calendarexpbar_activated($event)" @activated="calendarexpbar_activated($event)"
@closeview="closeView($event)"> @closeview="closeView($event)">
</view_calendarexpbar> </view_calendarexpbar>
</template>
<template slot="right">
<component
v-if="navItem && navItem.navView"
:is="navItem.navView"
:key="navItem.data && navItem.data.length ? navItem.data[0].srfkey : ''"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(navItem.srfnavdata.context)"
:viewparam="JSON.stringify(navItem.srfnavdata.viewparams)">
</component>
</template>
</split>
</div> </div>
</card> </card>
</div> </div>
...@@ -769,6 +782,48 @@ export default class IBIZOrderCalendarExpViewBase extends Vue { ...@@ -769,6 +782,48 @@ export default class IBIZOrderCalendarExpViewBase extends Vue {
*/ */
public viewUID: string = 'sample-ibizorder-calendar-exp-view'; public viewUID: string = 'sample-ibizorder-calendar-exp-view';
/**
* 分隔值
*
* @type {number}
* @memberof IBIZOrderCalendarExpViewBase
*/
public split: number = 0.5;
/**
* 导航项
*
* @type {*}
* @memberof IBIZOrderCalendarExpViewBase
*/
public navItem: any = {};
/**
* split值变化事件
*
* @memberof IBIZOrderCalendarExpViewBase
*/
public onSplitChange() {
if (this.split) {
this.$store.commit("setViewSplit", { viewUID: this.viewUID, viewSplit: this.split });
}
}
/**
* 初始化分隔值
*
* @memberof IBIZOrderCalendarExpViewBase
*/
public initSplit() {
if (this.$store.getters.getViewSplit(this.viewUID)) {
this.split = this.$store.getters.getViewSplit(this.viewUID);
} else {
const containerWidth = (this.$el as any).offsetWidth;
this.split = 0 / containerWidth;
this.$store.commit("setViewSplit", { viewUID: this.viewUID, viewSplit: this.split });
}
}
} }
</script> </script>
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
<div class="view-container dedataviewexpview ibizorder-data-view-exp-view"> <div class="view-container dedataviewexpview ibizorder-data-view-exp-view">
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizorderdataviewexpview"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizorderdataviewexpview"></app-studioaction>
<card class='view-card view-no-caption view-no-toolbar' :dis-hover="true" :bordered="false"> <card class='view-card view-no-caption view-no-toolbar' :dis-hover="true" :bordered="false">
<div class='view-top-messages'> <div class='view-top-messages'>
<app-alert-group position='TOP' :context="context" :viewparam="viewparams" infoGroup='VMGroup49' viewname='ibizorderdataviewexpview'></app-alert-group> </div> <app-alert-group position='TOP' :context="context" :viewparam="viewparams" infoGroup='VMGroup49' viewname='ibizorderdataviewexpview'></app-alert-group> </div>
<div class="content-container"> <div class="content-container">
<split v-model="split" mode="horizontal" @on-move-end="onSplitChange">
<template slot="left">
<view_dataviewexpbar <view_dataviewexpbar
:viewState="viewState" :viewState="viewState"
:viewparams="viewparams" :viewparams="viewparams"
...@@ -24,12 +24,24 @@ ...@@ -24,12 +24,24 @@
@activated="dataviewexpbar_activated($event)" @activated="dataviewexpbar_activated($event)"
@closeview="closeView($event)"> @closeview="closeView($event)">
</view_dataviewexpbar> </view_dataviewexpbar>
</template>
<template slot="right">
<component
v-if="navItem && navItem.navView"
:is="navItem.navView"
:key="navItem.data && navItem.data.length ? navItem.data[0].srfkey : ''"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(navItem.srfnavdata.context)"
:viewparam="JSON.stringify(navItem.srfnavdata.viewparams)">
</component>
</template>
</split>
</div> </div>
</card> </card>
</div> </div>
</template> </template>
<script lang='tsx'> <script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch,Inject } from 'vue-property-decorator'; import { Vue, Component, Prop, Provide, Emit, Watch,Inject } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils'; import { UIActionTool,Util } from '@/utils';
...@@ -42,8 +54,6 @@ import DataViewExpViewEngine from '@engine/view/data-view-exp-view-engine'; ...@@ -42,8 +54,6 @@ import DataViewExpViewEngine from '@engine/view/data-view-exp-view-engine';
import IBIZOrderUIService from '@/uiservice/ibizorder/ibizorder-ui-service'; import IBIZOrderUIService from '@/uiservice/ibizorder/ibizorder-ui-service';
import CodeListService from "@/codelist/codelist-service";
@Component({ @Component({
components: { components: {
...@@ -567,7 +577,6 @@ export default class IBIZOrderDataViewExpViewBase extends Vue { ...@@ -567,7 +577,6 @@ export default class IBIZOrderDataViewExpViewBase extends Vue {
_this.loadModel(); _this.loadModel();
} }
} }
...@@ -765,7 +774,6 @@ export default class IBIZOrderDataViewExpViewBase extends Vue { ...@@ -765,7 +774,6 @@ export default class IBIZOrderDataViewExpViewBase extends Vue {
this.viewState.complete(); this.viewState.complete();
} }
/** /**
* 视图唯一标识 * 视图唯一标识
* *
...@@ -775,36 +783,46 @@ export default class IBIZOrderDataViewExpViewBase extends Vue { ...@@ -775,36 +783,46 @@ export default class IBIZOrderDataViewExpViewBase extends Vue {
public viewUID: string = 'sample-ibizorder-data-view-exp-view'; public viewUID: string = 'sample-ibizorder-data-view-exp-view';
/** /**
* 搜索值 * 分隔值
* *
* @type {string} * @type {number}
* @memberof IBIZOrderDataViewExpViewBase * @memberof IBIZOrderDataViewExpViewBase
*/ */
public query: string = ''; public split: number = 0.5;
/** /**
* 是否展开搜索表单 * 导航项
* *
* @type {boolean} * @type {*}
* @memberof IBIZOrderDataViewExpViewBase * @memberof IBIZOrderDataViewExpViewBase
*/ */
public isExpandSearchForm: boolean = false; public navItem: any = {};
/** /**
* 快速搜索 * split值变化事件
* *
* @param {*} $event
* @memberof IBIZOrderDataViewExpViewBase * @memberof IBIZOrderDataViewExpViewBase
*/ */
public onSearch($event: any): void { public onSplitChange() {
const refs: any = this.$refs; if (this.split) {
if (refs.kanban) { this.$store.commit("setViewSplit", { viewUID: this.viewUID, viewSplit: this.split });
refs.kanban.refresh({});
} }
} }
/**
* 初始化分隔值
*
* @memberof IBIZOrderDataViewExpViewBase
*/
public initSplit() {
if (this.$store.getters.getViewSplit(this.viewUID)) {
this.split = this.$store.getters.getViewSplit(this.viewUID);
} else {
const containerWidth = (this.$el as any).offsetWidth;
this.split = 0 / containerWidth;
this.$store.commit("setViewSplit", { viewUID: this.viewUID, viewSplit: this.split });
}
}
} }
</script> </script>
......
...@@ -4,10 +4,11 @@ ...@@ -4,10 +4,11 @@
<div class='view-container detreeexpview ibizorder-tree-exp-view'> <div class='view-container detreeexpview ibizorder-tree-exp-view'>
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizordertreeexpview"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizordertreeexpview"></app-studioaction>
<card class='view-card view-no-caption view-no-toolbar' :dis-hover="true" :bordered="false"> <card class='view-card view-no-caption view-no-toolbar' :dis-hover="true" :bordered="false">
<div class='view-top-messages'> <div class='view-top-messages'>
<app-alert-group position='TOP' :context="context" :viewparam="viewparams" infoGroup='VMGroup48' viewname='ibizordertreeexpview'></app-alert-group> </div> <app-alert-group position='TOP' :context="context" :viewparam="viewparams" infoGroup='VMGroup48' viewname='ibizordertreeexpview'></app-alert-group> </div>
<div class='content-container'> <div class='content-container'>
<split v-model="split" mode="horizontal" @on-move-end="onSplitChange">
<template slot="left">
<view_treeexpbar <view_treeexpbar
:viewState="viewState" :viewState="viewState"
:viewparams="viewparams" :viewparams="viewparams"
...@@ -22,6 +23,19 @@ ...@@ -22,6 +23,19 @@
@activated="treeexpbar_activated($event)" @activated="treeexpbar_activated($event)"
@closeview="closeView($event)"> @closeview="closeView($event)">
</view_treeexpbar> </view_treeexpbar>
</template>
<template slot="right">
<component
v-if="navItem && navItem.navView"
:is="navItem.navView"
:key="navItem.data && navItem.data.length ? navItem.data[0].srfkey : ''"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(navItem.srfnavdata.context)"
:viewparam="JSON.stringify(navItem.srfnavdata.viewparams)">
</component>
</template>
</split>
</div> </div>
</card> </card>
</div> </div>
...@@ -766,6 +780,48 @@ export default class IBIZOrderTreeExpViewBase extends Vue { ...@@ -766,6 +780,48 @@ export default class IBIZOrderTreeExpViewBase extends Vue {
*/ */
public viewUID: string = 'sample-ibizorder-tree-exp-view'; public viewUID: string = 'sample-ibizorder-tree-exp-view';
/**
* 分隔值
*
* @type {number}
* @memberof IBIZOrderTreeExpViewBase
*/
public split: number = 0.5;
/**
* 导航项
*
* @type {*}
* @memberof IBIZOrderTreeExpViewBase
*/
public navItem: any = {};
/**
* split值变化事件
*
* @memberof IBIZOrderTreeExpViewBase
*/
public onSplitChange() {
if (this.split) {
this.$store.commit("setViewSplit", { viewUID: this.viewUID, viewSplit: this.split });
}
}
/**
* 初始化分隔值
*
* @memberof IBIZOrderTreeExpViewBase
*/
public initSplit() {
if (this.$store.getters.getViewSplit(this.viewUID)) {
this.split = this.$store.getters.getViewSplit(this.viewUID);
} else {
const containerWidth = (this.$el as any).offsetWidth;
this.split = 500 / containerWidth;
this.$store.commit("setViewSplit", { viewUID: this.viewUID, viewSplit: this.split });
}
}
} }
</script> </script>
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
<div class="view-container decalendarexpview ibizorder-usr2-calendar-exp-view"> <div class="view-container decalendarexpview ibizorder-usr2-calendar-exp-view">
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizorderusr2calendarexpview"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizorderusr2calendarexpview"></app-studioaction>
<card class='view-card view-no-caption view-no-toolbar' :dis-hover="true" :bordered="false"> <card class='view-card view-no-caption view-no-toolbar' :dis-hover="true" :bordered="false">
<div class='view-top-messages'> <div class='view-top-messages'>
<app-alert-group position='TOP' :context="context" :viewparam="viewparams" infoGroup='VMGroup47' viewname='ibizorderusr2calendarexpview'></app-alert-group> </div> <app-alert-group position='TOP' :context="context" :viewparam="viewparams" infoGroup='VMGroup47' viewname='ibizorderusr2calendarexpview'></app-alert-group> </div>
<div class="content-container"> <div class="content-container">
<split v-model="split" mode="horizontal" @on-move-end="onSplitChange">
<template slot="left">
<view_calendarexpbar <view_calendarexpbar
:viewState="viewState" :viewState="viewState"
:viewparams="viewparams" :viewparams="viewparams"
...@@ -24,6 +24,19 @@ ...@@ -24,6 +24,19 @@
@activated="calendarexpbar_activated($event)" @activated="calendarexpbar_activated($event)"
@closeview="closeView($event)"> @closeview="closeView($event)">
</view_calendarexpbar> </view_calendarexpbar>
</template>
<template slot="right">
<component
v-if="navItem && navItem.navView"
:is="navItem.navView"
:key="navItem.data && navItem.data.length ? navItem.data[0].srfkey : ''"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(navItem.srfnavdata.context)"
:viewparam="JSON.stringify(navItem.srfnavdata.viewparams)">
</component>
</template>
</split>
</div> </div>
</card> </card>
</div> </div>
...@@ -769,6 +782,48 @@ export default class IBIZOrderUsr2CalendarExpViewBase extends Vue { ...@@ -769,6 +782,48 @@ export default class IBIZOrderUsr2CalendarExpViewBase extends Vue {
*/ */
public viewUID: string = 'sample-ibizorder-usr2-calendar-exp-view'; public viewUID: string = 'sample-ibizorder-usr2-calendar-exp-view';
/**
* 分隔值
*
* @type {number}
* @memberof IBIZOrderUsr2CalendarExpViewBase
*/
public split: number = 0.5;
/**
* 导航项
*
* @type {*}
* @memberof IBIZOrderUsr2CalendarExpViewBase
*/
public navItem: any = {};
/**
* split值变化事件
*
* @memberof IBIZOrderUsr2CalendarExpViewBase
*/
public onSplitChange() {
if (this.split) {
this.$store.commit("setViewSplit", { viewUID: this.viewUID, viewSplit: this.split });
}
}
/**
* 初始化分隔值
*
* @memberof IBIZOrderUsr2CalendarExpViewBase
*/
public initSplit() {
if (this.$store.getters.getViewSplit(this.viewUID)) {
this.split = this.$store.getters.getViewSplit(this.viewUID);
} else {
const containerWidth = (this.$el as any).offsetWidth;
this.split = 0 / containerWidth;
this.$store.commit("setViewSplit", { viewUID: this.viewUID, viewSplit: this.split });
}
}
} }
</script> </script>
......
...@@ -4,10 +4,11 @@ ...@@ -4,10 +4,11 @@
<div class='view-container detreeexpview ibizsample0003-f1-tree-exp-view'> <div class='view-container detreeexpview ibizsample0003-f1-tree-exp-view'>
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizsample0003f1treeexpview"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizsample0003f1treeexpview"></app-studioaction>
<card class='view-card view-no-caption view-no-toolbar' :dis-hover="true" :bordered="false"> <card class='view-card view-no-caption view-no-toolbar' :dis-hover="true" :bordered="false">
<div class='view-top-messages'> <div class='view-top-messages'>
<app-alert-group position='TOP' :context="context" :viewparam="viewparams" infoGroup='VMGroup54' viewname='ibizsample0003f1treeexpview'></app-alert-group> </div> <app-alert-group position='TOP' :context="context" :viewparam="viewparams" infoGroup='VMGroup54' viewname='ibizsample0003f1treeexpview'></app-alert-group> </div>
<div class='content-container'> <div class='content-container'>
<split v-model="split" mode="horizontal" @on-move-end="onSplitChange">
<template slot="left">
<view_treeexpbar <view_treeexpbar
:viewState="viewState" :viewState="viewState"
:viewparams="viewparams" :viewparams="viewparams"
...@@ -22,6 +23,19 @@ ...@@ -22,6 +23,19 @@
@activated="treeexpbar_activated($event)" @activated="treeexpbar_activated($event)"
@closeview="closeView($event)"> @closeview="closeView($event)">
</view_treeexpbar> </view_treeexpbar>
</template>
<template slot="right">
<component
v-if="navItem && navItem.navView"
:is="navItem.navView"
:key="navItem.data && navItem.data.length ? navItem.data[0].srfkey : ''"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(navItem.srfnavdata.context)"
:viewparam="JSON.stringify(navItem.srfnavdata.viewparams)">
</component>
</template>
</split>
</div> </div>
</card> </card>
</div> </div>
...@@ -714,6 +728,48 @@ export default class IBIZSample0003F1TreeExpViewBase extends Vue { ...@@ -714,6 +728,48 @@ export default class IBIZSample0003F1TreeExpViewBase extends Vue {
*/ */
public viewUID: string = 'sample-ibizsample0003-f1-tree-exp-view'; public viewUID: string = 'sample-ibizsample0003-f1-tree-exp-view';
/**
* 分隔值
*
* @type {number}
* @memberof IBIZSample0003F1TreeExpViewBase
*/
public split: number = 0.5;
/**
* 导航项
*
* @type {*}
* @memberof IBIZSample0003F1TreeExpViewBase
*/
public navItem: any = {};
/**
* split值变化事件
*
* @memberof IBIZSample0003F1TreeExpViewBase
*/
public onSplitChange() {
if (this.split) {
this.$store.commit("setViewSplit", { viewUID: this.viewUID, viewSplit: this.split });
}
}
/**
* 初始化分隔值
*
* @memberof IBIZSample0003F1TreeExpViewBase
*/
public initSplit() {
if (this.$store.getters.getViewSplit(this.viewUID)) {
this.split = this.$store.getters.getViewSplit(this.viewUID);
} else {
const containerWidth = (this.$el as any).offsetWidth;
this.split = 0 / containerWidth;
this.$store.commit("setViewSplit", { viewUID: this.viewUID, viewSplit: this.split });
}
}
} }
</script> </script>
......
...@@ -4,10 +4,11 @@ ...@@ -4,10 +4,11 @@
<div class='view-container detreeexpview ibizsample0003-f2-tree-exp-view'> <div class='view-container detreeexpview ibizsample0003-f2-tree-exp-view'>
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizsample0003f2treeexpview"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizsample0003f2treeexpview"></app-studioaction>
<card class='view-card view-no-caption view-no-toolbar' :dis-hover="true" :bordered="false"> <card class='view-card view-no-caption view-no-toolbar' :dis-hover="true" :bordered="false">
<div class='view-top-messages'> <div class='view-top-messages'>
<app-alert-group position='TOP' :context="context" :viewparam="viewparams" infoGroup='VMGroup55' viewname='ibizsample0003f2treeexpview'></app-alert-group> </div> <app-alert-group position='TOP' :context="context" :viewparam="viewparams" infoGroup='VMGroup55' viewname='ibizsample0003f2treeexpview'></app-alert-group> </div>
<div class='content-container'> <div class='content-container'>
<split v-model="split" mode="horizontal" @on-move-end="onSplitChange">
<template slot="left">
<view_treeexpbar <view_treeexpbar
:viewState="viewState" :viewState="viewState"
:viewparams="viewparams" :viewparams="viewparams"
...@@ -22,6 +23,19 @@ ...@@ -22,6 +23,19 @@
@activated="treeexpbar_activated($event)" @activated="treeexpbar_activated($event)"
@closeview="closeView($event)"> @closeview="closeView($event)">
</view_treeexpbar> </view_treeexpbar>
</template>
<template slot="right">
<component
v-if="navItem && navItem.navView"
:is="navItem.navView"
:key="navItem.data && navItem.data.length ? navItem.data[0].srfkey : ''"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(navItem.srfnavdata.context)"
:viewparam="JSON.stringify(navItem.srfnavdata.viewparams)">
</component>
</template>
</split>
</div> </div>
</card> </card>
</div> </div>
...@@ -714,6 +728,48 @@ export default class IBIZSample0003F2TreeExpViewBase extends Vue { ...@@ -714,6 +728,48 @@ export default class IBIZSample0003F2TreeExpViewBase extends Vue {
*/ */
public viewUID: string = 'sample-ibizsample0003-f2-tree-exp-view'; public viewUID: string = 'sample-ibizsample0003-f2-tree-exp-view';
/**
* 分隔值
*
* @type {number}
* @memberof IBIZSample0003F2TreeExpViewBase
*/
public split: number = 0.5;
/**
* 导航项
*
* @type {*}
* @memberof IBIZSample0003F2TreeExpViewBase
*/
public navItem: any = {};
/**
* split值变化事件
*
* @memberof IBIZSample0003F2TreeExpViewBase
*/
public onSplitChange() {
if (this.split) {
this.$store.commit("setViewSplit", { viewUID: this.viewUID, viewSplit: this.split });
}
}
/**
* 初始化分隔值
*
* @memberof IBIZSample0003F2TreeExpViewBase
*/
public initSplit() {
if (this.$store.getters.getViewSplit(this.viewUID)) {
this.split = this.$store.getters.getViewSplit(this.viewUID);
} else {
const containerWidth = (this.$el as any).offsetWidth;
this.split = 0 / containerWidth;
this.$store.commit("setViewSplit", { viewUID: this.viewUID, viewSplit: this.split });
}
}
} }
</script> </script>
......
...@@ -4,10 +4,11 @@ ...@@ -4,10 +4,11 @@
<div class='view-container detreeexpview ibizsample0003-f3-tree-exp-view'> <div class='view-container detreeexpview ibizsample0003-f3-tree-exp-view'>
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizsample0003f3treeexpview"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizsample0003f3treeexpview"></app-studioaction>
<card class='view-card view-no-caption view-no-toolbar' :dis-hover="true" :bordered="false"> <card class='view-card view-no-caption view-no-toolbar' :dis-hover="true" :bordered="false">
<div class='view-top-messages'> <div class='view-top-messages'>
<app-alert-group position='TOP' :context="context" :viewparam="viewparams" infoGroup='VMGroup56' viewname='ibizsample0003f3treeexpview'></app-alert-group> </div> <app-alert-group position='TOP' :context="context" :viewparam="viewparams" infoGroup='VMGroup56' viewname='ibizsample0003f3treeexpview'></app-alert-group> </div>
<div class='content-container'> <div class='content-container'>
<split v-model="split" mode="horizontal" @on-move-end="onSplitChange">
<template slot="left">
<view_treeexpbar <view_treeexpbar
:viewState="viewState" :viewState="viewState"
:viewparams="viewparams" :viewparams="viewparams"
...@@ -22,6 +23,19 @@ ...@@ -22,6 +23,19 @@
@activated="treeexpbar_activated($event)" @activated="treeexpbar_activated($event)"
@closeview="closeView($event)"> @closeview="closeView($event)">
</view_treeexpbar> </view_treeexpbar>
</template>
<template slot="right">
<component
v-if="navItem && navItem.navView"
:is="navItem.navView"
:key="navItem.data && navItem.data.length ? navItem.data[0].srfkey : ''"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(navItem.srfnavdata.context)"
:viewparam="JSON.stringify(navItem.srfnavdata.viewparams)">
</component>
</template>
</split>
</div> </div>
</card> </card>
</div> </div>
...@@ -714,6 +728,48 @@ export default class IBIZSample0003F3TreeExpViewBase extends Vue { ...@@ -714,6 +728,48 @@ export default class IBIZSample0003F3TreeExpViewBase extends Vue {
*/ */
public viewUID: string = 'sample-ibizsample0003-f3-tree-exp-view'; public viewUID: string = 'sample-ibizsample0003-f3-tree-exp-view';
/**
* 分隔值
*
* @type {number}
* @memberof IBIZSample0003F3TreeExpViewBase
*/
public split: number = 0.5;
/**
* 导航项
*
* @type {*}
* @memberof IBIZSample0003F3TreeExpViewBase
*/
public navItem: any = {};
/**
* split值变化事件
*
* @memberof IBIZSample0003F3TreeExpViewBase
*/
public onSplitChange() {
if (this.split) {
this.$store.commit("setViewSplit", { viewUID: this.viewUID, viewSplit: this.split });
}
}
/**
* 初始化分隔值
*
* @memberof IBIZSample0003F3TreeExpViewBase
*/
public initSplit() {
if (this.$store.getters.getViewSplit(this.viewUID)) {
this.split = this.$store.getters.getViewSplit(this.viewUID);
} else {
const containerWidth = (this.$el as any).offsetWidth;
this.split = 0 / containerWidth;
this.$store.commit("setViewSplit", { viewUID: this.viewUID, viewSplit: this.split });
}
}
} }
</script> </script>
......
...@@ -4,10 +4,11 @@ ...@@ -4,10 +4,11 @@
<div class='view-container detreeexpview ibizsample0003-f4-tree-exp-view'> <div class='view-container detreeexpview ibizsample0003-f4-tree-exp-view'>
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizsample0003f4treeexpview"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizsample0003f4treeexpview"></app-studioaction>
<card class='view-card view-no-caption view-no-toolbar' :dis-hover="true" :bordered="false"> <card class='view-card view-no-caption view-no-toolbar' :dis-hover="true" :bordered="false">
<div class='view-top-messages'> <div class='view-top-messages'>
<app-alert-group position='TOP' :context="context" :viewparam="viewparams" infoGroup='VMGroup57' viewname='ibizsample0003f4treeexpview'></app-alert-group> </div> <app-alert-group position='TOP' :context="context" :viewparam="viewparams" infoGroup='VMGroup57' viewname='ibizsample0003f4treeexpview'></app-alert-group> </div>
<div class='content-container'> <div class='content-container'>
<split v-model="split" mode="horizontal" @on-move-end="onSplitChange">
<template slot="left">
<view_treeexpbar <view_treeexpbar
:viewState="viewState" :viewState="viewState"
:viewparams="viewparams" :viewparams="viewparams"
...@@ -22,6 +23,19 @@ ...@@ -22,6 +23,19 @@
@activated="treeexpbar_activated($event)" @activated="treeexpbar_activated($event)"
@closeview="closeView($event)"> @closeview="closeView($event)">
</view_treeexpbar> </view_treeexpbar>
</template>
<template slot="right">
<component
v-if="navItem && navItem.navView"
:is="navItem.navView"
:key="navItem.data && navItem.data.length ? navItem.data[0].srfkey : ''"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(navItem.srfnavdata.context)"
:viewparam="JSON.stringify(navItem.srfnavdata.viewparams)">
</component>
</template>
</split>
</div> </div>
</card> </card>
</div> </div>
...@@ -714,6 +728,48 @@ export default class IBIZSample0003F4TreeExpViewBase extends Vue { ...@@ -714,6 +728,48 @@ export default class IBIZSample0003F4TreeExpViewBase extends Vue {
*/ */
public viewUID: string = 'sample-ibizsample0003-f4-tree-exp-view'; public viewUID: string = 'sample-ibizsample0003-f4-tree-exp-view';
/**
* 分隔值
*
* @type {number}
* @memberof IBIZSample0003F4TreeExpViewBase
*/
public split: number = 0.5;
/**
* 导航项
*
* @type {*}
* @memberof IBIZSample0003F4TreeExpViewBase
*/
public navItem: any = {};
/**
* split值变化事件
*
* @memberof IBIZSample0003F4TreeExpViewBase
*/
public onSplitChange() {
if (this.split) {
this.$store.commit("setViewSplit", { viewUID: this.viewUID, viewSplit: this.split });
}
}
/**
* 初始化分隔值
*
* @memberof IBIZSample0003F4TreeExpViewBase
*/
public initSplit() {
if (this.$store.getters.getViewSplit(this.viewUID)) {
this.split = this.$store.getters.getViewSplit(this.viewUID);
} else {
const containerWidth = (this.$el as any).offsetWidth;
this.split = 0 / containerWidth;
this.$store.commit("setViewSplit", { viewUID: this.viewUID, viewSplit: this.split });
}
}
} }
</script> </script>
......
<template> <template>
<split id="dataviewexpviewdataviewexpbar" class="app-dataview-exp-bar" v-model="split" mode="horizontal" @on-move-end="onSplitChange"> <div id="dataviewexpviewdataviewexpbar" class="app-dataview-exp-bar">
<div slot='left'> <div slot='left'>
<div class='dataview-exp-bar-header'> <div class='dataview-exp-bar-header'>
<div class="dataview-exp-bar-title"> <div class="dataview-exp-bar-title">
<icon type='ios-home-outline'/>{{ $t('app.dataViewExpBar.title') }} <icon type='ios-home-outline'/>{{ $t('app.dataViewExpBar.title') }}
</div> </div>
</div> </div>
<div class="container-header"> <div class="exp-bar-action-container">
</div>
</div> </div>
<div class='dataview-exp-bar-content'> <div class='dataview-exp-bar-content'>
<view_dataviewexpbar_dataview <view_dataviewexpbar_dataview
...@@ -30,17 +31,6 @@ ...@@ -30,17 +31,6 @@
</view_dataviewexpbar_dataview> </view_dataviewexpbar_dataview>
</div> </div>
</div> </div>
<div slot='right'>
<component
v-if="selection.view && !Object.is(this.selection.view.viewname, '')"
:is="selection.view.viewname"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)">
</component>
</div>
</split>
</template> </template>
...@@ -243,31 +233,6 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co ...@@ -243,31 +233,6 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co
public isSingleSelect:boolean = true; public isSingleSelect:boolean = true;
/**
* 呈现模式,可选值:horizontal或者vertical
*
* @public
* @type {(string)}
* @memberof DataViewExpViewdataviewexpbarBase
*/
public showMode:string ="horizontal";
/**
* 控件宽度
*
* @type {number}
* @memberof DataViewExpViewdataviewexpbarBase
*/
public ctrlWidth:number = 0;
/**
* 控件高度
*
* @type {number}
* @memberof DataViewExpViewdataviewexpbarBase
*/
public ctrlHeight: number = 0;
/** /**
* 可搜索字段名称 * 可搜索字段名称
* *
...@@ -275,7 +240,7 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co ...@@ -275,7 +240,7 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co
* @type {(string)} * @type {(string)}
* @memberof DataViewExpViewdataviewexpbarBase * @memberof DataViewExpViewdataviewexpbarBase
*/ */
public placeholder="图书名称"; public placeholder = "图书名称";
/** /**
* 搜素值 * 搜素值
...@@ -284,15 +249,7 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co ...@@ -284,15 +249,7 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co
* @type {(string)} * @type {(string)}
* @memberof DataViewExpViewdataviewexpbarBase * @memberof DataViewExpViewdataviewexpbarBase
*/ */
public searchText:string = ""; public searchText: string = "";
/**
* 分割宽度
*
* @type {number}
* @memberof DataViewExpViewdataviewexpbarBase
*/
public split: number = 0.5;
/** /**
...@@ -372,25 +329,6 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co ...@@ -372,25 +329,6 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co
return null; return null;
} }
/**
* 选中数据
*
* @type {*}
* @memberof DataViewExpViewdataviewexpbarBase
*/
public selection: any = {};
/**
* split值变化事件
*
* @memberof DataViewExpViewdataviewexpbarBase
*/
public onSplitChange() {
if(this.split){
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/** /**
* Vue声明周期(组件初始化完毕) * Vue声明周期(组件初始化完毕)
* *
...@@ -430,24 +368,7 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co ...@@ -430,24 +368,7 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co
* *
* @memberof DataViewExpViewdataviewexpbarBase * @memberof DataViewExpViewdataviewexpbarBase
*/ */
public afterMounted(){ public afterMounted() { }
if(this.$store.getters.getViewSplit(this.viewUID)){
this.split = this.$store.getters.getViewSplit(this.viewUID);
}else{
let containerWidth:number = (document.getElementById("dataviewexpviewdataviewexpbar") as any).offsetWidth;
let containerHeight:number = (document.getElementById("dataviewexpviewdataviewexpbar") as any).offsetHeight;
if(Object.is(this.showMode,'horizontal')){
if(this.ctrlWidth && containerWidth != 0){
this.split = this.ctrlWidth/containerWidth;
}
}else{
if(this.ctrlHeight && containerHeight != 0){
this.split = this.ctrlHeight/containerHeight;
}
}
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/** /**
* vue 生命周期 * vue 生命周期
...@@ -517,10 +438,16 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co ...@@ -517,10 +438,16 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co
let _params:any = this.$util.computedNavData(arg,tempContext,tempViewParam,this.navigateParams); let _params:any = this.$util.computedNavData(arg,tempContext,tempViewParam,this.navigateParams);
Object.assign(tempViewParam,_params); Object.assign(tempViewParam,_params);
} }
this.selection = {}; const navItem: any = {
Object.assign(this.selection, { view: { viewname: this.navViewName },context:tempContext,viewparam:tempViewParam}); navView: this.navViewName,
data: args,
srfnavdata: {
context: tempContext,
viewparams: tempViewParam
}
}
this.calcToolbarItemState(false); this.calcToolbarItemState(false);
this.$forceUpdate(); this.$emit('selectionchange', navItem);
} }
/** /**
......
.app-dataview-exp-bar { .app-dataview-exp-bar {
> .ivu-split-horizontal {
> .ivu-split-trigger-con {
height: 100%; height: 100%;
width: 1px;
}
> .ivu-split-pane {
> div {
height: 100%;
overflow: auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.dataview-exp-bar-header { .dataview-exp-bar-header {
...@@ -22,66 +14,9 @@ ...@@ -22,66 +14,9 @@
} }
} }
} }
.container-header{ .exp-bar-action-container {
display: flex; display: flex;
justify-content: flex-start;
align-items: center; align-items: center;
flex-wrap: wrap;
.quick-group-container {
padding-top: 8px;
padding-right: 20px;
}
.search-container {
width: 30%;
height: 48px;
padding: 10px 10px 10px 0;
min-width: 200px;
max-width: 400px;
}
.toolbar-container{
padding: 4px;
display: flex;
flex-wrap: wrap;
align-items: center;
}
}
.dataview-exp-bar-content {
height: calc(100% - 40px);
overflow: auto;
padding: 16px 0;
margin-bottom: 10px;
}
.dataview-exp-bar-content2 {
height: 100%;
overflow: auto;
flex-grow: 1;
}
}
}
> .right-pane.ivu-split-pane {
> div {
padding-left: 10px;
}
}
> .left-pane.ivu-split-pane {
padding-right: 10px;
}
}
> .ivu-split-vertical{
> .ivu-split-pane {
> div {
height: 100%;
.dataview-exp-bar-header {
line-height: 50px;
border-bottom: 1px solid #ddd;
.dataview-exp-bar-title {
font-size: 18px;
padding-left: 8px;
i {
font-size: 20px;
margin-top: -2px;
}
}
} }
.container-header{ .container-header{
display: flex; display: flex;
...@@ -98,31 +33,14 @@ ...@@ -98,31 +33,14 @@
.toolbar-container{ .toolbar-container{
padding: 4px; padding: 4px;
} }
.quick-group-container{ .quick-group-container {
padding-top: 8px; padding-top: 8px;
padding-right: 20px; padding-right: 20px;
} }
} }
.dataview-exp-bar-content { .dataview-exp-bar-content {
height: calc(100% - 40px);
overflow: auto;
margin-bottom: 10px;
}
.dataview-exp-bar-content2 {
height: 100%;
overflow: auto;
flex-grow: 1; flex-grow: 1;
} overflow: auto;
}
}
> .top-pane.ivu-split-pane {
> div {
padding-bottom: 10px;
}
}
> .bottom-pane.ivu-split-pane {
padding-top: 10px;
}
} }
} }
......
...@@ -663,7 +663,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -663,7 +663,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/ */
public load(opt: any = {}): void { public load(opt: any = {}): void {
if(!this.loadAction){ if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr5GridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr9GridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return; return;
} }
const arg: any = { ...opt }; const arg: any = { ...opt };
...@@ -699,7 +699,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -699,7 +699,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/ */
public loadDraft(opt: any = {},mode?:string): void { public loadDraft(opt: any = {},mode?:string): void {
if(!this.loaddraftAction){ if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr5GridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr9GridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return; return;
} }
const arg: any = { ...opt } ; const arg: any = { ...opt } ;
......
...@@ -621,7 +621,7 @@ export default class QUICKSEARCHFORMBase extends Vue implements ControlInterface ...@@ -621,7 +621,7 @@ export default class QUICKSEARCHFORMBase extends Vue implements ControlInterface
*/ */
public load(opt: any = {}): void { public load(opt: any = {}): void {
if(!this.loadAction){ if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKListView' + (this.$t('app.searchForm.notConfig.loadAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKCalendarView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return; return;
} }
const arg: any = { ...opt }; const arg: any = { ...opt };
...@@ -657,7 +657,7 @@ export default class QUICKSEARCHFORMBase extends Vue implements ControlInterface ...@@ -657,7 +657,7 @@ export default class QUICKSEARCHFORMBase extends Vue implements ControlInterface
*/ */
public loadDraft(opt: any = {},mode?:string): void { public loadDraft(opt: any = {},mode?:string): void {
if(!this.loaddraftAction){ if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKListView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKCalendarView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return; return;
} }
const arg: any = { ...opt } ; const arg: any = { ...opt } ;
......
<template> <template>
<split id="calendarexpviewcalendarexpbar" class="app-calendar-exp-bar" v-model="split" mode="horizontal" @on-move-end="onSplitChange"> <div id="calendarexpviewcalendarexpbar" class="app-calendar-exp-bar">
<div slot='left'>
<div class='calendar-exp-bar-header'> <div class='calendar-exp-bar-header'>
<div class="calendar-exp-bar-title"> <div class="calendar-exp-bar-title">
<icon type='ios-home-outline'/>{{ $t('app.calendarExpBar.title') }} <icon type='ios-home-outline'/>{{ $t('app.calendarExpBar.title') }}
</div> </div>
</div> </div>
<div class="container-header"> <div class="exp-bar-action-container">
<div class='search-container'> <div class='search-container'>
<i-input :search="true" <i-input
@on-change="($event) => { this.searchText = $event.target.value; }" v-model="searchText"
:search="true"
:placeholder="placeholder" :placeholder="placeholder"
@on-search="onSearch"> @on-search="onSearch">
</i-input> </i-input>
...@@ -41,17 +41,6 @@ ...@@ -41,17 +41,6 @@
</view_calendarexpbar_calendar> </view_calendarexpbar_calendar>
</div> </div>
</div> </div>
<div slot='right'>
<component
v-if="selection.view && !Object.is(this.selection.view.viewname, '')"
:is="selection.view.viewname"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)">
</component>
</div>
</split>
</template> </template>
...@@ -318,31 +307,6 @@ export default class CalendarExpViewcalendarexpbarBase extends Vue implements Co ...@@ -318,31 +307,6 @@ export default class CalendarExpViewcalendarexpbarBase extends Vue implements Co
*/ */
public isSingleSelect:boolean = true; public isSingleSelect:boolean = true;
/**
* 呈现模式,可选值:horizontal或者vertical
*
* @public
* @type {(string)}
* @memberof CalendarExpViewcalendarexpbarBase
*/
public showMode:string ="horizontal";
/**
* 控件宽度
*
* @type {number}
* @memberof CalendarExpViewcalendarexpbarBase
*/
public ctrlWidth:number = 0;
/**
* 控件高度
*
* @type {number}
* @memberof CalendarExpViewcalendarexpbarBase
*/
public ctrlHeight: number = 0;
/** /**
* 可搜索字段名称 * 可搜索字段名称
* *
...@@ -350,7 +314,7 @@ export default class CalendarExpViewcalendarexpbarBase extends Vue implements Co ...@@ -350,7 +314,7 @@ export default class CalendarExpViewcalendarexpbarBase extends Vue implements Co
* @type {(string)} * @type {(string)}
* @memberof CalendarExpViewcalendarexpbarBase * @memberof CalendarExpViewcalendarexpbarBase
*/ */
public placeholder="订单名称"; public placeholder = "订单名称";
/** /**
* 搜素值 * 搜素值
...@@ -359,15 +323,7 @@ export default class CalendarExpViewcalendarexpbarBase extends Vue implements Co ...@@ -359,15 +323,7 @@ export default class CalendarExpViewcalendarexpbarBase extends Vue implements Co
* @type {(string)} * @type {(string)}
* @memberof CalendarExpViewcalendarexpbarBase * @memberof CalendarExpViewcalendarexpbarBase
*/ */
public searchText:string = ""; public searchText: string = "";
/**
* 分割宽度
*
* @type {number}
* @memberof CalendarExpViewcalendarexpbarBase
*/
public split: number = 0.5;
/** /**
...@@ -454,33 +410,6 @@ export default class CalendarExpViewcalendarexpbarBase extends Vue implements Co ...@@ -454,33 +410,6 @@ export default class CalendarExpViewcalendarexpbarBase extends Vue implements Co
return null; return null;
} }
/**
* 选中数据
*
* @type {*}
* @memberof CalendarExpViewcalendarexpbarBase
*/
public selection: any = {};
/**
* split值变化事件
*
* @memberof CalendarExpViewcalendarexpbarBase
*/
public onSplitChange() {
if(this.$refs.calendarexpbar_calendar){
const calendarContainer:any = this.$refs.calendarexpbar_calendar;
if(calendarContainer.$refs.calendar){
const appCalendar: any = calendarContainer.$refs.calendar;
const api = appCalendar.getApi();
api.updateSize();
}
}
if(this.split){
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/** /**
* Vue声明周期(组件初始化完毕) * Vue声明周期(组件初始化完毕)
* *
...@@ -520,24 +449,7 @@ export default class CalendarExpViewcalendarexpbarBase extends Vue implements Co ...@@ -520,24 +449,7 @@ export default class CalendarExpViewcalendarexpbarBase extends Vue implements Co
* *
* @memberof CalendarExpViewcalendarexpbarBase * @memberof CalendarExpViewcalendarexpbarBase
*/ */
public afterMounted(){ public afterMounted() { }
if(this.$store.getters.getViewSplit(this.viewUID)){
this.split = this.$store.getters.getViewSplit(this.viewUID);
}else{
let containerWidth:number = (document.getElementById("calendarexpviewcalendarexpbar") as any).offsetWidth;
let containerHeight:number = (document.getElementById("calendarexpviewcalendarexpbar") as any).offsetHeight;
if(Object.is(this.showMode,'horizontal')){
if(this.ctrlWidth && containerWidth != 0){
this.split = this.ctrlWidth/containerWidth;
}
}else{
if(this.ctrlHeight && containerHeight != 0){
this.split = this.ctrlHeight/containerHeight;
}
}
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/** /**
* vue 生命周期 * vue 生命周期
...@@ -607,11 +519,16 @@ export default class CalendarExpViewcalendarexpbarBase extends Vue implements Co ...@@ -607,11 +519,16 @@ export default class CalendarExpViewcalendarexpbarBase extends Vue implements Co
} }
break; break;
} }
this.selection = {}; const navItem: any = {
Object.assign(this.selection, { view: { viewname: this.navViewName[arg.itemType] }, context:tempContext,viewparam:tempViewParam }); navView: this.navViewName,
data: args,
srfnavdata: {
context: tempContext,
viewparams: tempViewParam
}
}
this.calcToolbarItemState(false); this.calcToolbarItemState(false);
this.$emit('selectionchange',args); this.$emit('selectionchange', navItem);
this.$forceUpdate();
} }
/** /**
......
.app-calendar-exp-bar { .app-calendar-exp-bar {
> .ivu-split-horizontal {
> .ivu-split-trigger-con {
height: 100%; height: 100%;
width: 1px;
}
> .ivu-split-pane {
> div {
height: 100%;
overflow: auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.calendar-exp-bar-header { .calendar-exp-bar-header {
...@@ -22,79 +14,15 @@ ...@@ -22,79 +14,15 @@
} }
} }
} }
.container-header{ .exp-bar-action-container {
display: flex; display: flex;
justify-content: flex-start;
align-items: center; align-items: center;
flex-wrap: wrap;
.quick-group-container {
padding-top: 8px;
padding-right: 20px;
}
.search-container {
width: 30%;
height: 48px;
padding: 10px;
min-width: 200px;
max-width: 400px;
}
.toolbar-container{
padding: 4px;
display: flex;
flex-wrap: wrap;
align-items: center;
}
}
.calendar-exp-bar-content {
height: calc(100% - 88px);
overflow: auto;
padding: 16px 0;
margin-bottom: 10px;
}
.calendar-exp-bar-content2 {
height: 100%;
overflow: auto;
flex-grow: 1;
}
}
}
> .right-pane.ivu-split-pane {
> div {
padding-left: 10px;
}
}
> .left-pane.ivu-split-pane {
padding-right: 10px;
}
}
> .ivu-split-vertical{
> .ivu-split-pane {
> div {
height: 100%;
overflow: auto;
display: flex;
flex-direction: column;
.calendar-exp-bar-header {
line-height: 50px;
border-bottom: 1px solid #ddd;
.calendar-exp-bar-title {
font-size: 18px;
padding-left: 8px;
i {
font-size: 20px;
margin-top: -2px;
}
}
} }
.container-header{ .container-header{
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
.quick-group-container {
padding-top: 8px;
padding-right: 20px;
}
.search-container { .search-container {
width: 30%; width: 30%;
height: 48px; height: 48px;
...@@ -105,27 +33,14 @@ ...@@ -105,27 +33,14 @@
.toolbar-container{ .toolbar-container{
padding: 4px; padding: 4px;
} }
.quick-group-container {
padding-top: 8px;
padding-right: 20px;
} }
.calendar-exp-bar-content {
height: calc(100% - 88px);
overflow: auto;
margin-bottom: 10px;
} }
.calendar-exp-bar-content2 { .calendar-exp-bar-content {
height: 100%;
overflow: auto;
flex-grow: 1; flex-grow: 1;
} overflow: auto;
}
}
> .top-pane.ivu-split-pane {
> div {
padding-bottom: 10px;
}
}
> .bottom-pane.ivu-split-pane {
padding-top: 10px;
}
} }
} }
......
<template> <template>
<split id="dataviewexpviewdataviewexpbar" class="app-dataview-exp-bar" v-model="split" mode="horizontal" @on-move-end="onSplitChange"> <div id="dataviewexpviewdataviewexpbar" class="app-dataview-exp-bar">
<div slot='left'> <div slot='left'>
<div class='dataview-exp-bar-header'> <div class='dataview-exp-bar-header'>
<div class="dataview-exp-bar-title"> <div class="dataview-exp-bar-title">
<icon type='ios-home-outline'/>{{ $t('app.dataViewExpBar.title') }} <icon type='ios-home-outline'/>{{ $t('app.dataViewExpBar.title') }}
</div> </div>
</div> </div>
<div class="container-header"> <div class="exp-bar-action-container">
<div class='search-container'> <div class='search-container'>
<i-input :search="true" <i-input
@on-change="($event) => { this.searchText = $event.target.value; }" v-model="searchText"
:search="true"
:placeholder="placeholder" :placeholder="placeholder"
@on-search="onSearch"> @on-search="onSearch">
</i-input> </i-input>
...@@ -24,6 +25,7 @@ ...@@ -24,6 +25,7 @@
</tooltip> </tooltip>
</div> </div>
</div> </div>
</div>
<div class='dataview-exp-bar-content'> <div class='dataview-exp-bar-content'>
<view_dataviewexpbar_dataview <view_dataviewexpbar_dataview
:viewState="viewState" :viewState="viewState"
...@@ -46,17 +48,6 @@ ...@@ -46,17 +48,6 @@
</view_dataviewexpbar_dataview> </view_dataviewexpbar_dataview>
</div> </div>
</div> </div>
<div slot='right'>
<component
v-if="selection.view && !Object.is(this.selection.view.viewname, '')"
:is="selection.view.viewname"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)">
</component>
</div>
</split>
</template> </template>
...@@ -326,31 +317,6 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co ...@@ -326,31 +317,6 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co
public isSingleSelect:boolean = true; public isSingleSelect:boolean = true;
/**
* 呈现模式,可选值:horizontal或者vertical
*
* @public
* @type {(string)}
* @memberof DataViewExpViewdataviewexpbarBase
*/
public showMode:string ="horizontal";
/**
* 控件宽度
*
* @type {number}
* @memberof DataViewExpViewdataviewexpbarBase
*/
public ctrlWidth:number = 0;
/**
* 控件高度
*
* @type {number}
* @memberof DataViewExpViewdataviewexpbarBase
*/
public ctrlHeight: number = 0;
/** /**
* 可搜索字段名称 * 可搜索字段名称
* *
...@@ -358,7 +324,7 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co ...@@ -358,7 +324,7 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co
* @type {(string)} * @type {(string)}
* @memberof DataViewExpViewdataviewexpbarBase * @memberof DataViewExpViewdataviewexpbarBase
*/ */
public placeholder="订单名称"; public placeholder = "订单名称";
/** /**
* 搜素值 * 搜素值
...@@ -367,15 +333,7 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co ...@@ -367,15 +333,7 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co
* @type {(string)} * @type {(string)}
* @memberof DataViewExpViewdataviewexpbarBase * @memberof DataViewExpViewdataviewexpbarBase
*/ */
public searchText:string = ""; public searchText: string = "";
/**
* 分割宽度
*
* @type {number}
* @memberof DataViewExpViewdataviewexpbarBase
*/
public split: number = 0.5;
/** /**
...@@ -467,25 +425,6 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co ...@@ -467,25 +425,6 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co
return null; return null;
} }
/**
* 选中数据
*
* @type {*}
* @memberof DataViewExpViewdataviewexpbarBase
*/
public selection: any = {};
/**
* split值变化事件
*
* @memberof DataViewExpViewdataviewexpbarBase
*/
public onSplitChange() {
if(this.split){
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/** /**
* Vue声明周期(组件初始化完毕) * Vue声明周期(组件初始化完毕)
* *
...@@ -525,24 +464,7 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co ...@@ -525,24 +464,7 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co
* *
* @memberof DataViewExpViewdataviewexpbarBase * @memberof DataViewExpViewdataviewexpbarBase
*/ */
public afterMounted(){ public afterMounted() { }
if(this.$store.getters.getViewSplit(this.viewUID)){
this.split = this.$store.getters.getViewSplit(this.viewUID);
}else{
let containerWidth:number = (document.getElementById("dataviewexpviewdataviewexpbar") as any).offsetWidth;
let containerHeight:number = (document.getElementById("dataviewexpviewdataviewexpbar") as any).offsetHeight;
if(Object.is(this.showMode,'horizontal')){
if(this.ctrlWidth && containerWidth != 0){
this.split = this.ctrlWidth/containerWidth;
}
}else{
if(this.ctrlHeight && containerHeight != 0){
this.split = this.ctrlHeight/containerHeight;
}
}
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/** /**
* vue 生命周期 * vue 生命周期
...@@ -612,10 +534,16 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co ...@@ -612,10 +534,16 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co
let _params:any = this.$util.computedNavData(arg,tempContext,tempViewParam,this.navigateParams); let _params:any = this.$util.computedNavData(arg,tempContext,tempViewParam,this.navigateParams);
Object.assign(tempViewParam,_params); Object.assign(tempViewParam,_params);
} }
this.selection = {}; const navItem: any = {
Object.assign(this.selection, { view: { viewname: this.navViewName },context:tempContext,viewparam:tempViewParam}); navView: this.navViewName,
data: args,
srfnavdata: {
context: tempContext,
viewparams: tempViewParam
}
}
this.calcToolbarItemState(false); this.calcToolbarItemState(false);
this.$forceUpdate(); this.$emit('selectionchange', navItem);
} }
/** /**
......
.app-dataview-exp-bar { .app-dataview-exp-bar {
> .ivu-split-horizontal {
> .ivu-split-trigger-con {
height: 100%; height: 100%;
width: 1px;
}
> .ivu-split-pane {
> div {
height: 100%;
overflow: auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.dataview-exp-bar-header { .dataview-exp-bar-header {
...@@ -22,66 +14,9 @@ ...@@ -22,66 +14,9 @@
} }
} }
} }
.container-header{ .exp-bar-action-container {
display: flex; display: flex;
justify-content: flex-start;
align-items: center; align-items: center;
flex-wrap: wrap;
.quick-group-container {
padding-top: 8px;
padding-right: 20px;
}
.search-container {
width: 30%;
height: 48px;
padding: 10px 10px 10px 0;
min-width: 200px;
max-width: 400px;
}
.toolbar-container{
padding: 4px;
display: flex;
flex-wrap: wrap;
align-items: center;
}
}
.dataview-exp-bar-content {
height: calc(100% - 88px);
overflow: auto;
padding: 16px 0;
margin-bottom: 10px;
}
.dataview-exp-bar-content2 {
height: 100%;
overflow: auto;
flex-grow: 1;
}
}
}
> .right-pane.ivu-split-pane {
> div {
padding-left: 10px;
}
}
> .left-pane.ivu-split-pane {
padding-right: 10px;
}
}
> .ivu-split-vertical{
> .ivu-split-pane {
> div {
height: 100%;
.dataview-exp-bar-header {
line-height: 50px;
border-bottom: 1px solid #ddd;
.dataview-exp-bar-title {
font-size: 18px;
padding-left: 8px;
i {
font-size: 20px;
margin-top: -2px;
}
}
} }
.container-header{ .container-header{
display: flex; display: flex;
...@@ -98,31 +33,14 @@ ...@@ -98,31 +33,14 @@
.toolbar-container{ .toolbar-container{
padding: 4px; padding: 4px;
} }
.quick-group-container{ .quick-group-container {
padding-top: 8px; padding-top: 8px;
padding-right: 20px; padding-right: 20px;
} }
} }
.dataview-exp-bar-content { .dataview-exp-bar-content {
height: calc(100% - 88px);
overflow: auto;
margin-bottom: 10px;
}
.dataview-exp-bar-content2 {
height: 100%;
overflow: auto;
flex-grow: 1; flex-grow: 1;
} overflow: auto;
}
}
> .top-pane.ivu-split-pane {
> div {
padding-bottom: 10px;
}
}
> .bottom-pane.ivu-split-pane {
padding-top: 10px;
}
} }
} }
......
...@@ -7,8 +7,9 @@ ...@@ -7,8 +7,9 @@
</div> </div>
<div class="exp-bar-action-container"> <div class="exp-bar-action-container">
<div class='search-container'> <div class='search-container'>
<i-input :search="true" <i-input
@on-change="($event) => { this.searchText = $event.target.value; }" v-model="searchText"
:search="true"
:placeholder="placeholder" :placeholder="placeholder"
@on-search="onSearch"> @on-search="onSearch">
</i-input> </i-input>
...@@ -529,7 +530,7 @@ export default class ListExpViewlistexpbarBase extends Vue implements ControlInt ...@@ -529,7 +530,7 @@ export default class ListExpViewlistexpbarBase extends Vue implements ControlInt
} }
if (this.navigateContext && Object.keys(this.navigateContext).length > 0) { if (this.navigateContext && Object.keys(this.navigateContext).length > 0) {
let _context:any = this.$util.computedNavData(arg, tempContext, tempViewParam, this.navigateContext); let _context:any = this.$util.computedNavData(arg, tempContext, tempViewParam, this.navigateContext);
Object.assign(tempContext, _context); Object.assign(tempContext,_context);
} }
if (this.navigateParams && Object.keys(this.navigateParams).length > 0) { if (this.navigateParams && Object.keys(this.navigateParams).length > 0) {
let _params:any = this.$util.computedNavData(arg, tempContext, tempViewParam, this.navigateParams); let _params:any = this.$util.computedNavData(arg, tempContext, tempViewParam, this.navigateParams);
......
<template> <template>
<split id="treeexpviewtreeexpbar" class='app-tree-exp-bar' v-model="split" mode="horizontal" @on-move-end="onSplitChange"> <div id="treeexpviewtreeexpbar" class='app-tree-exp-bar'>
<div slot='left'>
<div class='tree-exp-bar-header'> <div class='tree-exp-bar-header'>
<div class="tree-exp-bar-title"> <div class="tree-exp-bar-title">
<icon type='ios-home-outline'/>{{ $t('app.treeExpBar.title') }} <icon type='ios-home-outline'/>{{ $t('app.treeExpBar.title') }}
...@@ -16,8 +15,9 @@ ...@@ -16,8 +15,9 @@
</div> </div>
</div> </div>
<div class='search-content'> <div class='search-content'>
<i-input :search="true" <i-input
@on-change="($event) => { this.srfnodefilter = $event.target.value; }" v-model="srfnodefilter"
:search="true"
:placeholder="placeholder" :placeholder="placeholder"
@on-search="onSearch"> @on-search="onSearch">
</i-input> </i-input>
...@@ -42,22 +42,6 @@ ...@@ -42,22 +42,6 @@
</view_treeexpbar_tree> </view_treeexpbar_tree>
</div> </div>
</div> </div>
<div slot='right'>
<component
v-if="selection.view && !Object.is(this.selection.view.viewname, '')"
:is="selection.view.viewname"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)"
@viewdataschange="onViewDatasChange"
@drdatasaved="onDrViewDatasChange"
@drdatasremove="onDrViewDatasChange"
@viewdatasactivated="viewDatasActivated"
@viewload="onViewLoad">
</component>
</div>
</split>
</template> </template>
<script lang='tsx'> <script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch, Model,Inject } from 'vue-property-decorator'; import { Vue, Component, Prop, Provide, Emit, Watch, Model,Inject } from 'vue-property-decorator';
...@@ -333,22 +317,6 @@ export default class TreeExpViewtreeexpbarBase extends Vue implements ControlInt ...@@ -333,22 +317,6 @@ export default class TreeExpViewtreeexpbarBase extends Vue implements ControlInt
return {}; return {};
} }
/**
* 选中数据
*
* @type {*}
* @memberof TreeExpViewtreeexpbarBase
*/
public selection: any = {};
/**
* 控件宽度
*
* @type {number}
* @memberof TreeExpViewtreeexpbarBase
*/
public ctrlWidth:number = 500;
/** /**
* 可搜索字段名称 * 可搜索字段名称
* *
...@@ -356,7 +324,7 @@ export default class TreeExpViewtreeexpbarBase extends Vue implements ControlInt ...@@ -356,7 +324,7 @@ export default class TreeExpViewtreeexpbarBase extends Vue implements ControlInt
* @type {(string)} * @type {(string)}
* @memberof TreeExpViewtreeexpbarBase * @memberof TreeExpViewtreeexpbarBase
*/ */
public placeholder="订单名称"; public placeholder = "订单名称";
/** /**
* 过滤值 * 过滤值
...@@ -384,25 +352,6 @@ export default class TreeExpViewtreeexpbarBase extends Vue implements ControlInt ...@@ -384,25 +352,6 @@ export default class TreeExpViewtreeexpbarBase extends Vue implements ControlInt
*/ */
public istLoadDefaultRefView: boolean = false; public istLoadDefaultRefView: boolean = false;
/**
* 分割宽度
*
* @type {number}
* @memberof TreeExpViewtreeexpbarBase
*/
public split: number = 0.2;
/**
* split值变化事件
*
* @memberof TreeExpViewtreeexpbarBase
*/
public onSplitChange() {
if(this.split){
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/** /**
* 获取关系项视图 * 获取关系项视图
* *
...@@ -502,11 +451,16 @@ export default class TreeExpViewtreeexpbarBase extends Vue implements ControlInt ...@@ -502,11 +451,16 @@ export default class TreeExpViewtreeexpbarBase extends Vue implements ControlInt
this.counter += 1; this.counter += 1;
Object.assign(tempContext,{srfcounter:this.counter}); Object.assign(tempContext,{srfcounter:this.counter});
} }
this.selection = {}; const navItem: any = {
Object.assign(this.selection, { view: { viewname: refview.viewname } }); navView: this.navViewName,
Object.assign(this.selection,{'viewparam':tempViewparam,'context':tempContext}); data: args,
srfnavdata: {
context: tempContext,
viewparams: tempViewParam
}
}
this.calcToolbarItemState(false); this.calcToolbarItemState(false);
this.$forceUpdate(); this.$emit('selectionchange', navItem);
} }
/** /**
...@@ -550,7 +504,7 @@ export default class TreeExpViewtreeexpbarBase extends Vue implements ControlInt ...@@ -550,7 +504,7 @@ export default class TreeExpViewtreeexpbarBase extends Vue implements ControlInt
* *
* @memberof TreeExpViewtreeexpbarBase * @memberof TreeExpViewtreeexpbarBase
*/ */
public afterCreated(){ public afterCreated() {
if (this.viewState) { if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => { this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) { if (!Object.is(tag, this.name)) {
...@@ -576,17 +530,7 @@ export default class TreeExpViewtreeexpbarBase extends Vue implements ControlInt ...@@ -576,17 +530,7 @@ export default class TreeExpViewtreeexpbarBase extends Vue implements ControlInt
* *
* @memberof TreeExpViewtreeexpbarBase * @memberof TreeExpViewtreeexpbarBase
*/ */
public afterMounted(){ public afterMounted() { }
if(this.$store.getters.getViewSplit(this.viewUID)){
this.split = this.$store.getters.getViewSplit(this.viewUID);
}else{
let containerWidth:number = (document.getElementById("treeexpviewtreeexpbar") as any).offsetWidth;
if(this.ctrlWidth && containerWidth != 0){
this.split = this.ctrlWidth/containerWidth;
}
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/** /**
......
<template> <template>
<split id="usr2calendarexpviewcalendarexpbar" class="app-calendar-exp-bar" v-model="split" mode="horizontal" @on-move-end="onSplitChange"> <div id="usr2calendarexpviewcalendarexpbar" class="app-calendar-exp-bar">
<div slot='left'>
<div class='calendar-exp-bar-header'> <div class='calendar-exp-bar-header'>
<div class="calendar-exp-bar-title"> <div class="calendar-exp-bar-title">
<icon type='ios-home-outline'/>{{ $t('app.calendarExpBar.title') }} <icon type='ios-home-outline'/>{{ $t('app.calendarExpBar.title') }}
</div> </div>
</div> </div>
<div class="container-header"> <div class="exp-bar-action-container">
<div class='search-container'> <div class='search-container'>
<i-input :search="true" <i-input
@on-change="($event) => { this.searchText = $event.target.value; }" v-model="searchText"
:search="true"
:placeholder="placeholder" :placeholder="placeholder"
@on-search="onSearch"> @on-search="onSearch">
</i-input> </i-input>
...@@ -41,17 +41,6 @@ ...@@ -41,17 +41,6 @@
</view_calendarexpbar_calendar> </view_calendarexpbar_calendar>
</div> </div>
</div> </div>
<div slot='right'>
<component
v-if="selection.view && !Object.is(this.selection.view.viewname, '')"
:is="selection.view.viewname"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)">
</component>
</div>
</split>
</template> </template>
...@@ -318,31 +307,6 @@ export default class Usr2CalendarExpViewcalendarexpbarBase extends Vue implement ...@@ -318,31 +307,6 @@ export default class Usr2CalendarExpViewcalendarexpbarBase extends Vue implement
*/ */
public isSingleSelect:boolean = true; public isSingleSelect:boolean = true;
/**
* 呈现模式,可选值:horizontal或者vertical
*
* @public
* @type {(string)}
* @memberof Usr2CalendarExpViewcalendarexpbarBase
*/
public showMode:string ="horizontal";
/**
* 控件宽度
*
* @type {number}
* @memberof Usr2CalendarExpViewcalendarexpbarBase
*/
public ctrlWidth:number = 0;
/**
* 控件高度
*
* @type {number}
* @memberof Usr2CalendarExpViewcalendarexpbarBase
*/
public ctrlHeight: number = 0;
/** /**
* 可搜索字段名称 * 可搜索字段名称
* *
...@@ -350,7 +314,7 @@ export default class Usr2CalendarExpViewcalendarexpbarBase extends Vue implement ...@@ -350,7 +314,7 @@ export default class Usr2CalendarExpViewcalendarexpbarBase extends Vue implement
* @type {(string)} * @type {(string)}
* @memberof Usr2CalendarExpViewcalendarexpbarBase * @memberof Usr2CalendarExpViewcalendarexpbarBase
*/ */
public placeholder="订单名称"; public placeholder = "订单名称";
/** /**
* 搜素值 * 搜素值
...@@ -359,15 +323,7 @@ export default class Usr2CalendarExpViewcalendarexpbarBase extends Vue implement ...@@ -359,15 +323,7 @@ export default class Usr2CalendarExpViewcalendarexpbarBase extends Vue implement
* @type {(string)} * @type {(string)}
* @memberof Usr2CalendarExpViewcalendarexpbarBase * @memberof Usr2CalendarExpViewcalendarexpbarBase
*/ */
public searchText:string = ""; public searchText: string = "";
/**
* 分割宽度
*
* @type {number}
* @memberof Usr2CalendarExpViewcalendarexpbarBase
*/
public split: number = 0.5;
/** /**
...@@ -454,33 +410,6 @@ export default class Usr2CalendarExpViewcalendarexpbarBase extends Vue implement ...@@ -454,33 +410,6 @@ export default class Usr2CalendarExpViewcalendarexpbarBase extends Vue implement
return null; return null;
} }
/**
* 选中数据
*
* @type {*}
* @memberof Usr2CalendarExpViewcalendarexpbarBase
*/
public selection: any = {};
/**
* split值变化事件
*
* @memberof Usr2CalendarExpViewcalendarexpbarBase
*/
public onSplitChange() {
if(this.$refs.calendarexpbar_calendar){
const calendarContainer:any = this.$refs.calendarexpbar_calendar;
if(calendarContainer.$refs.calendar){
const appCalendar: any = calendarContainer.$refs.calendar;
const api = appCalendar.getApi();
api.updateSize();
}
}
if(this.split){
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/** /**
* Vue声明周期(组件初始化完毕) * Vue声明周期(组件初始化完毕)
* *
...@@ -520,24 +449,7 @@ export default class Usr2CalendarExpViewcalendarexpbarBase extends Vue implement ...@@ -520,24 +449,7 @@ export default class Usr2CalendarExpViewcalendarexpbarBase extends Vue implement
* *
* @memberof Usr2CalendarExpViewcalendarexpbarBase * @memberof Usr2CalendarExpViewcalendarexpbarBase
*/ */
public afterMounted(){ public afterMounted() { }
if(this.$store.getters.getViewSplit(this.viewUID)){
this.split = this.$store.getters.getViewSplit(this.viewUID);
}else{
let containerWidth:number = (document.getElementById("usr2calendarexpviewcalendarexpbar") as any).offsetWidth;
let containerHeight:number = (document.getElementById("usr2calendarexpviewcalendarexpbar") as any).offsetHeight;
if(Object.is(this.showMode,'horizontal')){
if(this.ctrlWidth && containerWidth != 0){
this.split = this.ctrlWidth/containerWidth;
}
}else{
if(this.ctrlHeight && containerHeight != 0){
this.split = this.ctrlHeight/containerHeight;
}
}
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/** /**
* vue 生命周期 * vue 生命周期
...@@ -607,11 +519,16 @@ export default class Usr2CalendarExpViewcalendarexpbarBase extends Vue implement ...@@ -607,11 +519,16 @@ export default class Usr2CalendarExpViewcalendarexpbarBase extends Vue implement
} }
break; break;
} }
this.selection = {}; const navItem: any = {
Object.assign(this.selection, { view: { viewname: this.navViewName[arg.itemType] }, context:tempContext,viewparam:tempViewParam }); navView: this.navViewName,
data: args,
srfnavdata: {
context: tempContext,
viewparams: tempViewParam
}
}
this.calcToolbarItemState(false); this.calcToolbarItemState(false);
this.$emit('selectionchange',args); this.$emit('selectionchange', navItem);
this.$forceUpdate();
} }
/** /**
......
.app-calendar-exp-bar { .app-calendar-exp-bar {
> .ivu-split-horizontal {
> .ivu-split-trigger-con {
height: 100%; height: 100%;
width: 1px;
}
> .ivu-split-pane {
> div {
height: 100%;
overflow: auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.calendar-exp-bar-header { .calendar-exp-bar-header {
...@@ -22,79 +14,15 @@ ...@@ -22,79 +14,15 @@
} }
} }
} }
.container-header{ .exp-bar-action-container {
display: flex; display: flex;
justify-content: flex-start;
align-items: center; align-items: center;
flex-wrap: wrap;
.quick-group-container {
padding-top: 8px;
padding-right: 20px;
}
.search-container {
width: 30%;
height: 48px;
padding: 10px;
min-width: 200px;
max-width: 400px;
}
.toolbar-container{
padding: 4px;
display: flex;
flex-wrap: wrap;
align-items: center;
}
}
.calendar-exp-bar-content {
height: calc(100% - 88px);
overflow: auto;
padding: 16px 0;
margin-bottom: 10px;
}
.calendar-exp-bar-content2 {
height: 100%;
overflow: auto;
flex-grow: 1;
}
}
}
> .right-pane.ivu-split-pane {
> div {
padding-left: 10px;
}
}
> .left-pane.ivu-split-pane {
padding-right: 10px;
}
}
> .ivu-split-vertical{
> .ivu-split-pane {
> div {
height: 100%;
overflow: auto;
display: flex;
flex-direction: column;
.calendar-exp-bar-header {
line-height: 50px;
border-bottom: 1px solid #ddd;
.calendar-exp-bar-title {
font-size: 18px;
padding-left: 8px;
i {
font-size: 20px;
margin-top: -2px;
}
}
} }
.container-header{ .container-header{
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
.quick-group-container {
padding-top: 8px;
padding-right: 20px;
}
.search-container { .search-container {
width: 30%; width: 30%;
height: 48px; height: 48px;
...@@ -105,27 +33,14 @@ ...@@ -105,27 +33,14 @@
.toolbar-container{ .toolbar-container{
padding: 4px; padding: 4px;
} }
.quick-group-container {
padding-top: 8px;
padding-right: 20px;
} }
.calendar-exp-bar-content {
height: calc(100% - 88px);
overflow: auto;
margin-bottom: 10px;
} }
.calendar-exp-bar-content2 { .calendar-exp-bar-content {
height: 100%;
overflow: auto;
flex-grow: 1; flex-grow: 1;
} overflow: auto;
}
}
> .top-pane.ivu-split-pane {
> div {
padding-bottom: 10px;
}
}
> .bottom-pane.ivu-split-pane {
padding-top: 10px;
}
} }
} }
......
<template> <template>
<split id="f1treeexpviewtreeexpbar" class='app-tree-exp-bar' v-model="split" mode="horizontal" @on-move-end="onSplitChange"> <div id="f1treeexpviewtreeexpbar" class='app-tree-exp-bar'>
<div slot='left'>
<div class='tree-exp-bar-header'> <div class='tree-exp-bar-header'>
<div class="tree-exp-bar-title"> <div class="tree-exp-bar-title">
<icon type='ios-home-outline'/>{{ $t('app.treeExpBar.title') }} <icon type='ios-home-outline'/>{{ $t('app.treeExpBar.title') }}
...@@ -26,22 +25,6 @@ ...@@ -26,22 +25,6 @@
</view_treeexpbar_tree> </view_treeexpbar_tree>
</div> </div>
</div> </div>
<div slot='right'>
<component
v-if="selection.view && !Object.is(this.selection.view.viewname, '')"
:is="selection.view.viewname"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)"
@viewdataschange="onViewDatasChange"
@drdatasaved="onDrViewDatasChange"
@drdatasremove="onDrViewDatasChange"
@viewdatasactivated="viewDatasActivated"
@viewload="onViewLoad">
</component>
</div>
</split>
</template> </template>
<script lang='tsx'> <script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch, Model,Inject } from 'vue-property-decorator'; import { Vue, Component, Prop, Provide, Emit, Watch, Model,Inject } from 'vue-property-decorator';
...@@ -250,22 +233,6 @@ export default class F1TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -250,22 +233,6 @@ export default class F1TreeExpViewtreeexpbarBase extends Vue implements ControlI
return {}; return {};
} }
/**
* 选中数据
*
* @type {*}
* @memberof F1TreeExpViewtreeexpbarBase
*/
public selection: any = {};
/**
* 控件宽度
*
* @type {number}
* @memberof F1TreeExpViewtreeexpbarBase
*/
public ctrlWidth:number = 0;
/** /**
* 可搜索字段名称 * 可搜索字段名称
* *
...@@ -273,7 +240,7 @@ export default class F1TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -273,7 +240,7 @@ export default class F1TreeExpViewtreeexpbarBase extends Vue implements ControlI
* @type {(string)} * @type {(string)}
* @memberof F1TreeExpViewtreeexpbarBase * @memberof F1TreeExpViewtreeexpbarBase
*/ */
public placeholder="名称"; public placeholder = "名称";
/** /**
* 过滤值 * 过滤值
...@@ -301,25 +268,6 @@ export default class F1TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -301,25 +268,6 @@ export default class F1TreeExpViewtreeexpbarBase extends Vue implements ControlI
*/ */
public istLoadDefaultRefView: boolean = false; public istLoadDefaultRefView: boolean = false;
/**
* 分割宽度
*
* @type {number}
* @memberof F1TreeExpViewtreeexpbarBase
*/
public split: number = 0.2;
/**
* split值变化事件
*
* @memberof F1TreeExpViewtreeexpbarBase
*/
public onSplitChange() {
if(this.split){
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/** /**
* 获取关系项视图 * 获取关系项视图
* *
...@@ -419,11 +367,16 @@ export default class F1TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -419,11 +367,16 @@ export default class F1TreeExpViewtreeexpbarBase extends Vue implements ControlI
this.counter += 1; this.counter += 1;
Object.assign(tempContext,{srfcounter:this.counter}); Object.assign(tempContext,{srfcounter:this.counter});
} }
this.selection = {}; const navItem: any = {
Object.assign(this.selection, { view: { viewname: refview.viewname } }); navView: this.navViewName,
Object.assign(this.selection,{'viewparam':tempViewparam,'context':tempContext}); data: args,
srfnavdata: {
context: tempContext,
viewparams: tempViewParam
}
}
this.calcToolbarItemState(false); this.calcToolbarItemState(false);
this.$forceUpdate(); this.$emit('selectionchange', navItem);
} }
/** /**
...@@ -467,7 +420,7 @@ export default class F1TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -467,7 +420,7 @@ export default class F1TreeExpViewtreeexpbarBase extends Vue implements ControlI
* *
* @memberof F1TreeExpViewtreeexpbarBase * @memberof F1TreeExpViewtreeexpbarBase
*/ */
public afterCreated(){ public afterCreated() {
if (this.viewState) { if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => { this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) { if (!Object.is(tag, this.name)) {
...@@ -493,17 +446,7 @@ export default class F1TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -493,17 +446,7 @@ export default class F1TreeExpViewtreeexpbarBase extends Vue implements ControlI
* *
* @memberof F1TreeExpViewtreeexpbarBase * @memberof F1TreeExpViewtreeexpbarBase
*/ */
public afterMounted(){ public afterMounted() { }
if(this.$store.getters.getViewSplit(this.viewUID)){
this.split = this.$store.getters.getViewSplit(this.viewUID);
}else{
let containerWidth:number = (document.getElementById("f1treeexpviewtreeexpbar") as any).offsetWidth;
if(this.ctrlWidth && containerWidth != 0){
this.split = this.ctrlWidth/containerWidth;
}
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/** /**
......
<template> <template>
<split id="f2treeexpviewtreeexpbar" class='app-tree-exp-bar' v-model="split" mode="horizontal" @on-move-end="onSplitChange"> <div id="f2treeexpviewtreeexpbar" class='app-tree-exp-bar'>
<div slot='left'>
<div class='tree-exp-bar-header'> <div class='tree-exp-bar-header'>
<div class="tree-exp-bar-title"> <div class="tree-exp-bar-title">
<icon type='ios-home-outline'/>{{ $t('app.treeExpBar.title') }} <icon type='ios-home-outline'/>{{ $t('app.treeExpBar.title') }}
...@@ -26,22 +25,6 @@ ...@@ -26,22 +25,6 @@
</view_treeexpbar_tree> </view_treeexpbar_tree>
</div> </div>
</div> </div>
<div slot='right'>
<component
v-if="selection.view && !Object.is(this.selection.view.viewname, '')"
:is="selection.view.viewname"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)"
@viewdataschange="onViewDatasChange"
@drdatasaved="onDrViewDatasChange"
@drdatasremove="onDrViewDatasChange"
@viewdatasactivated="viewDatasActivated"
@viewload="onViewLoad">
</component>
</div>
</split>
</template> </template>
<script lang='tsx'> <script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch, Model,Inject } from 'vue-property-decorator'; import { Vue, Component, Prop, Provide, Emit, Watch, Model,Inject } from 'vue-property-decorator';
...@@ -259,22 +242,6 @@ export default class F2TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -259,22 +242,6 @@ export default class F2TreeExpViewtreeexpbarBase extends Vue implements ControlI
return {}; return {};
} }
/**
* 选中数据
*
* @type {*}
* @memberof F2TreeExpViewtreeexpbarBase
*/
public selection: any = {};
/**
* 控件宽度
*
* @type {number}
* @memberof F2TreeExpViewtreeexpbarBase
*/
public ctrlWidth:number = 0;
/** /**
* 可搜索字段名称 * 可搜索字段名称
* *
...@@ -282,7 +249,7 @@ export default class F2TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -282,7 +249,7 @@ export default class F2TreeExpViewtreeexpbarBase extends Vue implements ControlI
* @type {(string)} * @type {(string)}
* @memberof F2TreeExpViewtreeexpbarBase * @memberof F2TreeExpViewtreeexpbarBase
*/ */
public placeholder="名称"; public placeholder = "名称";
/** /**
* 过滤值 * 过滤值
...@@ -310,25 +277,6 @@ export default class F2TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -310,25 +277,6 @@ export default class F2TreeExpViewtreeexpbarBase extends Vue implements ControlI
*/ */
public istLoadDefaultRefView: boolean = false; public istLoadDefaultRefView: boolean = false;
/**
* 分割宽度
*
* @type {number}
* @memberof F2TreeExpViewtreeexpbarBase
*/
public split: number = 0.2;
/**
* split值变化事件
*
* @memberof F2TreeExpViewtreeexpbarBase
*/
public onSplitChange() {
if(this.split){
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/** /**
* 获取关系项视图 * 获取关系项视图
* *
...@@ -414,11 +362,16 @@ export default class F2TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -414,11 +362,16 @@ export default class F2TreeExpViewtreeexpbarBase extends Vue implements ControlI
this.counter += 1; this.counter += 1;
Object.assign(tempContext,{srfcounter:this.counter}); Object.assign(tempContext,{srfcounter:this.counter});
} }
this.selection = {}; const navItem: any = {
Object.assign(this.selection, { view: { viewname: refview.viewname } }); navView: this.navViewName,
Object.assign(this.selection,{'viewparam':tempViewparam,'context':tempContext}); data: args,
srfnavdata: {
context: tempContext,
viewparams: tempViewParam
}
}
this.calcToolbarItemState(false); this.calcToolbarItemState(false);
this.$forceUpdate(); this.$emit('selectionchange', navItem);
} }
/** /**
...@@ -462,7 +415,7 @@ export default class F2TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -462,7 +415,7 @@ export default class F2TreeExpViewtreeexpbarBase extends Vue implements ControlI
* *
* @memberof F2TreeExpViewtreeexpbarBase * @memberof F2TreeExpViewtreeexpbarBase
*/ */
public afterCreated(){ public afterCreated() {
if (this.viewState) { if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => { this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) { if (!Object.is(tag, this.name)) {
...@@ -488,17 +441,7 @@ export default class F2TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -488,17 +441,7 @@ export default class F2TreeExpViewtreeexpbarBase extends Vue implements ControlI
* *
* @memberof F2TreeExpViewtreeexpbarBase * @memberof F2TreeExpViewtreeexpbarBase
*/ */
public afterMounted(){ public afterMounted() { }
if(this.$store.getters.getViewSplit(this.viewUID)){
this.split = this.$store.getters.getViewSplit(this.viewUID);
}else{
let containerWidth:number = (document.getElementById("f2treeexpviewtreeexpbar") as any).offsetWidth;
if(this.ctrlWidth && containerWidth != 0){
this.split = this.ctrlWidth/containerWidth;
}
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/** /**
......
<template> <template>
<split id="f3treeexpviewtreeexpbar" class='app-tree-exp-bar' v-model="split" mode="horizontal" @on-move-end="onSplitChange"> <div id="f3treeexpviewtreeexpbar" class='app-tree-exp-bar'>
<div slot='left'>
<div class='tree-exp-bar-header'> <div class='tree-exp-bar-header'>
<div class="tree-exp-bar-title"> <div class="tree-exp-bar-title">
<icon type='ios-home-outline'/>{{ $t('app.treeExpBar.title') }} <icon type='ios-home-outline'/>{{ $t('app.treeExpBar.title') }}
...@@ -26,22 +25,6 @@ ...@@ -26,22 +25,6 @@
</view_treeexpbar_tree> </view_treeexpbar_tree>
</div> </div>
</div> </div>
<div slot='right'>
<component
v-if="selection.view && !Object.is(this.selection.view.viewname, '')"
:is="selection.view.viewname"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)"
@viewdataschange="onViewDatasChange"
@drdatasaved="onDrViewDatasChange"
@drdatasremove="onDrViewDatasChange"
@viewdatasactivated="viewDatasActivated"
@viewload="onViewLoad">
</component>
</div>
</split>
</template> </template>
<script lang='tsx'> <script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch, Model,Inject } from 'vue-property-decorator'; import { Vue, Component, Prop, Provide, Emit, Watch, Model,Inject } from 'vue-property-decorator';
...@@ -250,22 +233,6 @@ export default class F3TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -250,22 +233,6 @@ export default class F3TreeExpViewtreeexpbarBase extends Vue implements ControlI
return {}; return {};
} }
/**
* 选中数据
*
* @type {*}
* @memberof F3TreeExpViewtreeexpbarBase
*/
public selection: any = {};
/**
* 控件宽度
*
* @type {number}
* @memberof F3TreeExpViewtreeexpbarBase
*/
public ctrlWidth:number = 0;
/** /**
* 可搜索字段名称 * 可搜索字段名称
* *
...@@ -273,7 +240,7 @@ export default class F3TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -273,7 +240,7 @@ export default class F3TreeExpViewtreeexpbarBase extends Vue implements ControlI
* @type {(string)} * @type {(string)}
* @memberof F3TreeExpViewtreeexpbarBase * @memberof F3TreeExpViewtreeexpbarBase
*/ */
public placeholder="名称"; public placeholder = "名称";
/** /**
* 过滤值 * 过滤值
...@@ -301,25 +268,6 @@ export default class F3TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -301,25 +268,6 @@ export default class F3TreeExpViewtreeexpbarBase extends Vue implements ControlI
*/ */
public istLoadDefaultRefView: boolean = false; public istLoadDefaultRefView: boolean = false;
/**
* 分割宽度
*
* @type {number}
* @memberof F3TreeExpViewtreeexpbarBase
*/
public split: number = 0.2;
/**
* split值变化事件
*
* @memberof F3TreeExpViewtreeexpbarBase
*/
public onSplitChange() {
if(this.split){
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/** /**
* 获取关系项视图 * 获取关系项视图
* *
...@@ -412,11 +360,16 @@ export default class F3TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -412,11 +360,16 @@ export default class F3TreeExpViewtreeexpbarBase extends Vue implements ControlI
this.counter += 1; this.counter += 1;
Object.assign(tempContext,{srfcounter:this.counter}); Object.assign(tempContext,{srfcounter:this.counter});
} }
this.selection = {}; const navItem: any = {
Object.assign(this.selection, { view: { viewname: refview.viewname } }); navView: this.navViewName,
Object.assign(this.selection,{'viewparam':tempViewparam,'context':tempContext}); data: args,
srfnavdata: {
context: tempContext,
viewparams: tempViewParam
}
}
this.calcToolbarItemState(false); this.calcToolbarItemState(false);
this.$forceUpdate(); this.$emit('selectionchange', navItem);
} }
/** /**
...@@ -460,7 +413,7 @@ export default class F3TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -460,7 +413,7 @@ export default class F3TreeExpViewtreeexpbarBase extends Vue implements ControlI
* *
* @memberof F3TreeExpViewtreeexpbarBase * @memberof F3TreeExpViewtreeexpbarBase
*/ */
public afterCreated(){ public afterCreated() {
if (this.viewState) { if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => { this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) { if (!Object.is(tag, this.name)) {
...@@ -486,17 +439,7 @@ export default class F3TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -486,17 +439,7 @@ export default class F3TreeExpViewtreeexpbarBase extends Vue implements ControlI
* *
* @memberof F3TreeExpViewtreeexpbarBase * @memberof F3TreeExpViewtreeexpbarBase
*/ */
public afterMounted(){ public afterMounted() { }
if(this.$store.getters.getViewSplit(this.viewUID)){
this.split = this.$store.getters.getViewSplit(this.viewUID);
}else{
let containerWidth:number = (document.getElementById("f3treeexpviewtreeexpbar") as any).offsetWidth;
if(this.ctrlWidth && containerWidth != 0){
this.split = this.ctrlWidth/containerWidth;
}
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/** /**
......
<template> <template>
<split id="f4treeexpviewtreeexpbar" class='app-tree-exp-bar' v-model="split" mode="horizontal" @on-move-end="onSplitChange"> <div id="f4treeexpviewtreeexpbar" class='app-tree-exp-bar'>
<div slot='left'>
<div class='tree-exp-bar-header'> <div class='tree-exp-bar-header'>
<div class="tree-exp-bar-title"> <div class="tree-exp-bar-title">
<icon type='ios-home-outline'/>{{ $t('app.treeExpBar.title') }} <icon type='ios-home-outline'/>{{ $t('app.treeExpBar.title') }}
...@@ -26,22 +25,6 @@ ...@@ -26,22 +25,6 @@
</view_treeexpbar_tree> </view_treeexpbar_tree>
</div> </div>
</div> </div>
<div slot='right'>
<component
v-if="selection.view && !Object.is(this.selection.view.viewname, '')"
:is="selection.view.viewname"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)"
@viewdataschange="onViewDatasChange"
@drdatasaved="onDrViewDatasChange"
@drdatasremove="onDrViewDatasChange"
@viewdatasactivated="viewDatasActivated"
@viewload="onViewLoad">
</component>
</div>
</split>
</template> </template>
<script lang='tsx'> <script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch, Model,Inject } from 'vue-property-decorator'; import { Vue, Component, Prop, Provide, Emit, Watch, Model,Inject } from 'vue-property-decorator';
...@@ -250,22 +233,6 @@ export default class F4TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -250,22 +233,6 @@ export default class F4TreeExpViewtreeexpbarBase extends Vue implements ControlI
return {}; return {};
} }
/**
* 选中数据
*
* @type {*}
* @memberof F4TreeExpViewtreeexpbarBase
*/
public selection: any = {};
/**
* 控件宽度
*
* @type {number}
* @memberof F4TreeExpViewtreeexpbarBase
*/
public ctrlWidth:number = 0;
/** /**
* 可搜索字段名称 * 可搜索字段名称
* *
...@@ -273,7 +240,7 @@ export default class F4TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -273,7 +240,7 @@ export default class F4TreeExpViewtreeexpbarBase extends Vue implements ControlI
* @type {(string)} * @type {(string)}
* @memberof F4TreeExpViewtreeexpbarBase * @memberof F4TreeExpViewtreeexpbarBase
*/ */
public placeholder="名称"; public placeholder = "名称";
/** /**
* 过滤值 * 过滤值
...@@ -301,25 +268,6 @@ export default class F4TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -301,25 +268,6 @@ export default class F4TreeExpViewtreeexpbarBase extends Vue implements ControlI
*/ */
public istLoadDefaultRefView: boolean = false; public istLoadDefaultRefView: boolean = false;
/**
* 分割宽度
*
* @type {number}
* @memberof F4TreeExpViewtreeexpbarBase
*/
public split: number = 0.2;
/**
* split值变化事件
*
* @memberof F4TreeExpViewtreeexpbarBase
*/
public onSplitChange() {
if(this.split){
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/** /**
* 获取关系项视图 * 获取关系项视图
* *
...@@ -412,11 +360,16 @@ export default class F4TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -412,11 +360,16 @@ export default class F4TreeExpViewtreeexpbarBase extends Vue implements ControlI
this.counter += 1; this.counter += 1;
Object.assign(tempContext,{srfcounter:this.counter}); Object.assign(tempContext,{srfcounter:this.counter});
} }
this.selection = {}; const navItem: any = {
Object.assign(this.selection, { view: { viewname: refview.viewname } }); navView: this.navViewName,
Object.assign(this.selection,{'viewparam':tempViewparam,'context':tempContext}); data: args,
srfnavdata: {
context: tempContext,
viewparams: tempViewParam
}
}
this.calcToolbarItemState(false); this.calcToolbarItemState(false);
this.$forceUpdate(); this.$emit('selectionchange', navItem);
} }
/** /**
...@@ -460,7 +413,7 @@ export default class F4TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -460,7 +413,7 @@ export default class F4TreeExpViewtreeexpbarBase extends Vue implements ControlI
* *
* @memberof F4TreeExpViewtreeexpbarBase * @memberof F4TreeExpViewtreeexpbarBase
*/ */
public afterCreated(){ public afterCreated() {
if (this.viewState) { if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => { this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) { if (!Object.is(tag, this.name)) {
...@@ -486,17 +439,7 @@ export default class F4TreeExpViewtreeexpbarBase extends Vue implements ControlI ...@@ -486,17 +439,7 @@ export default class F4TreeExpViewtreeexpbarBase extends Vue implements ControlI
* *
* @memberof F4TreeExpViewtreeexpbarBase * @memberof F4TreeExpViewtreeexpbarBase
*/ */
public afterMounted(){ public afterMounted() { }
if(this.$store.getters.getViewSplit(this.viewUID)){
this.split = this.$store.getters.getViewSplit(this.viewUID);
}else{
let containerWidth:number = (document.getElementById("f4treeexpviewtreeexpbar") as any).offsetWidth;
if(this.ctrlWidth && containerWidth != 0){
this.split = this.ctrlWidth/containerWidth;
}
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/** /**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册