提交 0b401635 编写于 作者: ibizdev's avatar ibizdev

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

上级 3778e130
...@@ -60,9 +60,9 @@ export default class EditView3Engine extends EditViewEngine { ...@@ -60,9 +60,9 @@ export default class EditView3Engine extends EditViewEngine {
* @param {any[]} args * @param {any[]} args
* @memberof EditView3Engine * @memberof EditView3Engine
*/ */
public drTabEvent(eventName: string, args: any[]): void { public drTabEvent(eventName: string, arg: any): void {
if (Object.is(eventName, 'selectionchange')) { if (Object.is(eventName, 'selectionchange')) {
this.drTabSelectionChange(args); this.drTabSelectionChange(arg);
} }
} }
...@@ -72,13 +72,16 @@ export default class EditView3Engine extends EditViewEngine { ...@@ -72,13 +72,16 @@ export default class EditView3Engine extends EditViewEngine {
* @param {any[]} args * @param {any[]} args
* @memberof EditView3Engine * @memberof EditView3Engine
*/ */
public drTabSelectionChange(args: any[]): void { public drTabSelectionChange(data: any): void {
const item = args[0]; if (data) {
if (!item || Object.keys(item).length === 0) { this.view.drItem = data;
return; this.setNavPosData(data);
if (this.getDrTab()) {
this.setViewState2({ tag: this.getDrTab().name, action: 'change', viewdata: data });
}
this.view.$forceUpdate();
} }
this.view.selection = {}; this.view.$emit('selectionchange', data);
Object.assign(this.view.selection, JSON.parse(JSON.stringify(item)));
} }
/** /**
...@@ -91,6 +94,10 @@ export default class EditView3Engine extends EditViewEngine { ...@@ -91,6 +94,10 @@ export default class EditView3Engine extends EditViewEngine {
super.onFormLoad(arg); super.onFormLoad(arg);
if (this.getDrTab()) { if (this.getDrTab()) {
const tag = this.getDrTab().name; const tag = this.getDrTab().name;
Object.assign(arg, {
srfparentdename: this.getForm().appDeCodeName,
srfparentkey: arg.srfkey,
});
this.setViewState2({ tag: tag, action: 'state', viewdata: arg }); this.setViewState2({ tag: tag, action: 'state', viewdata: arg });
} }
} }
...@@ -105,10 +112,32 @@ export default class EditView3Engine extends EditViewEngine { ...@@ -105,10 +112,32 @@ export default class EditView3Engine extends EditViewEngine {
super.onFormSave(arg); super.onFormSave(arg);
if (this.getDrTab()) { if (this.getDrTab()) {
const tag = this.getDrTab().name; const tag = this.getDrTab().name;
Object.assign(arg, {
srfparentdename: this.getForm().appDeCodeName,
srfparentkey: arg.srfkey,
});
this.setViewState2({ tag: tag, action: 'state', viewdata: arg }); this.setViewState2({ tag: tag, action: 'state', viewdata: arg });
} }
} }
/**
* 设置导航数据
*
* @protected
* @param {*} data
* @return {*}
* @memberof EditView3Engine
*/
protected setNavPosData(data: any) {
if (!this.view.layoutModelDetails) {
return;
}
const navPos: any = Object.values(this.view.layoutModelDetails).find((item: any) => {
return item.predefinedType === "NAV_POS";
});
navPos.navData = data;
}
/** /**
* 获取关系 * 获取关系
* *
...@@ -120,10 +149,10 @@ export default class EditView3Engine extends EditViewEngine { ...@@ -120,10 +149,10 @@ export default class EditView3Engine extends EditViewEngine {
} }
/** /**
* @description 销毁 * @description 视图销毁
* @memberof EditView3Engine * @memberof EditView3Engine
*/ */
public destroy() { public destroy(): void {
super.destroy(); super.destroy();
this.drTab = null; this.drTab = null;
} }
......
...@@ -60,7 +60,7 @@ export default class EditView4Engine extends EditViewEngine { ...@@ -60,7 +60,7 @@ export default class EditView4Engine extends EditViewEngine {
* @param {any[]} args * @param {any[]} args
* @memberof EditView4Engine * @memberof EditView4Engine
*/ */
public drTabEvent(eventName: string, args: any[]): void { public drTabEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'selectionchange')) { if (Object.is(eventName, 'selectionchange')) {
this.drTabSelectionChange(args); this.drTabSelectionChange(args);
} }
...@@ -72,13 +72,16 @@ export default class EditView4Engine extends EditViewEngine { ...@@ -72,13 +72,16 @@ export default class EditView4Engine extends EditViewEngine {
* @param {any[]} args * @param {any[]} args
* @memberof EditView4Engine * @memberof EditView4Engine
*/ */
public drTabSelectionChange(args: any[]): void { public drTabSelectionChange(data: any): void {
const item = args[0]; if (data) {
if (!item || Object.keys(item).length === 0) { this.view.drItem = data;
return; this.setNavPosData(data);
if (this.getDrTab()) {
this.setViewState2({ tag: this.getDrTab().name, action: 'change', viewdata: data });
}
this.view.$forceUpdate();
} }
this.view.selection = {}; this.view.$emit('selectionchange', data);
Object.assign(this.view.selection, JSON.parse(JSON.stringify(item)));
} }
/** /**
...@@ -91,6 +94,10 @@ export default class EditView4Engine extends EditViewEngine { ...@@ -91,6 +94,10 @@ export default class EditView4Engine extends EditViewEngine {
super.onFormLoad(arg); super.onFormLoad(arg);
if (this.getDrTab()) { if (this.getDrTab()) {
const tag = this.getDrTab().name; const tag = this.getDrTab().name;
Object.assign(arg, {
srfparentdename: this.getForm().appDeCodeName,
srfparentkey: arg.srfkey,
});
this.setViewState2({ tag: tag, action: 'state', viewdata: arg }); this.setViewState2({ tag: tag, action: 'state', viewdata: arg });
} }
} }
...@@ -105,10 +112,32 @@ export default class EditView4Engine extends EditViewEngine { ...@@ -105,10 +112,32 @@ export default class EditView4Engine extends EditViewEngine {
super.onFormSave(arg); super.onFormSave(arg);
if (this.getDrTab()) { if (this.getDrTab()) {
const tag = this.getDrTab().name; const tag = this.getDrTab().name;
Object.assign(arg, {
srfparentdename: this.getForm().appDeCodeName,
srfparentkey: arg.srfkey,
});
this.setViewState2({ tag: tag, action: 'state', viewdata: arg }); this.setViewState2({ tag: tag, action: 'state', viewdata: arg });
} }
} }
/**
* 设置导航数据
*
* @protected
* @param {*} data
* @return {*}
* @memberof EditView4Engine
*/
protected setNavPosData(data: any) {
if (!this.view.layoutModelDetails) {
return;
}
const navPos: any = Object.values(this.view.layoutModelDetails).find((item: any) => {
return item.predefinedType === "NAV_POS";
});
navPos.navData = data;
}
/** /**
* 获取关系 * 获取关系
* *
...@@ -120,10 +149,10 @@ export default class EditView4Engine extends EditViewEngine { ...@@ -120,10 +149,10 @@ export default class EditView4Engine extends EditViewEngine {
} }
/** /**
* @description 销毁 * @description 视图销毁
* @memberof EditView4Engine * @memberof EditView4Engine
*/ */
public destroy() { public destroy(): void {
super.destroy(); super.destroy();
this.drTab = null; this.drTab = null;
} }
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
:viewparams="viewparams" :viewparams="viewparams"
:context="context" :context="context"
parentName = "IBIZBOOK" parentName = "IBIZBOOK"
:isShowSlot="false" :selectDefault="true"
@selectionchange='drtab_selectionchange($event)' @selectionchange='drtab_selectionchange($event)'
@closeview='closeView($event)'> @closeview='closeView($event)'>
</view_drtab> </view_drtab>
......
...@@ -18,6 +18,26 @@ ...@@ -18,6 +18,26 @@
.view-container.ibizbookedit-view4 > .view-card > .ivu-card-body > .content-container { .edit-view4 {
height: calc(100% - 30px); height: 100%;
display: flex;
flex-direction: column;
}
.edit-view4-content {
.app-dr-tab {
height: 40px;
line-height: 40px;
border-bottom: 1px solid rgb(220, 222, 226);
display: flex;
}
> .view-container2 {
height: calc(100% - 40px);
}
}
.edit-view4-form,
.edit-view4-content {
height: 50%;
}
.ibizbookedit-view4 {
height: 100%;
} }
...@@ -1195,7 +1195,7 @@ export default class IBIZOrderSEditView3_layoutBase extends Vue { ...@@ -1195,7 +1195,7 @@ export default class IBIZOrderSEditView3_layoutBase extends Vue {
* @type {*} * @type {*}
* @memberof IBIZOrderSEditView3_layoutBase * @memberof IBIZOrderSEditView3_layoutBase
*/ */
public drItem: any = {}; public drItem: any = { id: 'form' };
/** /**
* 处理分页项变化 * 处理分页项变化
...@@ -1203,7 +1203,9 @@ export default class IBIZOrderSEditView3_layoutBase extends Vue { ...@@ -1203,7 +1203,9 @@ export default class IBIZOrderSEditView3_layoutBase extends Vue {
* @memberof IBIZOrderSEditView3_layoutBase * @memberof IBIZOrderSEditView3_layoutBase
*/ */
public handleDrTabChange() { public handleDrTabChange() {
if (this.engine) {
this.engine.drTabSelectionChange({ id: 'form' });
}
} }
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<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>
<template v-if="Object.is(this.selection.id, 'form')"> <template v-if="drItem && drItem.id === 'form'">
<div class='toolbar-container'> <div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600"> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.deuiaction1.visabled" :disabled="toolBarModels.deuiaction1.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'deuiaction1' }, $event)"> <i-button v-show="toolBarModels.deuiaction1.visabled" :disabled="toolBarModels.deuiaction1.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'deuiaction1' }, $event)">
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<div class="content-container"> <div class="content-container">
<div class="edit-view3"> <div class="edit-view3">
<div class="edit-view3-drheader"> <div class="edit-view3-drheader">
<span :class="{ 'dr-tab-item': true, 'is-active': drItem && drItem.id !== 'form' }" @click="handleDrTabChange">订单</span> <span :class="{ 'dr-tab-item': true, 'is-active': drItem && drItem.id === 'form' }" @click="handleDrTabChange">订单</span>
<view_drtab <view_drtab
:viewState="viewState" :viewState="viewState"
name='drtab' name='drtab'
...@@ -62,28 +62,6 @@ ...@@ -62,28 +62,6 @@
parentName = "IBIZOrder" parentName = "IBIZOrder"
@selectionchange='drtab_selectionchange($event)' @selectionchange='drtab_selectionchange($event)'
@closeview='closeView($event)'> @closeview='closeView($event)'>
<view_form
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="true"
updateAction="Update"
removeAction="Remove"
loaddraftAction="GetDraft"
loadAction="Get"
createAction="Create"
WFSubmitAction=""
WFStartAction=""
style=''
name="form"
ref='form'
@load="form_load($event)"
@save="form_save($event)"
@remove="form_remove($event)"
@closeview="closeView($event)">
</view_form>
</view_drtab> </view_drtab>
</div> </div>
<div class="edit-view3-content"> <div class="edit-view3-content">
...@@ -1205,7 +1183,7 @@ export default class IBIZOrderSEditView3Base extends Vue { ...@@ -1205,7 +1183,7 @@ export default class IBIZOrderSEditView3Base extends Vue {
* @type {*} * @type {*}
* @memberof IBIZOrderSEditView3Base * @memberof IBIZOrderSEditView3Base
*/ */
public drItem: any = {}; public drItem: any = { id: 'form' };
/** /**
* 处理分页项变化 * 处理分页项变化
...@@ -1213,7 +1191,9 @@ export default class IBIZOrderSEditView3Base extends Vue { ...@@ -1213,7 +1191,9 @@ export default class IBIZOrderSEditView3Base extends Vue {
* @memberof IBIZOrderSEditView3Base * @memberof IBIZOrderSEditView3Base
*/ */
public handleDrTabChange() { public handleDrTabChange() {
if (this.engine) {
this.engine.drTabSelectionChange({ id: 'form' });
}
} }
} }
......
.view-card { .view-card {
>.ivu-card-extra { > .ivu-card-extra {
top: 5px; top: 5px;
right: 0px; right: 0px;
} }
} }
.edit-view3 {
height: 100%;
}
.edit-view3-drheader {
height: 40px;
line-height: 40px;
display: flex;
flex-direction: row;
align-items: center;
border-bottom: 1px solid rgb(220, 222, 226);
.dr-tab-item {
cursor: pointer;
padding: 0 16px;
&.is-active,
&:hover {
color: #2d8cf0;
}
&.is-active {
position: relative;
}
&.is-active::after {
content: '';
width: 100%;
height: 2px;
background: #2d8cf0;
position: absolute;
left: 0px;
bottom: 0px;
}
}
}
.edit-view3-content {
height: calc(100% - 40px);
.edit-view3-content__form,
> .view-container2 {
height: 100%;
}
}
.ibizorder-sedit-view3 {
height: 100%;
}
.ibizorder-sedit-view3{ .ibizorder-sedit-view3{
position: relative; position: relative;
} }
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
:viewparams="viewparams" :viewparams="viewparams"
:context="context" :context="context"
parentName = "IBIZOrder" parentName = "IBIZOrder"
:isShowSlot="false" :selectDefault="true"
@selectionchange='drtab_selectionchange($event)' @selectionchange='drtab_selectionchange($event)'
@closeview='closeView($event)'> @closeview='closeView($event)'>
</view_drtab> </view_drtab>
......
...@@ -19,6 +19,26 @@ ...@@ -19,6 +19,26 @@
.deepskyblueToolBar {color:white !important;background-color:#108cee !important;} .deepskyblueToolBar {color:white !important;background-color:#108cee !important;}
.view-container.ibizorder-sedit-view4 > .view-card > .ivu-card-body > .content-container { .edit-view4 {
height: calc(100% - 30px); height: 100%;
display: flex;
flex-direction: column;
}
.edit-view4-content {
.app-dr-tab {
height: 40px;
line-height: 40px;
border-bottom: 1px solid rgb(220, 222, 226);
display: flex;
}
> .view-container2 {
height: calc(100% - 40px);
}
}
.edit-view4-form,
.edit-view4-content {
height: 50%;
}
.ibizorder-sedit-view4 {
height: 100%;
} }
<template> <template>
<div class="app-dr-tab"> <div class="app-dr-tab">
<div v-for="(item, index) in items" :class="{ 'app-dr-tab-item': true, 'dr-tab-item': true, 'is-disabled': item.disabled, 'is-active': selection.id === item.id }"> <div
v-for="(item, index) in items"
:class="{
'app-dr-tab-item': true,
'dr-tab-item': true,
'is-disabled': item.disabled,
'is-active': selection.id === item.id
}"
@click="handleDrTabChange(item)">
<span class="text">{{ item.text }}</span> <span class="text">{{ item.text }}</span>
</div> </div>
</div> </div>
...@@ -147,14 +155,13 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -147,14 +155,13 @@ export default class DefaultBase extends Vue implements ControlInterface {
/** /**
* 是否显示插槽 * 是否默认加载数据
* *
* @type {string} * @type {boolean}
* @memberof DefaultBase * @memberof DefaultBase
*/ */
@Prop({default:true}) public isShowSlot?: boolean; @Prop({ default: false }) public selectDefault?: boolean;
/** /**
* 应用实体参数名称 * 应用实体参数名称
...@@ -227,17 +234,6 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -227,17 +234,6 @@ export default class DefaultBase extends Vue implements ControlInterface {
this.afterCreated(); this.afterCreated();
} }
/**
* 仿真选中第一项
*
* @memberof DefaultBase
*/
public selectFirst(){
if (this.items.length > 0){
this.isShowSlot?this.tabPanelClick(this.items[0].name):this.items.length>1?this.tabPanelClick(this.items[1].name):()=>{};
}
}
/** /**
* 执行created后的逻辑 * 执行created后的逻辑
* *
...@@ -250,10 +246,10 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -250,10 +246,10 @@ export default class DefaultBase extends Vue implements ControlInterface {
return; return;
} }
if (Object.is('state', action)) { if (Object.is('state', action)) {
const state = !this.context.ibizbook ? true : false; this.handleFormDataChange(data);
this.setItemDisabled(state); }
this.formData = data; if (Object.is('change', action)) {
this.selectFirst(); this.selection = data;
} }
}); });
} }
...@@ -280,37 +276,10 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -280,37 +276,10 @@ export default class DefaultBase extends Vue implements ControlInterface {
} }
/** /**
* 获取关系项 * 处理表单数据变化
*
* @public
* @param {*} [arg={}]
* @returns {*}
* @memberof DefaultBase
*/
public getDRTabItem(arg: any = {}): any {
let expmode = arg.nodetype.toUpperCase();
if (!expmode) {
expmode = '';
}
return undefined;
}
/**
* 获取数据项
* *
* @public
* @param {string} id
* @returns {*}
* @memberof DefaultBase * @memberof DefaultBase
*/ */
public getItem(id: string): any {
const arr: any[] = this.items.filter((_item: any) => Object.is(_item.id, id));
if (arr) {
return arr[0];
}
return null;
}
public handleFormDataChange(data: any) { public handleFormDataChange(data: any) {
this.formData = data; this.formData = data;
if (data && Object.is(data.srfuf, '1')) { if (data && Object.is(data.srfuf, '1')) {
...@@ -322,37 +291,48 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -322,37 +291,48 @@ export default class DefaultBase extends Vue implements ControlInterface {
item.disabled = true; item.disabled = true;
}) })
} }
if (this.selectDefault && this.items.length > 0) {
this.handleDrTabChange(this.items[0]);
}
} }
/** /**
* 选中节点 * 处理分页项变化
* *
* @param {*} $event
* @memberof DefaultBase * @memberof DefaultBase
*/ */
public tabPanelClick($event: any): void { public handleDrTabChange(item: any) {
// const item = this.getItem($event); if (this.selection && this.selection.id === item.id) {
// if (Object.is(item.id, this.selection.id)) { return;
// return; }
// } this.selection = item;
// this.$emit('selectionchange', [item]); const tempContext = Util.deepCopy(this.context);
// let localNavParam:any = this.initNavParam(item); const tempViewParams = Util.deepCopy(this.viewparams);
// const refview = this.getDRTabItem({ nodetype: item.id }); if (item.localContext && Object.keys(item.localContext).length > 0) {
// this.selection = {}; const _context: any = this.$util.computedNavData(this.formData, tempContext, tempViewParams, item.localContext);
// const _context: any = { ...JSON.parse(JSON.stringify(this.context)) }; Object.assign(tempContext, _context);
// if(localNavParam && localNavParam.localContext){ }
// Object.assign(_context,localNavParam.localContext); if (this.formData.srfparentkey) {
// } Object.assign(tempContext, { srfparentkey: this.formData.srfparentkey });
// Object.assign(_context,{srfparentdename:this.parentName,srfparentkey:_context[this.parentName.toLowerCase()]}); Object.assign(tempViewParams, { srfparentkey: this.formData.srfparentkey });
// const _params: any = {}; }
// if(localNavParam && localNavParam.localViewParam){ if (item.localViewParam && Object.keys(item.localViewParam).length > 0) {
// Object.assign(_params,localNavParam.localViewParam); const _params: any = this.$util.computedNavData(this.formData, tempContext, tempViewParams, item.localViewParam);
// } Object.assign(tempViewParams, _params);
// if (refview && refview.parentdatajo) { }
// Object.assign(_context, refview.parentdatajo); if (this.formData.srfparentdename) {
// Object.assign(this.selection, { view: { viewname: refview.viewname }, data: _context, param: _params }); Object.assign(tempContext, { srfparentdename: this.formData.srfparentdename });
// } Object.assign(tempViewParams, { srfparentdename: this.formData.srfparentdename });
// Object.assign(this.selection, item); }
const drItem = {
id: item.id,
navView: item.navView,
srfnavdata: {
context: tempContext,
viewparams: tempViewParams
}
}
this.$emit('selectionchange', drItem);
} }
} }
......
.drtab{ .app-dr-tab {
height:100%; .dr-tab-item {
overflow: auto; cursor: pointer;
.app-dr-tab { padding: 0 16px;
height: 100%; &.is-active,
>.ivu-tabs-bar { &:hover {
margin-bottom: 0px; color: #2d8cf0;
}
>.ivu-tabs-content {
height: calc(100% - 36px);
padding: 0px !important;
.ivu-tabs-tabpane {
height: 100%;
.main-data {
width: 100%;
height: 100%;
} }
&.is-active {
position: relative;
} }
&.is-active::after {
content: '';
width: 100%;
height: 2px;
background: #2d8cf0;
position: absolute;
left: 0px;
bottom: 0px;
} }
} }
} }
// this is less // this is less
...@@ -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: 'IBIZBOOKUsr9GridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKGroupByCodelistListView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return; 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: 'IBIZBOOKUsr9GridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKGroupByCodelistListView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return; return;
} }
const arg: any = { ...opt } ; const arg: any = { ...opt } ;
......
...@@ -48,18 +48,18 @@ ...@@ -48,18 +48,18 @@
<div v-show="flag" class="batch-toolbar"> <div v-show="flag" class="batch-toolbar">
<div class='toolbar-container'> <div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600"> <tooltip :transfer="true" :max-width="600">
<i-button v-show="dataviewexpviewdataviewexpbar_dataview_batchtoolbarModels.deuiaction1.visabled" :disabled="dataviewexpviewdataviewexpbar_dataview_batchtoolbarModels.deuiaction1.disabled" class='' v-loading:i-button @click="dataviewexpbar_dataview_batchtoolbar_click({ tag: 'deuiaction1' }, $event)"> <i-button v-show="usr2dataviewdataview_batchtoolbarModels.deuiaction1.visabled" :disabled="usr2dataviewdataview_batchtoolbarModels.deuiaction1.disabled" class='' v-loading:i-button @click="dataview_batchtoolbar_click({ tag: 'deuiaction1' }, $event)">
<i class='fa fa-edit'></i> <i class='fa fa-edit'></i>
<span class='caption'>{{$t('entities.ibizbook.dataviewexpviewdataviewexpbar_dataview_batchtoolbar_toolbar.deuiaction1.caption')}}</span> <span class='caption'>{{$t('entities.ibizbook.usr2dataviewdataview_batchtoolbar_toolbar.deuiaction1.caption')}}</span>
</i-button> </i-button>
<div slot='content'>{{$t('entities.ibizbook.dataviewexpviewdataviewexpbar_dataview_batchtoolbar_toolbar.deuiaction1.tip')}}</div> <div slot='content'>{{$t('entities.ibizbook.usr2dataviewdataview_batchtoolbar_toolbar.deuiaction1.tip')}}</div>
</tooltip> </tooltip>
<tooltip :transfer="true" :max-width="600"> <tooltip :transfer="true" :max-width="600">
<i-button v-show="dataviewexpviewdataviewexpbar_dataview_batchtoolbarModels.deuiaction2.visabled" :disabled="dataviewexpviewdataviewexpbar_dataview_batchtoolbarModels.deuiaction2.disabled" class='' v-loading:i-button @click="dataviewexpbar_dataview_batchtoolbar_click({ tag: 'deuiaction2' }, $event)"> <i-button v-show="usr2dataviewdataview_batchtoolbarModels.deuiaction2.visabled" :disabled="usr2dataviewdataview_batchtoolbarModels.deuiaction2.disabled" class='' v-loading:i-button @click="dataview_batchtoolbar_click({ tag: 'deuiaction2' }, $event)">
<i class='fa fa-remove'></i> <i class='fa fa-remove'></i>
<span class='caption'>{{$t('entities.ibizbook.dataviewexpviewdataviewexpbar_dataview_batchtoolbar_toolbar.deuiaction2.caption')}}</span> <span class='caption'>{{$t('entities.ibizbook.usr2dataviewdataview_batchtoolbar_toolbar.deuiaction2.caption')}}</span>
</i-button> </i-button>
<div slot='content'>{{$t('entities.ibizbook.dataviewexpviewdataviewexpbar_dataview_batchtoolbar_toolbar.deuiaction2.tip')}}</div> <div slot='content'>{{$t('entities.ibizbook.usr2dataviewdataview_batchtoolbar_toolbar.deuiaction2.tip')}}</div>
</tooltip> </tooltip>
</div> </div>
</div> </div>
...@@ -174,18 +174,18 @@ export default class Usr2Base extends Vue implements ControlInterface { ...@@ -174,18 +174,18 @@ export default class Usr2Base extends Vue implements ControlInterface {
public appEntityService: IBIZBOOKEntityService = new IBIZBOOKEntityService({ $store: this.$store }); public appEntityService: IBIZBOOKEntityService = new IBIZBOOKEntityService({ $store: this.$store });
/** /**
* dataviewexpbar_dataview_batchtoolbar 部件 click 事件 * dataview_batchtoolbar 部件 click 事件
* *
* @param {*} [args={}] * @param {*} [args={}]
* @param {*} $event * @param {*} $event
* @memberof Usr2Base * @memberof Usr2Base
*/ */
public dataviewexpbar_dataview_batchtoolbar_click($event: any, $event2?: any) { public dataview_batchtoolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'deuiaction1')) { if (Object.is($event.tag, 'deuiaction1')) {
this.dataviewexpbar_dataview_batchtoolbar_deuiaction1_click(null, 'dataviewexpbar_dataview_batchtoolbar', $event2); this.dataview_batchtoolbar_deuiaction1_click(null, 'dataview_batchtoolbar', $event2);
} }
if (Object.is($event.tag, 'deuiaction2')) { if (Object.is($event.tag, 'deuiaction2')) {
this.dataviewexpbar_dataview_batchtoolbar_deuiaction2_click(null, 'dataviewexpbar_dataview_batchtoolbar', $event2); this.dataview_batchtoolbar_deuiaction2_click(null, 'dataview_batchtoolbar', $event2);
} }
} }
...@@ -198,7 +198,7 @@ export default class Usr2Base extends Vue implements ControlInterface { ...@@ -198,7 +198,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
* @param {*} [$event] * @param {*} [$event]
* @memberof * @memberof
*/ */
public dataviewexpbar_dataview_batchtoolbar_deuiaction1_click(params: any = {}, tag?: any, $event?: any) { public dataview_batchtoolbar_deuiaction1_click(params: any = {}, tag?: any, $event?: any) {
// 参数 // 参数
// 取数 // 取数
let datas: any[] = []; let datas: any[] = [];
...@@ -226,7 +226,7 @@ export default class Usr2Base extends Vue implements ControlInterface { ...@@ -226,7 +226,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
* @param {*} [$event] * @param {*} [$event]
* @memberof * @memberof
*/ */
public dataviewexpbar_dataview_batchtoolbar_deuiaction2_click(params: any = {}, tag?: any, $event?: any) { public dataview_batchtoolbar_deuiaction2_click(params: any = {}, tag?: any, $event?: any) {
// 参数 // 参数
// 取数 // 取数
let datas: any[] = []; let datas: any[] = [];
...@@ -254,7 +254,7 @@ export default class Usr2Base extends Vue implements ControlInterface { ...@@ -254,7 +254,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
* @param {*} [$event] * @param {*} [$event]
* @memberof * @memberof
*/ */
public dataviewexpbar_dataview_memo1_u37f11a8_click(params: any = {}, tag?: any, $event?: any) { public dataview_memo1_u37f11a8_click(params: any = {}, tag?: any, $event?: any) {
// 取数 // 取数
let datas: any[] = []; let datas: any[] = [];
let xData: any = null; let xData: any = null;
...@@ -281,7 +281,7 @@ export default class Usr2Base extends Vue implements ControlInterface { ...@@ -281,7 +281,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
* @param {*} [$event] * @param {*} [$event]
* @memberof * @memberof
*/ */
public dataviewexpbar_dataview_memo1_uc365542_click(params: any = {}, tag?: any, $event?: any) { public dataview_memo1_uc365542_click(params: any = {}, tag?: any, $event?: any) {
// 取数 // 取数
let datas: any[] = []; let datas: any[] = [];
let xData: any = null; let xData: any = null;
...@@ -309,7 +309,7 @@ export default class Usr2Base extends Vue implements ControlInterface { ...@@ -309,7 +309,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
* @param {*} [$event] 事件源 * @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件 * @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文 * @param {*} [actionContext] 执行行为上下文
* @memberof IBIZBOOKDataViewExpViewBase * @memberof IBIZBOOKUsr2DataViewBase
*/ */
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) { public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) { if (args.length === 0) {
...@@ -335,7 +335,7 @@ export default class Usr2Base extends Vue implements ControlInterface { ...@@ -335,7 +335,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
* @param {*} [$event] 事件源 * @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件 * @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文 * @param {*} [actionContext] 执行行为上下文
* @memberof IBIZBOOKDataViewExpViewBase * @memberof IBIZBOOKUsr2DataViewBase
*/ */
public Remove(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) { public Remove(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this; const _this: any = this;
...@@ -629,9 +629,9 @@ export default class Usr2Base extends Vue implements ControlInterface { ...@@ -629,9 +629,9 @@ export default class Usr2Base extends Vue implements ControlInterface {
* 工具栏模型 * 工具栏模型
* *
* @type {*} * @type {*}
* @memberof IBIZBOOKDataViewExpView * @memberof IBIZBOOKUsr2DataView
*/ */
public dataviewexpviewdataviewexpbar_dataview_batchtoolbarModels: any = { public usr2dataviewdataview_batchtoolbarModels: any = {
deuiaction1: { name: 'deuiaction1', actiontarget: 'NONE', caption: '编辑', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' } }, deuiaction1: { name: 'deuiaction1', actiontarget: 'NONE', caption: '编辑', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' } },
deuiaction2: { name: 'deuiaction2', actiontarget: 'NONE', caption: '删除', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Remove', target: 'MULTIKEY' } }, deuiaction2: { name: 'deuiaction2', actiontarget: 'NONE', caption: '删除', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Remove', target: 'MULTIKEY' } },
...@@ -956,7 +956,7 @@ export default class Usr2Base extends Vue implements ControlInterface { ...@@ -956,7 +956,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
*/ */
public load(opt: any = {}, isReset: boolean = false): void { public load(opt: any = {}, isReset: boolean = false): void {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKDataViewExpView' + (this.$t('app.list.notConfig.fetchAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr2DataView' + (this.$t('app.list.notConfig.fetchAction') as string) });
return; return;
} }
const arg: any = {...opt}; const arg: any = {...opt};
...@@ -1036,7 +1036,7 @@ export default class Usr2Base extends Vue implements ControlInterface { ...@@ -1036,7 +1036,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
*/ */
public async remove(datas: any[]): Promise<any> { public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){ if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKDataViewExpView' + (this.$t('app.gridpage.notConfig.removeAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr2DataView' + (this.$t('app.gridpage.notConfig.removeAction') as string) });
return; return;
} }
let _datas:any[] = []; let _datas:any[] = [];
...@@ -1146,7 +1146,7 @@ export default class Usr2Base extends Vue implements ControlInterface { ...@@ -1146,7 +1146,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
try { try {
if(Object.is(item.rowDataState, 'create')){ if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){ if(!this.createAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKDataViewExpView' + (this.$t('app.list.notConfig.createAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr2DataView' + (this.$t('app.list.notConfig.createAction') as string) });
}else{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator); let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
...@@ -1154,7 +1154,7 @@ export default class Usr2Base extends Vue implements ControlInterface { ...@@ -1154,7 +1154,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
} }
}else if(Object.is(item.rowDataState, 'update')){ }else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){ if(!this.updateAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKDataViewExpView' + (this.$t('app.list.notConfig.updateAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr2DataView' + (this.$t('app.list.notConfig.updateAction') as string) });
}else{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
if(item.ibizbook){ if(item.ibizbook){
...@@ -1245,16 +1245,16 @@ export default class Usr2Base extends Vue implements ControlInterface { ...@@ -1245,16 +1245,16 @@ export default class Usr2Base extends Vue implements ControlInterface {
public uiAction(data: any, tag: any, $event: any) { public uiAction(data: any, tag: any, $event: any) {
$event.stopPropagation(); $event.stopPropagation();
if(Object.is('Edit', tag)) { if(Object.is('Edit', tag)) {
this.dataviewexpbar_dataview_batchtoolbar_deuiaction1_click(data, tag, $event); this.dataview_batchtoolbar_deuiaction1_click(data, tag, $event);
} }
if(Object.is('Remove', tag)) { if(Object.is('Remove', tag)) {
this.dataviewexpbar_dataview_batchtoolbar_deuiaction2_click(data, tag, $event); this.dataview_batchtoolbar_deuiaction2_click(data, tag, $event);
} }
if(Object.is('Edit', tag)) { if(Object.is('Edit', tag)) {
this.dataviewexpbar_dataview_memo1_u37f11a8_click(data, tag, $event); this.dataview_memo1_u37f11a8_click(data, tag, $event);
} }
if(Object.is('Remove', tag)) { if(Object.is('Remove', tag)) {
this.dataviewexpbar_dataview_memo1_uc365542_click(data, tag, $event); this.dataview_memo1_uc365542_click(data, tag, $event);
} }
} }
......
...@@ -10,7 +10,7 @@ export default class Usr2Model { ...@@ -10,7 +10,7 @@ export default class Usr2Model {
* 获取数据项集合 * 获取数据项集合
* *
* @returns {any[]} * @returns {any[]}
* @memberof Usr2Dataviewexpbar_dataviewMode * @memberof Usr2DataViewMode
*/ */
public getDataItems(): any[] { public getDataItems(): any[] {
return [ return [
...@@ -39,6 +39,17 @@ export default class Usr2Model { ...@@ -39,6 +39,17 @@ export default class Usr2Model {
dataType: 'FONTKEY', dataType: 'FONTKEY',
}, },
{
name: 'n_ibizbookname_like',
prop: 'n_ibizbookname_like',
dataType: 'QUERYPARAM'
},
{
name: 'n_price_gtandeq',
prop: 'n_price_gtandeq',
dataType: 'QUERYPARAM'
},
{ {
name:'size', name:'size',
......
...@@ -906,7 +906,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -906,7 +906,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public load(opt: any = {}, pageReset: boolean = false): void { public load(opt: any = {}, pageReset: boolean = false): void {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDetailGridView9'+(this.$t('app.gridpage.notConfig.fetchAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDetailSGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return; return;
} }
if(pageReset){ if(pageReset){
...@@ -1001,7 +1001,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1001,7 +1001,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public async remove(datas: any[]): Promise<any> { public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){ if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDetailGridView9'+(this.$t('app.gridpage.notConfig.removeAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDetailSGridView'+(this.$t('app.gridpage.notConfig.removeAction') as string) });
return; return;
} }
let _datas:any[] = []; let _datas:any[] = [];
...@@ -1107,7 +1107,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1107,7 +1107,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public addBatch(arg: any = {}): void { public addBatch(arg: any = {}): void {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDetailGridView9'+(this.$t('app.gridpage.notConfig.fetchAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDetailSGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return; return;
} }
if(!arg){ if(!arg){
...@@ -1987,7 +1987,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1987,7 +1987,7 @@ export default class MainBase extends Vue implements ControlInterface {
try { try {
if(Object.is(item.rowDataState, 'create')){ if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){ if(!this.createAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDetailGridView9'+(this.$t('app.gridpage.notConfig.createAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDetailSGridView'+(this.$t('app.gridpage.notConfig.createAction') as string) });
}else{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator); let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
...@@ -1995,7 +1995,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1995,7 +1995,7 @@ export default class MainBase extends Vue implements ControlInterface {
} }
}else if(Object.is(item.rowDataState, 'update')){ }else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){ if(!this.updateAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDetailGridView9'+(this.$t('app.gridpage.notConfig.updateAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDetailSGridView'+(this.$t('app.gridpage.notConfig.updateAction') as string) });
}else{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
if(item.ibizorderdetail){ if(item.ibizorderdetail){
...@@ -2062,7 +2062,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -2062,7 +2062,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public newRow(args: any[], params?: any, $event?: any, xData?: any): void { public newRow(args: any[], params?: any, $event?: any, xData?: any): void {
if(!this.loaddraftAction){ if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDetailGridView9'+(this.$t('app.gridpage.notConfig.loaddraftAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDetailSGridView'+(this.$t('app.gridpage.notConfig.loaddraftAction') as string) });
return; return;
} }
let _this = this; let _this = this;
......
<template> <template>
<div class="app-dr-tab"> <div class="app-dr-tab">
<div v-for="(item, index) in items" :class="{ 'app-dr-tab-item': true, 'dr-tab-item': true, 'is-disabled': item.disabled, 'is-active': selection.id === item.id }"> <div
v-for="(item, index) in items"
:class="{
'app-dr-tab-item': true,
'dr-tab-item': true,
'is-disabled': item.disabled,
'is-active': selection.id === item.id
}"
@click="handleDrTabChange(item)">
<span class="text">{{ item.text }}</span> <span class="text">{{ item.text }}</span>
</div> </div>
</div> </div>
...@@ -156,14 +164,13 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -156,14 +164,13 @@ export default class DefaultBase extends Vue implements ControlInterface {
/** /**
* 是否显示插槽 * 是否默认加载数据
* *
* @type {string} * @type {boolean}
* @memberof DefaultBase * @memberof DefaultBase
*/ */
@Prop({default:true}) public isShowSlot?: boolean; @Prop({ default: false }) public selectDefault?: boolean;
/** /**
* 应用实体参数名称 * 应用实体参数名称
...@@ -245,17 +252,6 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -245,17 +252,6 @@ export default class DefaultBase extends Vue implements ControlInterface {
this.afterCreated(); this.afterCreated();
} }
/**
* 仿真选中第一项
*
* @memberof DefaultBase
*/
public selectFirst(){
if (this.items.length > 0){
this.isShowSlot?this.tabPanelClick(this.items[0].name):this.items.length>1?this.tabPanelClick(this.items[1].name):()=>{};
}
}
/** /**
* 执行created后的逻辑 * 执行created后的逻辑
* *
...@@ -268,10 +264,10 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -268,10 +264,10 @@ export default class DefaultBase extends Vue implements ControlInterface {
return; return;
} }
if (Object.is('state', action)) { if (Object.is('state', action)) {
const state = !this.context.ibizorder ? true : false; this.handleFormDataChange(data);
this.setItemDisabled(state); }
this.formData = data; if (Object.is('change', action)) {
this.selectFirst(); this.selection = data;
} }
}); });
} }
...@@ -298,43 +294,10 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -298,43 +294,10 @@ export default class DefaultBase extends Vue implements ControlInterface {
} }
/** /**
* 获取关系项 * 处理表单数据变化
* *
* @public
* @param {*} [arg={}]
* @returns {*}
* @memberof DefaultBase * @memberof DefaultBase
*/ */
public getDRTabItem(arg: any = {}): any {
let expmode = arg.nodetype.toUpperCase();
if (!expmode) {
expmode = '';
}
if (Object.is(expmode, 'DRITEM2')) {
return {
viewname: 'ibizorder-detail-sgrid-view',
parentdatajo: {},
};
}
return undefined;
}
/**
* 获取数据项
*
* @public
* @param {string} id
* @returns {*}
* @memberof DefaultBase
*/
public getItem(id: string): any {
const arr: any[] = this.items.filter((_item: any) => Object.is(_item.id, id));
if (arr) {
return arr[0];
}
return null;
}
public handleFormDataChange(data: any) { public handleFormDataChange(data: any) {
this.formData = data; this.formData = data;
if (data && Object.is(data.srfuf, '1')) { if (data && Object.is(data.srfuf, '1')) {
...@@ -346,37 +309,48 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -346,37 +309,48 @@ export default class DefaultBase extends Vue implements ControlInterface {
item.disabled = true; item.disabled = true;
}) })
} }
if (this.selectDefault && this.items.length > 0) {
this.handleDrTabChange(this.items[0]);
}
} }
/** /**
* 选中节点 * 处理分页项变化
* *
* @param {*} $event
* @memberof DefaultBase * @memberof DefaultBase
*/ */
public tabPanelClick($event: any): void { public handleDrTabChange(item: any) {
// const item = this.getItem($event); if (this.selection && this.selection.id === item.id) {
// if (Object.is(item.id, this.selection.id)) { return;
// return; }
// } this.selection = item;
// this.$emit('selectionchange', [item]); const tempContext = Util.deepCopy(this.context);
// let localNavParam:any = this.initNavParam(item); const tempViewParams = Util.deepCopy(this.viewparams);
// const refview = this.getDRTabItem({ nodetype: item.id }); if (item.localContext && Object.keys(item.localContext).length > 0) {
// this.selection = {}; const _context: any = this.$util.computedNavData(this.formData, tempContext, tempViewParams, item.localContext);
// const _context: any = { ...JSON.parse(JSON.stringify(this.context)) }; Object.assign(tempContext, _context);
// if(localNavParam && localNavParam.localContext){ }
// Object.assign(_context,localNavParam.localContext); if (this.formData.srfparentkey) {
// } Object.assign(tempContext, { srfparentkey: this.formData.srfparentkey });
// Object.assign(_context,{srfparentdename:this.parentName,srfparentkey:_context[this.parentName.toLowerCase()]}); Object.assign(tempViewParams, { srfparentkey: this.formData.srfparentkey });
// const _params: any = {}; }
// if(localNavParam && localNavParam.localViewParam){ if (item.localViewParam && Object.keys(item.localViewParam).length > 0) {
// Object.assign(_params,localNavParam.localViewParam); const _params: any = this.$util.computedNavData(this.formData, tempContext, tempViewParams, item.localViewParam);
// } Object.assign(tempViewParams, _params);
// if (refview && refview.parentdatajo) { }
// Object.assign(_context, refview.parentdatajo); if (this.formData.srfparentdename) {
// Object.assign(this.selection, { view: { viewname: refview.viewname }, data: _context, param: _params }); Object.assign(tempContext, { srfparentdename: this.formData.srfparentdename });
// } Object.assign(tempViewParams, { srfparentdename: this.formData.srfparentdename });
// Object.assign(this.selection, item); }
const drItem = {
id: item.id,
navView: item.navView,
srfnavdata: {
context: tempContext,
viewparams: tempViewParams
}
}
this.$emit('selectionchange', drItem);
} }
} }
......
.drtab{ .app-dr-tab {
height:100%; .dr-tab-item {
overflow: auto; cursor: pointer;
.app-dr-tab { padding: 0 16px;
height: 100%; &.is-active,
>.ivu-tabs-bar { &:hover {
margin-bottom: 0px; color: #2d8cf0;
}
>.ivu-tabs-content {
height: calc(100% - 36px);
padding: 0px !important;
.ivu-tabs-tabpane {
height: 100%;
.main-data {
width: 100%;
height: 100%;
} }
&.is-active {
position: relative;
} }
&.is-active::after {
content: '';
width: 100%;
height: 2px;
background: #2d8cf0;
position: absolute;
left: 0px;
bottom: 0px;
} }
} }
} }
// this is less // this is less
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册