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

xignzi006 部署微服务应用

上级 b7aff298
[
{
"srfkey": "SysOperator",
"emptytext": "未定义",
"codelisttype":"dynamic",
"appdataentity":"",
"appdedataset":"",
"items": []
},
{
"srfkey": "YesNo",
"emptytext": "未定义",
"codelisttype":"static",
......
......@@ -120,7 +120,7 @@
"memo": "系统自动添加"
},
"eamlocationeditview": {
"title": "功能位置信息",
"title": "功能位置编辑",
"caption": "功能位置",
"viewtype": "DEEDITVIEW",
"viewmodule": "Location",
......@@ -1138,5 +1138,15 @@
"viewfilename": "eamwotype-edit-view",
"viewtag": "fc86dc7e981c8fcc8533f992bd51ce5c",
"memo": "系统自动添加"
},
"eamlocationquickcreateview": {
"title": "快速新建",
"caption": "功能位置",
"viewtype": "DEOPTVIEW",
"viewmodule": "Location",
"viewname": "EAMLocationQuickCreateView",
"viewfilename": "eamlocation-quick-create-view",
"viewtag": "ffe322f0701bebd0de2fd525d20641c3",
"memo": ""
}
}
\ No newline at end of file
/**
* 代码表--云系统操作者
*
* @export
* @class SysOperator
*/
export default class SysOperator {
/**
* 是否启用缓存
*
* @type boolean
* @memberof SysOperator
*/
public isEnableCache:boolean = true;
/**
* 过期时间
*
* @type any
* @memberof SysOperator
*/
public expirationTime:any;
/**
* 缓存超长时长
*
* @type any
* @memberof SysOperator
*/
public cacheTimeout:any = -1;
/**
* 代码表模型对象
*
* @type any
* @memberof SysOperator
*/
public codelistModel:any = {
codelistid:"SysOperator"
};
/**
* 自定义参数集合
*
* @type any
* @memberof SysOperator
*/
public userParamNames:any ={
}
/**
* 查询参数集合
*
* @type any
* @memberof SysOperator
*/
public queryParamNames:any ={
}
/**
* 获取数据项
*
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysOperator
*/
public getItems(data: any={}, isloading?: boolean): Promise<any> {
return Promise.reject([]);
}
/**
* 处理查询参数
* @param data 传入data
* @memberof SysOperator
*/
public handleQueryParam(data:any){
let tempData:any = data?JSON.parse(JSON.stringify(data)):{};
if(this.userParamNames && Object.keys(this.userParamNames).length >0){
Object.keys(this.userParamNames).forEach((name: string) => {
if (!name) {
return;
}
let value: string | null = this.userParamNames[name];
if (value && value.startsWith('%') && value.endsWith('%')) {
const key = value.substring(1, value.length - 1);
if (this.codelistModel && this.codelistModel.hasOwnProperty(key)) {
value = (this.codelistModel[key] !== null && this.codelistModel[key] !== undefined) ? this.codelistModel[key] : null;
} else {
value = null;
}
}
Object.assign(tempData, { [name]: value });
});
}
Object.assign(tempData,{page: 0, size: 1000});
if(this.queryParamNames && Object.keys(this.queryParamNames).length > 0){
Object.assign(tempData,this.queryParamNames);
}
return tempData;
}
}
export default {
SysOperator: {
"empty": "",
},
YesNo: {
"1": "是",
"0": "否",
......
export default {
SysOperator: {
"empty": "",
},
YesNo: {
"1": "是",
"0": "否",
......
......@@ -23,7 +23,7 @@ export default {
},
editview: {
caption: "功能位置",
title: "功能位置信息",
title: "功能位置编辑",
},
treechildgridview: {
caption: "功能位置",
......@@ -57,6 +57,10 @@ export default {
caption: "功能位置",
title: "功能位置选择表格视图",
},
quickcreateview: {
caption: "功能位置",
title: "快速新建",
},
},
info_main_form: {
details: {
......@@ -103,6 +107,33 @@ export default {
uiactions: {
},
},
ef_001_form: {
details: {
group1: "功能位置基本信息",
formpage1: "基本信息",
group2: "操作信息",
formpage2: "其它",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "功能位置标识",
srfmajortext: "功能位置名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
locationnumber: "功能位置编号",
eamlocationname: "功能位置名称",
eamlocationtypename: "功能位置类型",
createman: "建立人",
createdate: "建立时间",
updateman: "更新人",
updatedate: "更新时间",
eamlocationid: "功能位置标识",
eamlocationtypeid: "功能位置类型标识",
},
uiactions: {
},
},
childgrid_grid: {
columns: {
peamlocationname: "上级位置",
......@@ -234,12 +265,12 @@ export default {
},
},
gridviewtoolbar_toolbar: {
tbitem5: {
caption: "New",
tip: "New",
tbitem12_openquickcreateview: {
caption: "新建",
tip: "新建",
},
seperator1: {
caption: "",
tbitem14: {
caption: "-",
tip: "",
},
tbitem2: {
......
......@@ -22,7 +22,7 @@ export default {
},
editview: {
caption: "功能位置",
title: "功能位置信息",
title: "功能位置编辑",
},
treechildgridview: {
caption: "功能位置",
......@@ -56,6 +56,10 @@ export default {
caption: "功能位置",
title: "功能位置选择表格视图",
},
quickcreateview: {
caption: "功能位置",
title: "快速新建",
},
},
info_main_form: {
details: {
......@@ -102,6 +106,33 @@ export default {
uiactions: {
},
},
ef_001_form: {
details: {
group1: "功能位置基本信息",
formpage1: "基本信息",
group2: "操作信息",
formpage2: "其它",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "功能位置标识",
srfmajortext: "功能位置名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
locationnumber: "功能位置编号",
eamlocationname: "功能位置名称",
eamlocationtypename: "功能位置类型",
createman: "建立人",
createdate: "建立时间",
updateman: "更新人",
updatedate: "更新时间",
eamlocationid: "功能位置标识",
eamlocationtypeid: "功能位置类型标识",
},
uiactions: {
},
},
childgrid_grid: {
columns: {
peamlocationname: "上级位置",
......@@ -233,12 +264,12 @@ export default {
},
},
gridviewtoolbar_toolbar: {
tbitem5: {
tbitem12_openquickcreateview: {
caption: "新建",
tip: "新建",
},
seperator1: {
caption: "",
tbitem14: {
caption: "-",
tip: "",
},
tbitem2: {
......
......@@ -8,6 +8,14 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
let status = MockAdapter.mockStatus(config);
return [status, [
{
"srfkey": "SysOperator",
"emptytext": "未定义",
"codelisttype":"dynamic",
"appdataentity":"",
"appdedataset":"",
"items": []
},
{
srfkey: "YesNo",
emptytext: "未定义",
"codelisttype":"static",
......
......@@ -104,7 +104,7 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewtag": "15caf81deb1f02479030f14d90ce5c3e"
},
"eamlocationeditview": {
"title": "功能位置信息",
"title": "功能位置编辑",
"caption": "功能位置",
"viewtype": "DEEDITVIEW",
"viewmodule": "Location",
......@@ -918,6 +918,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewmodule": "WorkOrder",
"viewname": "EAMWOTypeEditView",
"viewtag": "fc86dc7e981c8fcc8533f992bd51ce5c"
},
"eamlocationquickcreateview": {
"title": "快速新建",
"caption": "功能位置",
"viewtype": "DEOPTVIEW",
"viewmodule": "Location",
"viewname": "EAMLocationQuickCreateView",
"viewtag": "ffe322f0701bebd0de2fd525d20641c3"
}
}];
});
\ No newline at end of file
......@@ -6,6 +6,7 @@ export const PageComponents = {
Vue.component('eamasset-tree-exp-view', () => import('@pages/asset/eamasset-tree-exp-view/eamasset-tree-exp-view.vue'));
Vue.component('eamapply-asset-apply-grid-view', () => import('@pages/apply/eamapply-asset-apply-grid-view/eamapply-asset-apply-grid-view.vue'));
Vue.component('eamlocation-tree-exp-view', () => import('@pages/location/eamlocation-tree-exp-view/eamlocation-tree-exp-view.vue'));
Vue.component('eamlocation-quick-create-view', () => import('@pages/location/eamlocation-quick-create-view/eamlocation-quick-create-view.vue'));
Vue.component('eamservice-level-grid-view', () => import('@pages/work-order/eamservice-level-grid-view/eamservice-level-grid-view.vue'));
Vue.component('eamspare-parts-proparts-pro-grid-view', () => import('@pages/asset/eamspare-parts-proparts-pro-grid-view/eamspare-parts-proparts-pro-grid-view.vue'));
Vue.component('eamlocation-state-model-pickup-grid-view', () => import('@pages/location/eamlocation-state-model-pickup-grid-view/eamlocation-state-model-pickup-grid-view.vue'));
......
......@@ -204,6 +204,20 @@ const router = new Router({
},
component: () => import('@pages/location/eamlocation-tree-exp-view/eamlocation-tree-exp-view.vue'),
},
{
path: 'eamlocations/:eamlocation?/quickcreateview/:quickcreateview?',
meta: {
caption: 'entities.eamlocation.views.quickcreateview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'quickcreateview', parameterName: 'quickcreateview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-quick-create-view/eamlocation-quick-create-view.vue'),
},
{
path: 'eamservicelevels/:eamservicelevel?/gridview/:gridview?',
meta: {
......
......@@ -6,7 +6,7 @@ import EditViewEngine from '@engine/view/edit-view-engine';
import EAMLocationUIService from '@/uiservice/eamlocation/eamlocation-ui-service';
/**
* 功能位置信息视图基类
* 功能位置编辑视图基类
*
* @export
* @class EAMLocationEditViewBase
......
<studio-view-style2 viewName="eamlocationeditview" viewTitle="功能位置信息" class='deeditview eamlocation-edit-view'>
<studio-view-style2 viewName="eamlocationeditview" viewTitle="功能位置编辑" class='deeditview eamlocation-edit-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
......
......@@ -6,7 +6,7 @@ import { EAMLocationEditViewBase } from './eamlocation-edit-view-base';
import view_form from '@widgets/eamlocation/edit-main-form/edit-main-form.vue';
/**
* 功能位置信息视图
* 功能位置编辑视图
*
* @export
* @class EAMLocationEditView
......
......@@ -103,9 +103,9 @@ export class EAMLocationGridViewBase extends GridViewBase {
* @memberof EAMLocationGridView
*/
public toolBarModels: any = {
tbitem5: { name: 'tbitem5', caption: '新建', 'isShowCaption': true, 'isShowIcon': true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'New', target: '', class: '' } },
tbitem12_openquickcreateview: { name: 'tbitem12_openquickcreateview', caption: '新建', 'isShowCaption': true, 'isShowIcon': true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'OpenQuickCreateView', target: 'NONE', class: '' } },
seperator1: { name: 'seperator1', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem14: { name: 'tbitem14', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem2: { name: 'tbitem2', caption: '编辑', 'isShowCaption': true, 'isShowIcon': true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY', class: '' } },
seperator2: { name: 'seperator2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
......@@ -174,8 +174,8 @@ export class EAMLocationGridViewBase extends GridViewBase {
* @memberof EAMLocationGridViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2);
if (Object.is($event.tag, 'tbitem12_openquickcreateview')) {
this.toolbar_tbitem12_openquickcreateview_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem2')) {
this.toolbar_tbitem2_click(null, '', $event2);
......@@ -293,7 +293,7 @@ export class EAMLocationGridViewBase extends GridViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem5_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_tbitem12_openquickcreateview_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -310,7 +310,8 @@ export class EAMLocationGridViewBase extends GridViewBase {
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"EAMLocation");
const curUIService:EAMLocationUIService = new EAMLocationUIService();
curUIService.EAMLocation_OpenQuickCreateView(datas,contextJO, paramJO, $event, xData,this,"EAMLocation");
}
/**
......@@ -551,26 +552,6 @@ export class EAMLocationGridViewBase extends GridViewBase {
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMLocationGridViewBase
*/
public New(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
_this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 编辑
*
......
import { Subject } from 'rxjs';
import { OptionViewBase } from '@/studio-core';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import EAMLocationAuthService from '@/authservice/eamlocation/eamlocation-auth-service';
import OptionViewEngine from '@engine/view/option-view-engine';
import EAMLocationUIService from '@/uiservice/eamlocation/eamlocation-ui-service';
/**
* 快速新建视图基类
*
* @export
* @class EAMLocationQuickCreateViewBase
* @extends {OptionViewBase}
*/
export class EAMLocationQuickCreateViewBase extends OptionViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMLocationQuickCreateViewBase
*/
protected appDeName: string = 'eamlocation';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMLocationQuickCreateViewBase
*/
protected appDeKey: string = 'eamlocationid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMLocationQuickCreateViewBase
*/
protected appDeMajor: string = 'eamlocationname';
/**
* 实体服务对象
*
* @type {EAMLocationService}
* @memberof EAMLocationQuickCreateViewBase
*/
protected appEntityService: EAMLocationService = new EAMLocationService;
/**
* 实体权限服务对象
*
* @type EAMLocationUIService
* @memberof EAMLocationQuickCreateViewBase
*/
public appUIService: EAMLocationUIService = new EAMLocationUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMLocationQuickCreateViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMLocationQuickCreateViewBase
*/
protected model: any = {
srfCaption: 'entities.eamlocation.views.quickcreateview.caption',
srfTitle: 'entities.eamlocation.views.quickcreateview.title',
srfSubTitle: 'entities.eamlocation.views.quickcreateview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMLocationQuickCreateViewBase
*/
protected containerModel: any = {
view_form: { name: 'form', type: 'FORM' },
view_okbtn: { name: 'okbtn', type: 'button', text: '确定', disabled: true },
view_cancelbtn: { name: 'cancelbtn', type: 'button', text: '取消', disabled: false },
view_leftbtn: { name: 'leftbtn', type: 'button', text: '左移', disabled: true },
view_rightbtn: { name: 'rightbtn', type: 'button', text: '右移', disabled: true },
view_allleftbtn: { name: 'allleftbtn', type: 'button', text: '全部左移', disabled: true },
view_allrightbtn: { name: 'allrightbtn', type: 'button', text: '全部右移', disabled: true },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'ffe322f0701bebd0de2fd525d20641c3';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMLocationQuickCreateViewBase
*/
public engine: OptionViewEngine = new OptionViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMLocationQuickCreateViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'eamlocation',
majorPSDEField: 'eamlocationname',
isLoadDefault: true,
});
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationQuickCreateViewBase
*/
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationQuickCreateViewBase
*/
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationQuickCreateViewBase
*/
public form_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'load', $event);
}
}
\ No newline at end of file
<studio-view-style2 viewName="eamlocationquickcreateview" viewTitle="快速新建" class='deoptview eamlocation-quick-create-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<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'
@save="form_save($event)"
@remove="form_remove($event)"
@load="form_load($event)"
@closeview="closeView($event)">
</view_form>
<template slot="footer">
<div class="option-view-footer-actions">
<i-button type='primary' @click="onClickOk.apply(_self, arguments)">{{ containerModel.view_okbtn.text }}</i-button>
&nbsp;&nbsp;
<i-button @click="onClickCancel.apply(_self, arguments)">{{ containerModel.view_cancelbtn.text }}</i-button>
</div>
</template>
</studio-view-style2>
\ No newline at end of file
<template src="./eamlocation-quick-create-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMLocationQuickCreateViewBase } from './eamlocation-quick-create-view-base';
import view_form from '@widgets/eamlocation/ef-001-form/ef-001-form.vue';
/**
* 快速新建视图
*
* @export
* @class EAMLocationQuickCreateView
* @extends {EAMLocationQuickCreateViewBase}
*/
@Component({
components: {
view_form,
}
})
@VueLifeCycleProcessing()
export default class EAMLocationQuickCreateView extends EAMLocationQuickCreateViewBase { }
</script>
import SysOperator from '@/codelist/sys-operator';
import { Store } from 'vuex';
/**
......@@ -49,6 +50,14 @@ export default class CodeListService {
public static codelistCached:Map<string,any> = new Map();
/**
* 代码表--云系统操作者
*
* @type {SysOperator}
* @memberof CodeListService
*/
public SysOperator: SysOperator = new SysOperator();
/**
* 获取动态代码表
*
......
......@@ -1084,6 +1084,7 @@ export const viewstate: any = {
refviews: [
'd3466c5c60a573062d543896976bf68c',
'1769804cd7ab51624ac3c88c2090363b',
'ffe322f0701bebd0de2fd525d20641c3',
],
},
{
......@@ -1162,6 +1163,16 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: 'ffe322f0701bebd0de2fd525d20641c3',
viewmodule: 'Location',
viewname: 'EAMLocationQuickCreateView',
viewaction: '',
viewdatachange: false,
refviews: [
'4a5dd0204cc256862db03b36fc570e71',
],
},
],
createdviews: [],
}
\ No newline at end of file
......@@ -99,6 +99,7 @@ export default class EAMLocationUIServiceBase extends UIService {
this.allViewMap.set(':',{viewname:'infoview',srfappde:'eamlocations'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'eamlocations'});
this.allViewMap.set(':',{viewname:'pickupgridview',srfappde:'eamlocations'});
this.allViewMap.set(':',{viewname:'quickcreateview',srfappde:'eamlocations'});
}
/**
......@@ -117,6 +118,116 @@ export default class EAMLocationUIServiceBase extends UIService {
public initDeMainStateOPPrivsMap(){
}
/**
* 打开主信息界面
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async EAMLocation_OpenInfo_MainView(args: any[], context:any = {} ,params: any={}, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let data: any = {};
let parentContext:any = {};
let parentViewParam:any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
Object.assign(context, { eamlocation: '%eamlocation%' });
Object.assign(params, { eamlocationid: '%eamlocation%' });
Object.assign(params, { eamlocationname: '%eamlocationname%' });
if(_this.context){
parentContext = _this.context;
}
if(_this.viewparams){
parentViewParam = _this.viewparams;
}
context = UIActionTool.handleContextParam(actionTarget,_args,parentContext,parentViewParam,context);
data = UIActionTool.handleActionParam(actionTarget,_args,parentContext,parentViewParam,params);
context = Object.assign({},actionContext.context,context);
let parentObj:any = {srfparentdename:srfParentDeName?srfParentDeName:null,srfparentkey:srfParentDeName?context[srfParentDeName.toLowerCase()]:null};
Object.assign(data,parentObj);
Object.assign(context,parentObj);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'infoview', parameterName: 'infoview' },
];
const openIndexViewTab = (data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
actionContext.$router.push(routePath);
return null;
}
openIndexViewTab(data);
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async EAMLocation_OpenQuickCreateView(args: any[], context:any = {} ,params: any={}, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let data: any = {};
let parentContext:any = {};
let parentViewParam:any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'NONE';
if(_this.context){
parentContext = _this.context;
}
if(_this.viewparams){
parentViewParam = _this.viewparams;
}
context = UIActionTool.handleContextParam(actionTarget,_args,parentContext,parentViewParam,context);
data = UIActionTool.handleActionParam(actionTarget,_args,parentContext,parentViewParam,params);
context = Object.assign({},actionContext.context,context);
let parentObj:any = {srfparentdename:srfParentDeName?srfParentDeName:null,srfparentkey:srfParentDeName?context[srfParentDeName.toLowerCase()]:null};
Object.assign(data,parentObj);
Object.assign(context,parentObj);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
];
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = actionContext.$appdrawer.openDrawer(view, context,data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
const _this: any = actionContext;
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
}
if (this.EAMLocation_OpenInfo_MainView && this.EAMLocation_OpenInfo_MainView instanceof Function) {
this.EAMLocation_OpenInfo_MainView(result.datas[0],context,params, $event, xData,actionContext);
}
return result.datas;
});
}
const view: any = {
viewname: 'eamlocation-quick-create-view',
height: 0,
width: 0,
title: actionContext.$t('entities.eamlocation.views.quickcreateview.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
}
/**
* 获取指定数据的重定向页面
......
......@@ -145,27 +145,26 @@ export class Interceptors {
if(localStorage.getItem('token')){
localStorage.removeItem('token');
}
let leftTime = new Date();
const leftTime = new Date();
leftTime.setTime(leftTime.getSeconds() - 1);
document.cookie = "ibzuaa-token=;expires=" + leftTime.toUTCString();
if (data.loginurl && !Object.is(data.loginurl, '') && data.originurl && !Object.is(data.originurl, '')) {
let _url = encodeURIComponent(encodeURIComponent(window.location.href));
let loginurl: string = data.loginurl;
const originurl: string = data.originurl;
let loginUrl: string = data.loginurl;
const originUrl: string = data.originurl;
if (originurl.indexOf('?') === -1) {
if (originUrl.indexOf('?') === -1) {
_url = `${encodeURIComponent('?RU=')}${_url}`;
} else {
_url = `${encodeURIComponent('&RU=')}${_url}`;
}
loginurl = `${loginurl}${_url}`;
window.location.href = loginurl;
loginUrl = `${loginUrl}${_url}`;
window.location.href = loginUrl;
} else {
if (Object.is(this.router.currentRoute.name, 'login')) {
return;
}
this.router.push({ name: 'login', query: { redirect: this.router.currentRoute.fullPath } });
this.router.push({ name: 'login', query: { redirect: encodeURIComponent(location.href) } });
}
}
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, EditFormControlBase } from '@/studio-core';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import EF_001Service from './ef-001-form-service';
import EAMLocationUIService from '@/uiservice/eamlocation/eamlocation-ui-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
/**
* form部件基类
*
* @export
* @class EditFormControlBase
* @extends {EF_001EditFormBase}
*/
export class EF_001EditFormBase extends EditFormControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof EF_001EditFormBase
*/
protected controlType: string = 'FORM';
/**
* 建构部件服务对象
*
* @type {EF_001Service}
* @memberof EF_001EditFormBase
*/
public service: EF_001Service = new EF_001Service({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMLocationService}
* @memberof EF_001EditFormBase
*/
public appEntityService: EAMLocationService = new EAMLocationService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof EF_001EditFormBase
*/
protected appDeName: string = 'eamlocation';
/**
* 应用实体中文名称
*
* @protected
* @type {string}
* @memberof EF_001EditFormBase
*/
protected appDeLogicName: string = '功能位置';
/**
* 界面UI服务对象
*
* @type {EAMLocationUIService}
* @memberof EF_001EditFormBase
*/
public appUIService:EAMLocationUIService = new EAMLocationUIService(this.$store);
/**
* 表单数据对象
*
* @type {*}
* @memberof EF_001EditFormBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
locationnumber: null,
eamlocationname: null,
eamlocationtypename: null,
createman: null,
createdate: null,
updateman: null,
updatedate: null,
eamlocationid: null,
eamlocationtypeid: null,
eamlocation:null,
};
/**
* 属性值规则
*
* @type {*}
* @memberof EF_001EditFormBase
*/
public rules: any = {
locationnumber: [
{ required: true, type: 'string', message: '功能位置编号 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '功能位置编号 值不能为空', trigger: 'blur' },
],
eamlocationname: [
{ required: true, type: 'string', message: '功能位置名称 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '功能位置名称 值不能为空', trigger: 'blur' },
],
eamlocationtypename: [
{ required: true, type: 'string', message: '功能位置类型 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '功能位置类型 值不能为空', trigger: 'blur' },
],
}
/**
* 属性值规则
*
* @type {*}
* @memberof EF_001Base
*/
public deRules:any = {
};
/**
* 详情模型集合
*
* @type {*}
* @memberof EF_001EditFormBase
*/
public detailsModel: any = {
group1: new FormGroupPanelModel({ caption: '功能位置基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: true, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.eamlocation.ef_001_form', extractMode: 'ITEM', details: [] } }),
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this, showMoreMode: 0 }),
group2: new FormGroupPanelModel({ caption: '操作信息', detailType: 'GROUPPANEL', name: 'group2', visible: true, isShowCaption: true, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.eamlocation.ef_001_form', extractMode: 'ITEM', details: [] } }),
formpage2: new FormPageModel({ caption: '其它', detailType: 'FORMPAGE', name: 'formpage2', visible: true, isShowCaption: true, form: this, showMoreMode: 0 }),
srfupdatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'srfupdatedate', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srforikey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srforikey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfkey: new FormItemModel({ caption: '功能位置标识', detailType: 'FORMITEM', name: 'srfkey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfmajortext: new FormItemModel({ caption: '功能位置名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srftempmode: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srftempmode', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfuf: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfuf', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfdeid: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfdeid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
locationnumber: new FormItemModel({ caption: '功能位置编号', detailType: 'FORMITEM', name: 'locationnumber', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamlocationname: new FormItemModel({ caption: '功能位置名称', detailType: 'FORMITEM', name: 'eamlocationname', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamlocationtypename: new FormItemModel({ caption: '功能位置类型', detailType: 'FORMITEM', name: 'eamlocationtypename', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
createman: new FormItemModel({ caption: '建立人', detailType: 'FORMITEM', name: 'createman', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
createdate: new FormItemModel({ caption: '建立时间', detailType: 'FORMITEM', name: 'createdate', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
updateman: new FormItemModel({ caption: '更新人', detailType: 'FORMITEM', name: 'updateman', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
updatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'updatedate', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamlocationid: new FormItemModel({ caption: '功能位置标识', detailType: 'FORMITEM', name: 'eamlocationid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamlocationtypeid: new FormItemModel({ caption: '功能位置类型标识', detailType: 'FORMITEM', name: 'eamlocationtypeid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
form: new FormTabPanelModel({ caption: 'form', detailType: 'TABPANEL', name: 'form', visible: true, isShowCaption: true, form: this, tabPages: [{ name: 'formpage1', index: 0, visible: true }, { name: 'formpage2', index: 1, visible: true }] }),
};
}
\ No newline at end of file
/**
* EF_001 部件模型
*
* @export
* @class EF_001Model
*/
export default class EF_001Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof EF_001Model
*/
public getDataItems(): any[] {
return [
{
name: 'srfwfmemo',
prop: 'srfwfmemo',
dataType: 'TEXT',
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
{
name: 'srfupdatedate',
prop: 'updatedate',
dataType: 'DATETIME',
},
{
name: 'srforikey',
},
{
name: 'srfkey',
prop: 'eamlocationid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'eamlocationname',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'locationnumber',
prop: 'locationnumber',
dataType: 'TEXT',
},
{
name: 'eamlocationname',
prop: 'eamlocationname',
dataType: 'TEXT',
},
{
name: 'eamlocationtypename',
prop: 'eamlocationtypename',
dataType: 'PICKUPTEXT',
},
{
name: 'createman',
prop: 'createman',
dataType: 'TEXT',
},
{
name: 'createdate',
prop: 'createdate',
dataType: 'DATETIME',
},
{
name: 'updateman',
prop: 'updateman',
dataType: 'TEXT',
},
{
name: 'updatedate',
prop: 'updatedate',
dataType: 'DATETIME',
},
{
name: 'eamlocationid',
prop: 'eamlocationid',
dataType: 'GUID',
},
{
name: 'eamlocationtypeid',
prop: 'eamlocationtypeid',
dataType: 'PICKUP',
},
{
name: 'eamlocation',
prop: 'eamlocationid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import EF_001Model from './ef-001-form-model';
import EAMLocationTypeService from '@/service/eamlocation-type/eamlocation-type-service';
/**
* EF_001 部件服务对象
*
* @export
* @class EF_001Service
*/
export default class EF_001Service extends ControlService {
/**
* 功能位置服务对象
*
* @type {EAMLocationService}
* @memberof EF_001Service
*/
public appEntityService: EAMLocationService = new EAMLocationService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof EF_001Service
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of EF_001Service.
*
* @param {*} [opts={}]
* @memberof EF_001Service
*/
constructor(opts: any = {}) {
super(opts);
this.model = new EF_001Model();
}
/**
* 功能位置类型服务对象
*
* @type {EAMLocationTypeService}
* @memberof EF_001Service
*/
public eamlocationtypeService: EAMLocationTypeService = new EAMLocationTypeService();
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof EF_001Service
*/
private doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof EF_001Service
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
if (Object.is(serviceName, 'EAMLocationTypeService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.eamlocationtypeService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'eamlocationtypeid', 'eamlocationtype');
}
return Promise.reject([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof EF_001Service
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFStart(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof EF_001Service
*/
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data,true).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
}
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 EF_001Service
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.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 EF_001Service
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EF_001Service
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(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 EF_001Service
*/
@Errorlog
public get(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(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 EF_001Service
*/
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.eamlocationid = PrimaryKey;
Data.eamlocation = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.eamlocationid = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EF_001Service
*/
@Errorlog
public frontLogic(action:string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response,true);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据
*
* @param action 行为
* @param data 数据
* @memberof EF_001Service
*/
public handleRequestData(action: string,context:any, data: any = {},isMerge:boolean = false){
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return data;
}
let formItemItems: any[] = mode.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
formItemItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.prop){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof EF_001Service
*/
public getItemNameByDeName(name:string) :string{
let itemName = name;
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return name;
}
let formItemItems: any[] = mode.getDataItems();
formItemItems.forEach((item:any)=>{
if(item.prop === name){
itemName = item.name;
}
});
return itemName.trim();
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-form' ref='form' id='eamlocation_ef_001' style="">
<input style="display:none;" />
<row >
<tabs :animated="false" size="small" name='ef_001' :value="detailsModel.form.activiedPage"
@on-click="detailsModel.form.clickPage($event)">
<tab-pane v-show="detailsModel.formpage1.visible" name='formpage1' :index="0" tab='ef_001' class=''
:label="(h) =>{
return h('span',{
class:'caption'
},[
$t('entities.eamlocation.ef_001_form.details.formpage1')
])
}">
<i-col class="form-layout-container" v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :model="detailsModel.group1" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.eamlocation.ef_001_form.details.group1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.group1" :data="data" :context="context" :viewparams="viewparams"/>
<row>
<i-col class="form-layout-container" v-show="detailsModel.locationnumber.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='locationnumber' :itemRules="this.rules.locationnumber" class='' :caption="$t('entities.eamlocation.ef_001_form.details.locationnumber')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.locationnumber.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.locationnumber"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.locationnumber.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.eamlocationname.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='eamlocationname' :itemRules="this.rules.eamlocationname" class='' :caption="$t('entities.eamlocation.ef_001_form.details.eamlocationname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamlocationname.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.eamlocationname"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.eamlocationname.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.eamlocationtypename.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='eamlocationtypename' :itemRules="this.rules.eamlocationtypename" class='' :caption="$t('entities.eamlocation.ef_001_form.details.eamlocationtypename')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamlocationtypename.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.eamlocationtypename.disabled"
name='eamlocationtypename'
deMajorField='eamlocationtypename'
deKeyField='eamlocationtype'
:service="service"
:acParams="{ serviceName: 'EAMLocationTypeService', interfaceName: 'FetchDefault'}"
valueitem='eamlocationtypeid'
:value="data.eamlocationtypename"
:pickupView="{ viewname: 'eamlocation-type-pickup-view', title: $t('entities.eamlocationtype.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'eamlocationtypes', parameterName: 'eamlocationtype' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</tab-pane>
<tab-pane v-show="detailsModel.formpage2.visible" name='formpage2' :index="1" tab='ef_001' class=''
:label="(h) =>{
return h('span',{
class:'caption'
},[
$t('entities.eamlocation.ef_001_form.details.formpage2')
])
}">
<i-col class="form-layout-container" v-show="detailsModel.group2.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :model="detailsModel.group2" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group2.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.eamlocation.ef_001_form.details.group2')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.group2" :data="data" :context="context" :viewparams="viewparams"/>
<row>
<i-col class="form-layout-container" v-show="detailsModel.createman.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='createman' :itemRules="this.rules.createman" class='' :caption="$t('entities.eamlocation.ef_001_form.details.createman')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.createman.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='createman' :value="data.createman" dataType="TEXT" :precision="0"
tag='SysOperator' codelistType='DYNAMIC' :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style="">
</app-span>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.createdate.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='createdate' :itemRules="this.rules.createdate" class='' :caption="$t('entities.eamlocation.ef_001_form.details.createdate')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.createdate.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='createdate' :value="data.createdate" dataType="DATETIME" valueFormat="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS" :precision="0"
:data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style="">
</app-span>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.updateman.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='updateman' :itemRules="this.rules.updateman" class='' :caption="$t('entities.eamlocation.ef_001_form.details.updateman')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.updateman.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='updateman' :value="data.updateman" dataType="TEXT" :precision="0"
tag='SysOperator' codelistType='DYNAMIC' :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style="">
</app-span>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.updatedate.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='updatedate' :itemRules="this.rules.updatedate" class='' :caption="$t('entities.eamlocation.ef_001_form.details.updatedate')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.updatedate.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='updatedate' :value="data.updatedate" dataType="DATETIME" valueFormat="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS" :precision="0"
:data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style="">
</app-span>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</tab-pane>
</tabs>
</row>
</i-form>
\ No newline at end of file
<template src="./ef-001-form.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EF_001EditFormBase } from './ef-001-form-base';
/**
* form部件
*
* @export
* @class EF_001EditForm
* @extends {EF_001EditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class EF_001EditForm extends EF_001EditFormBase { }
</script>
......@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /assetmanagement-app-assetmanagement.jar
EXPOSE 8080
EXPOSE 10325
ADD assetmanagement-app-assetmanagement.jar /assetmanagement-app-assetmanagement.jar
......@@ -3,9 +3,25 @@ services:
assetmanagement-app-assetmanagement:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/assetmanagement-app-assetmanagement:latest
ports:
- "8080:8080"
- "10325:10325"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=10325
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=172.16.240.110
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_LAB01_e85d8801c
- SPRING_DATASOURCE_PASSWORD=b1@@@772
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_e85d8801c?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_e85d8801c
- CAS=https://passport.ibizlab.cn
- NACOS=172.16.240.110:8848
- SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
- SEATA_ENABLED=true
deploy:
resources:
limits:
......
......@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /assetmanagement-provider-assetapi.jar
EXPOSE 10315
EXPOSE 8081
ADD assetmanagement-provider-assetapi.jar /assetmanagement-provider-assetapi.jar
......@@ -3,25 +3,9 @@ services:
assetmanagement-provider-assetapi:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/assetmanagement-provider-assetapi:latest
ports:
- "10315:10315"
- "8081:8081"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=10315
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=172.16.240.110
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_LAB01_e85d8801c
- SPRING_DATASOURCE_PASSWORD=b1@@@772
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_e85d8801c?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_e85d8801c
- CAS=https://passport.ibizlab.cn
- NACOS=172.16.240.110:8848
- SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
- SEATA_ENABLED=true
deploy:
resources:
limits:
......
......@@ -37,11 +37,11 @@
git clone -b master $para2 ibizassetmanagement/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibizassetmanagement/
mvn clean package -Passetapi
cd assetmanagement-provider/assetmanagement-provider-assetapi
mvn -Passetapi docker:build
mvn -Passetapi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/assetmanagement-provider-assetapi.yaml iBizEE --with-registry-auth
mvn clean package -Passetmanagement
cd assetmanagement-app/assetmanagement-app-assetmanagement
mvn -Passetmanagement docker:build
mvn -Passetmanagement docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/assetmanagement-app-assetmanagement.yaml iBizEE --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册