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

lab_gzf 部署微服务应用

上级 da6f898b
......@@ -4,8 +4,8 @@ export const PageComponents = {
Vue.component('eamlocation-state-model-line-edit-view', () => import('@pages/location/eamlocation-state-model-line-edit-view/eamlocation-state-model-line-edit-view.vue'));
Vue.component('eamlocation-child-grid-view', () => import('@pages/location/eamlocation-child-grid-view/eamlocation-child-grid-view.vue'));
Vue.component('eamlocation-info-view', () => import('@pages/location/eamlocation-info-view/eamlocation-info-view.vue'));
Vue.component('eamlocation-state-grid-view', () => import('@pages/location/eamlocation-state-grid-view/eamlocation-state-grid-view.vue'));
Vue.component('eamlocation-type-pickup-grid-view', () => import('@pages/location/eamlocation-type-pickup-grid-view/eamlocation-type-pickup-grid-view.vue'));
Vue.component('eamlocation-state-list-exp-view', () => import('@pages/location/eamlocation-state-list-exp-view/eamlocation-state-list-exp-view.vue'));
Vue.component('eamlocation-pickup-view', () => import('@pages/location/eamlocation-pickup-view/eamlocation-pickup-view.vue'));
Vue.component('eamlocation-state-model-line-grid-view', () => import('@pages/location/eamlocation-state-model-line-grid-view/eamlocation-state-model-line-grid-view.vue'));
Vue.component('eamlocation-type-edit-view', () => import('@pages/location/eamlocation-type-edit-view/eamlocation-type-edit-view.vue'));
......@@ -19,7 +19,6 @@ export const PageComponents = {
Vue.component('eamlocation-grid-view', () => import('@pages/location/eamlocation-grid-view/eamlocation-grid-view.vue'));
Vue.component('eamlocation-edit-view', () => import('@pages/location/eamlocation-edit-view/eamlocation-edit-view.vue'));
Vue.component('eamlocation-type-grid-view', () => import('@pages/location/eamlocation-type-grid-view/eamlocation-type-grid-view.vue'));
Vue.component('eamlocation-state-edit-view', () => import('@pages/location/eamlocation-state-edit-view/eamlocation-state-edit-view.vue'));
Vue.component('eamlocation-state-model-grid-view', () => import('@pages/location/eamlocation-state-model-grid-view/eamlocation-state-model-grid-view.vue'));
Vue.component('eamasset-state-edit-view', () => import('@pages/asset/eamasset-state-edit-view/eamasset-state-edit-view.vue'));
Vue.component('eamlocation-state-pickup-grid-view', () => import('@pages/location/eamlocation-state-pickup-grid-view/eamlocation-state-pickup-grid-view.vue'));
......
......@@ -100,32 +100,32 @@ const router = new Router({
component: () => import('@pages/location/eamlocation-info-view/eamlocation-info-view.vue'),
},
{
path: 'eamlocationstates/:eamlocationstate?/gridview/:gridview?',
path: 'eamlocationtypes/:eamlocationtype?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.eamlocationstate.views.gridview.title',
caption: 'entities.eamlocationtype.views.pickupgridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstates', parameterName: 'eamlocationstate' },
{ pathName: 'gridview', parameterName: 'gridview' },
{ pathName: 'eamlocationtypes', parameterName: 'eamlocationtype' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-state-grid-view/eamlocation-state-grid-view.vue'),
component: () => import('@pages/location/eamlocation-type-pickup-grid-view/eamlocation-type-pickup-grid-view.vue'),
},
{
path: 'eamlocationtypes/:eamlocationtype?/pickupgridview/:pickupgridview?',
path: 'eamlocationstates/:eamlocationstate?/listexpview/:listexpview?',
meta: {
caption: 'entities.eamlocationtype.views.pickupgridview.title',
caption: 'entities.eamlocationstate.views.listexpview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationtypes', parameterName: 'eamlocationtype' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
{ pathName: 'eamlocationstates', parameterName: 'eamlocationstate' },
{ pathName: 'listexpview', parameterName: 'listexpview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-type-pickup-grid-view/eamlocation-type-pickup-grid-view.vue'),
component: () => import('@pages/location/eamlocation-state-list-exp-view/eamlocation-state-list-exp-view.vue'),
},
{
path: 'eamlocations/:eamlocation?/pickupview/:pickupview?',
......@@ -309,20 +309,6 @@ const router = new Router({
},
component: () => import('@pages/location/eamlocation-type-grid-view/eamlocation-type-grid-view.vue'),
},
{
path: 'eamlocationstates/:eamlocationstate?/editview/:editview?',
meta: {
caption: 'entities.eamlocationstate.views.editview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstates', parameterName: 'eamlocationstate' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-state-edit-view/eamlocation-state-edit-view.vue'),
},
{
path: 'eamlocationstatemodels/:eamlocationstatemodel?/gridview/:gridview?',
meta: {
......
import { Subject } from 'rxjs';
import { ListExpViewBase } from '@/studio-core';
import EAMLocationStateService from '@/service/eamlocation-state/eamlocation-state-service';
import EAMLocationStateAuthService from '@/authservice/eamlocation-state/eamlocation-state-auth-service';
import ListExpViewEngine from '@engine/view/list-exp-view-engine';
import EAMLocationStateUIService from '@/uiservice/eamlocation-state/eamlocation-state-ui-service';
/**
* 功能位置状态列表导航视图视图基类
*
* @export
* @class EAMLocationStateListExpViewBase
* @extends {ListExpViewBase}
*/
export class EAMLocationStateListExpViewBase extends ListExpViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMLocationStateListExpViewBase
*/
protected appDeName: string = 'eamlocationstate';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMLocationStateListExpViewBase
*/
protected appDeKey: string = 'eamlocationstateid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMLocationStateListExpViewBase
*/
protected appDeMajor: string = 'eamlocationstatename';
/**
* 实体服务对象
*
* @type {EAMLocationStateService}
* @memberof EAMLocationStateListExpViewBase
*/
protected appEntityService: EAMLocationStateService = new EAMLocationStateService;
/**
* 实体权限服务对象
*
* @type EAMLocationStateUIService
* @memberof EAMLocationStateListExpViewBase
*/
public appUIService: EAMLocationStateUIService = new EAMLocationStateUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMLocationStateListExpViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMLocationStateListExpViewBase
*/
protected model: any = {
srfCaption: 'entities.eamlocationstate.views.listexpview.caption',
srfTitle: 'entities.eamlocationstate.views.listexpview.title',
srfSubTitle: 'entities.eamlocationstate.views.listexpview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMLocationStateListExpViewBase
*/
protected containerModel: any = {
view_listexpbar: { name: 'listexpbar', type: 'LISTEXPBAR' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'a3d6a9a21765dd59afa2d3d20a99096c';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMLocationStateListExpViewBase
*/
public engine: ListExpViewEngine = new ListExpViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMLocationStateListExpViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
listexpbar: this.$refs.listexpbar,
keyPSDEField: 'eamlocationstate',
majorPSDEField: 'eamlocationstatename',
isLoadDefault: true,
});
}
/**
* listexpbar 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationStateListExpViewBase
*/
public listexpbar_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('listexpbar', 'selectionchange', $event);
}
/**
* listexpbar 部件 activated 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationStateListExpViewBase
*/
public listexpbar_activated($event: any, $event2?: any): void {
this.engine.onCtrlEvent('listexpbar', 'activated', $event);
}
/**
* listexpbar 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationStateListExpViewBase
*/
public listexpbar_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('listexpbar', 'load', $event);
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMLocationStateListExpView
*/
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
let localContext:any = null;
let localViewParam:any =null;
this.$Notice.warning({ title: '错误', desc: '未指定关系视图' });
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMLocationStateListExpView
*/
public opendata(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) {
this.$Notice.warning({ title: '错误', desc: '未指定关系视图' });
}
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof EAMLocationStateListExpView
*/
protected viewUID: string = 'location-eamlocation-state-list-exp-view';
}
\ No newline at end of file
<studio-view-style2 viewName="eamlocationstatelistexpview" viewTitle="功能位置状态列表导航视图" class='delistexpview eamlocation-state-list-exp-view'>
<view_listexpbar
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
:viewUID="viewUID"
:newdata="newdata"
:opendata="opendata"
name="listexpbar"
ref='listexpbar'
@selectionchange="listexpbar_selectionchange($event)"
@activated="listexpbar_activated($event)"
@load="listexpbar_load($event)"
@closeview="closeView($event)">
</view_listexpbar>
</studio-view-style2>
\ No newline at end of file
<template src="./eamlocation-state-list-exp-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMLocationStateListExpViewBase } from './eamlocation-state-list-exp-view-base';
import view_listexpbar from '@widgets/eamlocation-state/list-exp-viewlistexpbar-listexpbar/list-exp-viewlistexpbar-listexpbar.vue';
/**
* 功能位置状态列表导航视图视图
*
* @export
* @class EAMLocationStateListExpView
* @extends {EAMLocationStateListExpViewBase}
*/
@Component({
components: {
view_listexpbar,
}
})
@VueLifeCycleProcessing()
export default class EAMLocationStateListExpView extends EAMLocationStateListExpViewBase { }
</script>
......@@ -13,15 +13,6 @@ export const viewstate: any = {
'251816f09cb8f040c9309992cf957370',
],
},
{
viewtag: '0b6fa9e6ebc1f6d1afaf3c19585840b0',
viewmodule: 'Location',
viewname: 'EAMLocationStateEditView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '1769804cd7ab51624ac3c88c2090363b',
viewmodule: 'Location',
......@@ -111,6 +102,16 @@ export const viewstate: any = {
'7bf1327f579d782d5cdb98528999a5e0',
],
},
{
viewtag: 'a3d6a9a21765dd59afa2d3d20a99096c',
viewmodule: 'Location',
viewname: 'EAMLocationStateListExpView',
viewaction: '',
viewdatachange: false,
refviews: [
'7bf1327f579d782d5cdb98528999a5e0',
],
},
{
viewtag: 'a82c591e524f7289432a30a5ccfa8908',
viewmodule: 'Location',
......@@ -200,7 +201,7 @@ export const viewstate: any = {
'00fcbd6336b5d40a31a2c3d5c346d16c',
'eee617336f6dc6e5e97835d6309fd452',
'4c95ec14aa2de5370d9d81f7d85f4bd5',
'f7c04762f2a3e3026c909e6191a0998f',
'a3d6a9a21765dd59afa2d3d20a99096c',
'9e9b3600ba892d31757bacef1dcc9458',
],
},
......@@ -246,16 +247,6 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: 'f7c04762f2a3e3026c909e6191a0998f',
viewmodule: 'Location',
viewname: 'EAMLocationStateGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'0b6fa9e6ebc1f6d1afaf3c19585840b0',
],
},
],
createdviews: [],
}
\ No newline at end of file
......@@ -116,7 +116,7 @@ export class AppIndexViewBase extends Vue {
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'eamlocationstates', parameterName: 'eamlocationstate' },
{ pathName: 'gridview', parameterName: 'gridview' },
{ pathName: 'listexpview', parameterName: 'listexpview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.fullPath,path)){
......
......@@ -107,7 +107,7 @@ export default class AppIndexViewModel {
textcls: '',
appfunctag: '_4',
appfuncyype: 'APPVIEW',
viewname: 'eamlocation-state-grid-view',
viewname: 'eamlocation-state-list-exp-view',
resourcetag: '',
}
,
......@@ -329,12 +329,12 @@ export default class AppIndexViewModel {
appfunctag: '_4',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'eamlocationstategridview',
codename: 'eamlocationstatelistexpview',
deResParameters: [],
routepath: '/appindexview/:appindexview?/eamlocationstates/:eamlocationstate?/gridview/:gridview?',
routepath: '/appindexview/:appindexview?/eamlocationstates/:eamlocationstate?/listexpview/:listexpview?',
parameters: [
{ pathName: 'eamlocationstates', parameterName: 'eamlocationstate' },
{ pathName: 'gridview', parameterName: 'gridview' },
{ pathName: 'listexpview', parameterName: 'listexpview' },
],
},
{
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, ListControlBase } from '@/studio-core';
import EAMLocationStateService from '@/service/eamlocation-state/eamlocation-state-service';
import ExpListService from './exp-list-list-service';
import EAMLocationStateUIService from '@/uiservice/eamlocation-state/eamlocation-state-ui-service';
/**
* listexpbar_list部件基类
*
* @export
* @class ListControlBase
* @extends {ExpListListBase}
*/
export class ExpListListBase extends ListControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof ExpListListBase
*/
protected controlType: string = 'LIST';
/**
* 建构部件服务对象
*
* @type {ExpListService}
* @memberof ExpListListBase
*/
public service: ExpListService = new ExpListService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMLocationStateService}
* @memberof ExpListListBase
*/
public appEntityService: EAMLocationStateService = new EAMLocationStateService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof ExpListListBase
*/
protected appDeName: string = 'eamlocationstate';
/**
* 分页条数
*
* @type {number}
* @memberof ExpListListBase
*/
public limit: number = 1000;
/**
* 排序方向
*
* @type {string}
* @memberof ExpListListBase
*/
public minorSortDir: string = '';
}
\ No newline at end of file
/**
* ExpList 部件模型
*
* @export
* @class ExpListModel
*/
export default class ExpListModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ExpListListexpbar_listMode
*/
public getDataItems(): any[] {
return [
{
name: 'eamlocationstatename',
},
{
name: 'eamlocationstateid',
},
{
name:'size',
prop:'size'
},
{
name:'query',
prop:'query'
},
{
name:'sort',
prop:'sort'
},
{
name:'page',
prop:'page'
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import EAMLocationStateService from '@/service/eamlocation-state/eamlocation-state-service';
import ExpListModel from './exp-list-list-model';
/**
* ExpList 部件服务对象
*
* @export
* @class ExpListService
*/
export default class ExpListService extends ControlService {
/**
* 功能位置状态服务对象
*
* @type {EAMLocationStateService}
* @memberof ExpListService
*/
public appEntityService: EAMLocationStateService = new EAMLocationStateService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof ExpListService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of ExpListService.
*
* @param {*} [opts={}]
* @memberof ExpListService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new ExpListModel();
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ExpListService
*/
@Errorlog
public search(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.FetchDefault(Context,Data, isloading);
}
result.then(async (response) => {
await this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ExpListService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.remove(Context,Data , isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ExpListService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ExpListService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Data,Context,isloading);
}else{
result =_appEntityService.Update(Data,Context,isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
}
\ No newline at end of file
<div :class="['app-list', this.items.length > 0 ? '' : 'app-list-empty' ]">
<div v-if="items.length > 0" style="height:100%;">
<div v-for = "item in items" :key="item.srfkey" :class="['app-list-item', {'isSelect': item.isselected === true ? true : false}]" @click="handleClick(item)" @dblclick="handleDblClick(item)">
<layout_listexpbar_list_itempanel
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:parentRef="_self"
:inputData="item"
@panelDataChange="($event)=>{onPanelDataChange(item,$event)}"
name="listexpbar_list_itempanel"
ref='listexpbar_list_itempanel'>
</layout_listexpbar_list_itempanel>
</div>
</div>
<div v-else>
{{ $t('app.commonWords.noData') }}
</div>
</div>
\ No newline at end of file
<template src="./exp-list-list.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { ExpListListBase } from './exp-list-list-base';
import layout_listexpbar_list_itempanel from '@widgets/eamlocation-state/list-exp-panel-panel/list-exp-panel-panel.vue';
/**
* listexpbar_list部件
*
* @export
* @class ExpListList
* @extends {ExpListListBase}
*/
@Component({
components: {
layout_listexpbar_list_itempanel,
}
})
@VueLifeCycleProcessing()
export default class ExpListList extends ExpListListBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, PanelControlBase } from '@/studio-core';
import EAMLocationStateService from '@/service/eamlocation-state/eamlocation-state-service';
import ListExpPanelService from './list-exp-panel-panel-service';
import EAMLocationStateUIService from '@/uiservice/eamlocation-state/eamlocation-state-ui-service';
import { FormItemModel } from '@/model/form-detail';
import ListExpPanelModel from './list-exp-panel-panel-model';
import CodeListService from "@service/app/codelist-service";
/**
* listexpbar_list_itempanel部件基类
*
* @export
* @class PanelControlBase
* @extends {ListExpPanelPanelBase}
*/
export class ListExpPanelPanelBase extends PanelControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof ListExpPanelPanelBase
*/
protected controlType: string = 'PANEL';
/**
* 建构部件服务对象
*
* @type {ListExpPanelService}
* @memberof ListExpPanelPanelBase
*/
public service: ListExpPanelService = new ListExpPanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMLocationStateService}
* @memberof ListExpPanelPanelBase
*/
public appEntityService: EAMLocationStateService = new EAMLocationStateService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof ListExpPanelPanelBase
*/
protected appDeName: string = 'eamlocationstate';
/**
* 详情模型集合
*
* @type {*}
* @memberof ListExpPanel
*/
public detailsModel: any = {
eamlocationstateid: new FormItemModel({ visible: true, disabled: false, enableCond: 3 }),
eamlocationstatename: new FormItemModel({ visible: true, disabled: false, enableCond: 3 }),
};
/**
* 面板逻辑
*
* @public
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof ListExpPanel
*/
public panelLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
}
/**
* 数据模型对象
*
* @type {ListExpPanelModel}
* @memberof ListExpPanel
*/
public dataModel: ListExpPanelModel = new ListExpPanelModel();
/**
* 界面行为
*
* @param {*} row
* @param {*} tag
* @param {*} $event
* @memberof ListExpPanel
*/
public async uiAction(row: any, tag: any, $event: any) {
await this.computePanelData();
}
}
\ No newline at end of file
/**
* ListExpPanel 部件模型
*
* @export
* @class ListExpPanelModel
*/
export default class ListExpPanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ListExpPanelModel
*/
public getDataItems(): any[] {
return [
{
name: 'eamlocationstateid',
prop: 'eamlocationstateid'
},
{
name: 'eamlocationstatename',
prop: 'eamlocationstatename'
}
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* ListExpPanel 部件服务对象
*
* @export
* @class ListExpPanelService
*/
export default class ListExpPanelService extends ControlService {
}
\ No newline at end of file
<div class='panel-container' style="">
<row class="app-layoutpanel" style="height:100%;">
<i-col v-show="detailsModel.eamlocationstateid.visible" style="font-size:20px" class="app-layoutpanel-field list-label-style">
<div class="item-field">
<div class="item-field-content">
<app-span :value="data.eamlocationstateid" name="eamlocationstateid" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""> </app-span>
</div>
</div>
</i-col>
<i-col v-show="detailsModel.eamlocationstatename.visible" style="" class="app-layoutpanel-field">
<div class="item-field">
<div class="item-field-content">
<app-span :value="data.eamlocationstatename" name="eamlocationstatename" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""> </app-span>
</div>
</div>
</i-col>
</row>
</div>
\ No newline at end of file
<template src="./list-exp-panel-panel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { ListExpPanelPanelBase } from './list-exp-panel-panel-base';
/**
* listexpbar_list_itempanel部件
*
* @export
* @class ListExpPanelPanel
* @extends {ListExpPanelPanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class ListExpPanelPanel extends ListExpPanelPanelBase { }
</script>
<style lang='less'>
@import './list-exp-panel-panel.less';
</style>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import EAMLocationStateService from '@/service/eamlocation-state/eamlocation-state-service';
import ListExpViewlistexpbarService from './list-exp-viewlistexpbar-listexpbar-service';
import EAMLocationStateUIService from '@/uiservice/eamlocation-state/eamlocation-state-ui-service';
/**
* listexpbar部件基类
*
* @export
* @class MainControlBase
* @extends {ListExpViewlistexpbarListexpbarBase}
*/
export class ListExpViewlistexpbarListexpbarBase extends MainControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof ListExpViewlistexpbarListexpbarBase
*/
protected controlType: string = 'LISTEXPBAR';
/**
* 建构部件服务对象
*
* @type {ListExpViewlistexpbarService}
* @memberof ListExpViewlistexpbarListexpbarBase
*/
public service: ListExpViewlistexpbarService = new ListExpViewlistexpbarService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMLocationStateService}
* @memberof ListExpViewlistexpbarListexpbarBase
*/
public appEntityService: EAMLocationStateService = new EAMLocationStateService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof ListExpViewlistexpbarListexpbarBase
*/
protected appDeName: string = 'eamlocationstate';
/**
* listexpbar_list 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof ListExpViewlistexpbarListexpbarBase
*/
public listexpbar_list_selectionchange($event: any, $event2?: any) {
this.listexpbar_selectionchange($event, 'listexpbar_list', $event2);
}
/**
* listexpbar_list 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof ListExpViewlistexpbarListexpbarBase
*/
public listexpbar_list_load($event: any, $event2?: any) {
this.listexpbar_load($event, 'listexpbar_list', $event2);
}
/**
* 打开新建数据视图
*
* @type {any}
* @memberof ListExpViewlistexpbarBase
*/
@Prop() public newdata: any;
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof ListExpViewlistexpbarBase
*/
@Prop() public opendata: any;
/**
* 视图唯一标识
*
* @type {boolean}
* @memberof ListExpViewlistexpbarBase
*/
@Prop() public viewUID!:string;
/**
* 是否单选
*
* @public
* @type {(boolean)}
* @memberof ListExpViewlistexpbarBase
*/
public isSingleSelect:boolean = true;
/**
* 呈现模式,可选值:horizontal或者vertical
*
* @public
* @type {(string)}
* @memberof ListExpViewlistexpbarBase
*/
public showMode:string ="horizontal";
/**
* 控件宽度
*
* @type {number}
* @memberof ListExpViewlistexpbarBase
*/
public ctrlWidth:number = 0;
/**
* 控件高度
*
* @type {number}
* @memberof ListExpViewlistexpbarBase
*/
public ctrlHeight: number = 0;
/**
* 搜素值
*
* @public
* @type {(string)}
* @memberof ListExpViewlistexpbarBase
*/
public searchText:string = "";
/**
* 分割宽度
*
* @type {number}
* @memberof ListExpViewlistexpbarBase
*/
public split: number = 0.2;
/**
* 导航视图名称
*
* @type {string}
* @memberof ListExpViewlistexpbarBase
*/
public navViewName: string = "eamlocation-state-model-edit-view";
/**
* 导航视图参数
*
* @type {string}
* @memberof ListExpViewlistexpbarBase
*/
public navViewParam: string = '{}';
/**
* 导航过滤项
*
* @type {string}
* @memberof ListExpViewlistexpbarBase
*/
public navFilter: string = "";
/**
* 导航关系
*
* @type {string}
* @memberof ListExpViewlistexpbarBase
*/
public navPSDer: string = "";
/**
* 导航上下文参数
*
* @type {*}
* @memberof ListExpViewlistexpbarBase
*/
public navigateContext:any = null;
/**
* 导航视图参数
*
* @type {*}
* @memberof ListExpViewlistexpbarBase
*/
public navigateParams:any = null;
/**
* 显示处理提示
*
* @type {boolean}
* @memberof ListExpViewlistexpbarBase
*/
@Prop({ default: true }) public showBusyIndicator!: boolean;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof ListExpViewlistexpbarBase
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof ListExpViewlistexpbarBase
*/
public getData(): any {
return null;
}
/**
* 选中数据
*
* @type {*}
* @memberof ListExpViewlistexpbarBase
*/
public selection: any = {};
/**
* split值变化事件
*
* @memberof ListExpViewlistexpbarBase
*/
public onSplitChange() {
if(this.split){
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/**
* Vue声明周期(组件初始化完毕)
*
* @memberof ListExpViewlistexpbarBase
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof ListExpViewlistexpbarBase
*/
public afterCreated(){
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
this.viewState.next({ tag: 'listexpbar_list', action: action, data: data });
});
}
}
/**
* 执行mounted后的逻辑
*
* @memberof ListExpViewlistexpbarBase
*/
public afterMounted(){
if(this.$store.getters.getViewSplit(this.viewUID)){
this.split = this.$store.getters.getViewSplit(this.viewUID);
}else{
let containerWidth:number = (document.getElementById("listexpviewlistexpbar") as any).offsetWidth;
let containerHeight:number = (document.getElementById("listexpviewlistexpbar") as any).offsetHeight;
if(Object.is(this.showMode,'horizontal')){
if(this.ctrlWidth){
this.split = this.ctrlWidth/containerWidth;
}
}else{
if(this.ctrlHeight){
this.split = this.ctrlHeight/containerHeight;
}
}
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/**
* Vue声明周期(组件渲染完毕)
*
* @memberof ListExpViewlistexpbarBase
*/
public mounted() {
this.afterMounted();
}
/**
* vue 生命周期
*
* @memberof ListExpViewlistexpbarBase
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof ListExpViewlistexpbarBase
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
/**
* listexpbar的选中数据事件
*
* @memberof ListExpViewlistexpbarBase
*/
public listexpbar_selectionchange(args: any [], tag?: string, $event2?: any): void {
let tempContext:any = {};
let tempViewParam:any = {};
if (args.length === 0) {
return ;
}
const arg:any = args[0];
if(this.context){
Object.assign(tempContext,JSON.parse(JSON.stringify(this.context)));
}
Object.assign(tempContext,{'eamlocationstate':arg['eamlocationstate']});
Object.assign(tempContext,{srfparentdename:'EAMLocationState',srfparentkey:arg['eamlocationstate']});
if(this.navFilter && !Object.is(this.navFilter,"")){
Object.assign(tempViewParam,{[this.navFilter]:arg['eamlocationstate']});
}
if(this.navPSDer && !Object.is(this.navPSDer,"")){
Object.assign(tempViewParam,{[this.navPSDer]:arg['eamlocationstate']});
}
if(this.navigateContext && Object.keys(this.navigateContext).length >0){
let _context:any = this.$util.computedNavData(arg,tempContext,tempViewParam,this.navigateContext);
Object.assign(tempContext,_context);
}
if(this.navigateParams && Object.keys(this.navigateParams).length >0){
let _params:any = this.$util.computedNavData(arg,tempContext,tempViewParam,this.navigateParams);
Object.assign(tempViewParam,_params);
}
this.selection = {};
Object.assign(this.selection, { view: { viewname: this.navViewName },context:tempContext,viewparam:tempViewParam});
this.$forceUpdate();
}
/**
* listexpbar的load完成事件
*
* @memberof ListExpViewlistexpbarBase
*/
public listexpbar_load(args:any, tag?: string, $event2?: any){
this.$emit('load',args);
}
/**
* 执行搜索
*
* @memberof ListExpViewlistexpbarBase
*/
public onSearch($event:any) {
this.viewState.next({ tag: 'listexpbar_list', action: "load", data: {query : this.searchText}});
}
}
\ No newline at end of file
/**
* ListExpViewlistexpbar 部件模型
*
* @export
* @class ListExpViewlistexpbarModel
*/
export default class ListExpViewlistexpbarModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ListExpViewlistexpbarListexpbarMode
*/
public getDataItems(): any[] {
return [
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import EAMLocationStateService from '@/service/eamlocation-state/eamlocation-state-service';
import ListExpViewlistexpbarModel from './list-exp-viewlistexpbar-listexpbar-model';
/**
* ListExpViewlistexpbar 部件服务对象
*
* @export
* @class ListExpViewlistexpbarService
*/
export default class ListExpViewlistexpbarService extends ControlService {
/**
* 功能位置状态服务对象
*
* @type {EAMLocationStateService}
* @memberof ListExpViewlistexpbarService
*/
public appEntityService: EAMLocationStateService = new EAMLocationStateService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof ListExpViewlistexpbarService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of ListExpViewlistexpbarService.
*
* @param {*} [opts={}]
* @memberof ListExpViewlistexpbarService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new ListExpViewlistexpbarModel();
}
}
\ No newline at end of file
<split id="listexpviewlistexpbar" class="app-list-exp-bar show-title-bar" v-model="split" mode="horizontal" @on-move-end="onSplitChange.apply(_self, arguments)">
<template slot='left'>
<div class='list-exp-bar-header'>
{{$t('app.listExpBar.title')}}
</div>
<div class="container-header">
</div>
<div class='list-exp-bar-content'>
<view_listexpbar_list
:viewState="viewState"
:viewparams="viewparams"
:context="context"
createAction="Create"
removeAction="Remove"
updateAction="Update"
fetchAction="FetchDefault"
:showBusyIndicator="true"
:isSelectFirstDefault="true"
:newdata="newdata"
:opendata="opendata"
name="listexpbar_list"
ref='listexpbar_list'
@selectionchange="listexpbar_list_selectionchange($event)"
@load="listexpbar_list_load($event)"
@closeview="closeView($event)">
</view_listexpbar_list>
</div>
</template>
<template 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>
</template>
</split>
<template src="./list-exp-viewlistexpbar-listexpbar.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { ListExpViewlistexpbarListexpbarBase } from './list-exp-viewlistexpbar-listexpbar-base';
import view_listexpbar_list from '@widgets/eamlocation-state/exp-list-list/exp-list-list.vue';
/**
* listexpbar部件
*
* @export
* @class ListExpViewlistexpbarListexpbar
* @extends {ListExpViewlistexpbarListexpbarBase}
*/
@Component({
components: {
view_listexpbar_list,
}
})
@VueLifeCycleProcessing()
export default class ListExpViewlistexpbarListexpbar extends ListExpViewlistexpbarListexpbarBase { }
</script>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册