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

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

上级 9149966b
...@@ -215,6 +215,8 @@ export default class AppLoginButton extends Vue { ...@@ -215,6 +215,8 @@ export default class AppLoginButton extends Vue {
const layoutModel = this.layoutModelDetails[this.itemName]; const layoutModel = this.layoutModelDetails[this.itemName];
if (layoutModel) { if (layoutModel) {
return layoutModel.iconAlign || 'LEFT'; return layoutModel.iconAlign || 'LEFT';
}else{
return 'LEFT';
} }
} }
...@@ -227,6 +229,8 @@ export default class AppLoginButton extends Vue { ...@@ -227,6 +229,8 @@ export default class AppLoginButton extends Vue {
const layoutModel = this.layoutModelDetails[this.itemName]; const layoutModel = this.layoutModelDetails[this.itemName];
if (layoutModel) { if (layoutModel) {
return Object.is(layoutModel.buttonStyle, 'INVERSE'); return Object.is(layoutModel.buttonStyle, 'INVERSE');
}else{
return false;
} }
} }
......
...@@ -114,7 +114,7 @@ export default class AppScrollContainer extends Vue { ...@@ -114,7 +114,7 @@ export default class AppScrollContainer extends Vue {
*/ */
get curStyle() { get curStyle() {
const layoutModel = this.layoutModelDetails[this.itemName]; const layoutModel = this.layoutModelDetails[this.itemName];
if(layoutModel){ if (layoutModel) {
return layoutModel.getElementStyle(); return layoutModel.getElementStyle();
} }
} }
...@@ -124,7 +124,7 @@ export default class AppScrollContainer extends Vue { ...@@ -124,7 +124,7 @@ export default class AppScrollContainer extends Vue {
*/ */
public getItemPosStyle(name: string) { public getItemPosStyle(name: string) {
const layoutModel = this.layoutModelDetails[this.itemName]; const layoutModel = this.layoutModelDetails[this.itemName];
if(layoutModel){ if (layoutModel) {
return layoutModel.getBorderLayoutStyle(); return layoutModel.getBorderLayoutStyle();
} }
} }
...@@ -137,28 +137,37 @@ export default class AppScrollContainer extends Vue { ...@@ -137,28 +137,37 @@ export default class AppScrollContainer extends Vue {
public initScrollContainer() { public initScrollContainer() {
let minusHeight = ''; let minusHeight = '';
let minusWidth: string = ''; let minusWidth: string = '';
this.containerModel = {};
const curLayoutModel = this.layoutModelDetails[this.itemName]; const curLayoutModel = this.layoutModelDetails[this.itemName];
if (curLayoutModel && curLayoutModel.details && curLayoutModel.details.length > 0) { if (curLayoutModel && curLayoutModel.details && curLayoutModel.details.length > 0) {
curLayoutModel.details.forEach((key: string) => { curLayoutModel.details.forEach((key: string) => {
const { name, layoutWidth, widthMode, layoutHeight, heightMode, layoutPos } = this.layoutModelDetails[key]; let childModelDetail: any;
const style = {}; if (this.index) {
if (layoutWidth) { childModelDetail = this.layoutModelDetails[`${key}_${this.index}`];
Object.assign(style, { width: Util.getBoxSize('WIDTH', widthMode, layoutWidth).width }); } else {
if (layoutPos && (Object.is(layoutPos, 'WEST') || Object.is(layoutPos, 'EAST'))) { childModelDetail = this.layoutModelDetails[key];
minusWidth += ` - ${Util.getBoxSize('WIDTH', widthMode, layoutWidth).width}`;
}
} }
if (layoutHeight) { if (childModelDetail) {
Object.assign(style, { height: Util.getBoxSize('HEIGHT', heightMode, layoutHeight).height }); const { name, layoutWidth, widthMode, layoutHeight, heightMode, layoutPos } = childModelDetail;
if (layoutPos && (Object.is(layoutPos, 'NORTH') || Object.is(layoutPos, 'SOUTH'))) { const style = {};
minusHeight += ` - ${Util.getBoxSize('HEIGHT', heightMode, layoutHeight).height}`; if (layoutWidth) {
Object.assign(style, { width: Util.getBoxSize('WIDTH', widthMode, layoutWidth).width });
if (layoutPos && (Object.is(layoutPos, 'WEST') || Object.is(layoutPos, 'EAST'))) {
minusWidth += ` - ${Util.getBoxSize('WIDTH', widthMode, layoutWidth).width}`;
}
}
if (layoutHeight) {
Object.assign(style, { height: Util.getBoxSize('HEIGHT', heightMode, layoutHeight).height });
if (layoutPos && (Object.is(layoutPos, 'NORTH') || Object.is(layoutPos, 'SOUTH'))) {
minusHeight += ` - ${Util.getBoxSize('HEIGHT', heightMode, layoutHeight).height}`;
}
}
if (this.containerModel.hasOwnProperty(layoutPos)) {
Object.assign(this.containerModel[layoutPos], { style });
this.containerModel[layoutPos].name.push(name);
} else {
this.containerModel[layoutPos] = { style, name: [name] };
} }
}
if (this.containerModel.hasOwnProperty(layoutPos)) {
Object.assign(this.containerModel[layoutPos], { style });
this.containerModel[layoutPos].name.push(name);
} else {
this.containerModel[layoutPos] = { style, name: [name] };
} }
}); });
} }
......
...@@ -70,6 +70,7 @@ export default class AppSimpleFlexContainer extends Vue { ...@@ -70,6 +70,7 @@ export default class AppSimpleFlexContainer extends Vue {
* @memberof SimpleFlexContainer * @memberof SimpleFlexContainer
*/ */
public initSimpleFlexContainer() { public initSimpleFlexContainer() {
this.containerModel = [];
const curLayoutModel = this.layoutModelDetails[this.itemName]; const curLayoutModel = this.layoutModelDetails[this.itemName];
if (curLayoutModel && curLayoutModel.details && curLayoutModel.details.length > 0) { if (curLayoutModel && curLayoutModel.details && curLayoutModel.details.length > 0) {
curLayoutModel.details.forEach((key: string) => { curLayoutModel.details.forEach((key: string) => {
......
...@@ -70,6 +70,7 @@ export default class AppStandardContainer extends Vue { ...@@ -70,6 +70,7 @@ export default class AppStandardContainer extends Vue {
* @memberof AppStandardContainer * @memberof AppStandardContainer
*/ */
public initStandardContainer() { public initStandardContainer() {
this.containerModel = [];
const curLayoutModel = this.layoutModelDetails[this.itemName]; const curLayoutModel = this.layoutModelDetails[this.itemName];
if (curLayoutModel && curLayoutModel.details && curLayoutModel.details.length > 0) { if (curLayoutModel && curLayoutModel.details && curLayoutModel.details.length > 0) {
curLayoutModel.details.forEach((key: string) => { curLayoutModel.details.forEach((key: string) => {
......
...@@ -78,6 +78,7 @@ export default class AppTabPage extends Vue { ...@@ -78,6 +78,7 @@ export default class AppTabPage extends Vue {
* @memberof AppTabPage * @memberof AppTabPage
*/ */
public initTabPage() { public initTabPage() {
this.containerModel = [];
const layoutModel = this.layoutModelDetails[this.itemName]; const layoutModel = this.layoutModelDetails[this.itemName];
if (layoutModel && layoutModel.details && layoutModel.details.length > 0) { if (layoutModel && layoutModel.details && layoutModel.details.length > 0) {
this.currentLayoutModel = layoutModel; this.currentLayoutModel = layoutModel;
......
...@@ -77,6 +77,7 @@ export default class AppTabPanel extends Vue { ...@@ -77,6 +77,7 @@ export default class AppTabPanel extends Vue {
* @memberof AppTabPanel * @memberof AppTabPanel
*/ */
public initTabPanel() { public initTabPanel() {
this.containerModel = [];
const layoutModel = this.layoutModelDetails[this.itemName]; const layoutModel = this.layoutModelDetails[this.itemName];
if (layoutModel && layoutModel.details && layoutModel.details.length > 0) { if (layoutModel && layoutModel.details && layoutModel.details.length > 0) {
layoutModel.details.forEach((key: string) => { layoutModel.details.forEach((key: string) => {
......
...@@ -1800,7 +1800,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1800,7 +1800,7 @@ export default class MainBase 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: 'IBIZBOOKOptionView_layout' + (this.$t('app.formpage.notconfig.loadaction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKOptionView' + (this.$t('app.formpage.notconfig.loadaction') as string) });
return; return;
} }
const arg: any = { ...opt }; const arg: any = { ...opt };
...@@ -1835,7 +1835,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1835,7 +1835,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public loadDraft(opt: any = {}): void { public loadDraft(opt: any = {}): void {
if(!this.loaddraftAction){ if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKOptionView_layout' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKOptionView' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
return; return;
} }
const arg: any = { ...opt } ; const arg: any = { ...opt } ;
...@@ -1897,7 +1897,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1897,7 +1897,7 @@ export default class MainBase extends Vue implements ControlInterface {
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction; const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){ if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction"; let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKOptionView_layout' + (this.$t('app.formpage.notconfig.actionname') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKOptionView' + (this.$t('app.formpage.notconfig.actionname') as string) });
return; return;
} }
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
...@@ -2005,7 +2005,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -2005,7 +2005,7 @@ export default class MainBase extends Vue implements ControlInterface {
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction; const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){ if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction"; let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKOptionView_layout' + (this.$t('app.formpage.notconfig.actionname') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKOptionView' + (this.$t('app.formpage.notconfig.actionname') as string) });
return; return;
} }
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
...@@ -2082,7 +2082,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -2082,7 +2082,7 @@ export default class MainBase extends Vue implements ControlInterface {
public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> { public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
if(!this.removeAction){ if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKOptionView_layout' + (this.$t('app.formpage.notconfig.removeaction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKOptionView' + (this.$t('app.formpage.notconfig.removeaction') as string) });
return; return;
} }
const arg: any = opt[0]; const arg: any = opt[0];
......
...@@ -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: 'IBIZBOOKCalendarView' + (this.$t('app.searchForm.notConfig.loadAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKListView' + (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: 'IBIZBOOKCalendarView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKListView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return; return;
} }
const arg: any = { ...opt } ; const arg: any = { ...opt } ;
......
...@@ -522,7 +522,7 @@ export default class ListExpBase extends Vue implements ControlInterface { ...@@ -522,7 +522,7 @@ export default class ListExpBase extends Vue implements ControlInterface {
*/ */
public load(opt: any = {}): void { public load(opt: any = {}): void {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderListExpView_layout' + (this.$t('app.list.notConfig.fetchAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderListExpView' + (this.$t('app.list.notConfig.fetchAction') as string) });
return; return;
} }
const arg: any = {...opt}; const arg: any = {...opt};
...@@ -638,7 +638,7 @@ export default class ListExpBase extends Vue implements ControlInterface { ...@@ -638,7 +638,7 @@ export default class ListExpBase 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: 'IBIZOrderListExpView_layout' + (this.$t('app.list.notConfig.removeAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderListExpView' + (this.$t('app.list.notConfig.removeAction') as string) });
return; return;
} }
if (datas.length === 0) { if (datas.length === 0) {
...@@ -733,7 +733,7 @@ export default class ListExpBase extends Vue implements ControlInterface { ...@@ -733,7 +733,7 @@ export default class ListExpBase 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: 'IBIZOrderListExpView_layout' + (this.$t('app.list.notConfig.createAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderListExpView' + (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);
...@@ -741,7 +741,7 @@ export default class ListExpBase extends Vue implements ControlInterface { ...@@ -741,7 +741,7 @@ export default class ListExpBase 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.warning') as string), desc: 'IBIZOrderListExpView_layout' + (this.$t('app.list.notConfig.updateAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.warning') as string), desc: 'IBIZOrderListExpView' + (this.$t('app.list.notConfig.updateAction') as string) });
}else{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
if(item.ibizorder){ if(item.ibizorder){
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册