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

zhouweidong 发布系统代码 [ibz-lite,应用]

上级 eb6dc02b
......@@ -143,12 +143,12 @@
"viewname": "MetaRelationshipEditView",
"viewtag": "3c4651b0fddbda6565cce70dbada576a"
},
"metadynamicmodelusr2gridview": {
"title": "动态模型表格视图",
"caption": "动态模型实体表格视图(副本)",
"metadynamicmodeldynainstgridview": {
"title": "副本",
"caption": "副本",
"viewtype": "DEGRIDVIEW",
"viewmodule": "lite",
"viewname": "MetaDynamicModelUsr2GridView",
"viewname": "MetaDynamicModelDynaInstGridView",
"viewtag": "409f7ea81d15d2e2f1ee295d189d965b"
},
"metarelationshippickupgridview": {
......
......@@ -3,22 +3,22 @@ import commonLogic from '@/locale/logic/common/common-logic';
function getLocaleResourceBase(){
const data:any = {
fields: {
dynainstid: commonLogic.appcommonhandle("动态实例标识",null),
dynainstid: commonLogic.appcommonhandle("动态实例",null),
status: commonLogic.appcommonhandle("状态",null),
modelfile: commonLogic.appcommonhandle("文件",null),
configname: commonLogic.appcommonhandle("名称",null),
configid: commonLogic.appcommonhandle("ID",null),
system_id: commonLogic.appcommonhandle("系统标识",null),
pdynainstid: commonLogic.appcommonhandle("ID",null),
configname: commonLogic.appcommonhandle("配置名称",null),
configid: commonLogic.appcommonhandle("配置标识",null),
system_id: commonLogic.appcommonhandle("系统",null),
pdynainstid: commonLogic.appcommonhandle("父实例",null),
},
views: {
editview: {
caption: commonLogic.appcommonhandle("动态模型",null),
title: commonLogic.appcommonhandle("动态模型编辑视图",null),
},
usr2gridview: {
caption: commonLogic.appcommonhandle("动态模型实体表格视图(副本)",null),
title: commonLogic.appcommonhandle("动态模型表格视图",null),
dynainstgridview: {
caption: commonLogic.appcommonhandle("副本",null),
title: commonLogic.appcommonhandle("副本",null),
},
gridview: {
caption: commonLogic.appcommonhandle("动态模型",null),
......@@ -32,27 +32,25 @@ function getLocaleResourceBase(){
group1: commonLogic.appcommonhandle("动态模型基本信息",null),
formpage1: commonLogic.appcommonhandle("基本信息",null),
srforikey: commonLogic.appcommonhandle("",null),
srfkey: commonLogic.appcommonhandle("ID",null),
srfmajortext: commonLogic.appcommonhandle("名称",null),
srfkey: commonLogic.appcommonhandle("配置标识",null),
srfmajortext: commonLogic.appcommonhandle("配置名称",null),
srftempmode: commonLogic.appcommonhandle("",null),
srfuf: commonLogic.appcommonhandle("",null),
srfdeid: commonLogic.appcommonhandle("",null),
srfsourcekey: commonLogic.appcommonhandle("",null),
configname: commonLogic.appcommonhandle("名称",null),
configname: commonLogic.appcommonhandle("配置名称",null),
formitem: commonLogic.appcommonhandle("文件",null),
configid: commonLogic.appcommonhandle("ID",null),
configid: commonLogic.appcommonhandle("配置标识",null),
},
uiactions: {
},
},
main_grid: {
columns: {
configid: commonLogic.appcommonhandle("ID",null),
dynainstid: commonLogic.appcommonhandle("动态实例标识",null),
configname: commonLogic.appcommonhandle("名称",null),
systemid: commonLogic.appcommonhandle("系统标识",null),
configname: commonLogic.appcommonhandle("配置名称",null),
systemid: commonLogic.appcommonhandle("系统",null),
dynainstid: commonLogic.appcommonhandle("动态实例",null),
status: commonLogic.appcommonhandle("状态",null),
pdynainstid: commonLogic.appcommonhandle("父ID",null),
},
nodata:commonLogic.appcommonhandle("",null),
uiactions: {
......@@ -131,7 +129,7 @@ function getLocaleResourceBase(){
tip: commonLogic.appcommonhandle("帮助",null),
},
},
usr2gridviewtoolbar_toolbar: {
dynainstgridviewtoolbar_toolbar: {
tbitem3: {
caption: commonLogic.appcommonhandle("新建",null),
tip: commonLogic.appcommonhandle("新建",null),
......
......@@ -3,22 +3,22 @@ import commonLogic from '@/locale/logic/common/common-logic';
function getLocaleResourceBase(){
const data:any = {
fields: {
dynainstid: commonLogic.appcommonhandle("动态实例标识",null),
dynainstid: commonLogic.appcommonhandle("动态实例",null),
status: commonLogic.appcommonhandle("状态",null),
modelfile: commonLogic.appcommonhandle("文件",null),
configname: commonLogic.appcommonhandle("名称",null),
configid: commonLogic.appcommonhandle("ID",null),
system_id: commonLogic.appcommonhandle("系统标识",null),
pdynainstid: commonLogic.appcommonhandle("ID",null),
configname: commonLogic.appcommonhandle("配置名称",null),
configid: commonLogic.appcommonhandle("配置标识",null),
system_id: commonLogic.appcommonhandle("系统",null),
pdynainstid: commonLogic.appcommonhandle("父实例",null),
},
views: {
editview: {
caption: commonLogic.appcommonhandle("动态模型",null),
title: commonLogic.appcommonhandle("动态模型编辑视图",null),
},
usr2gridview: {
caption: commonLogic.appcommonhandle("动态模型实体表格视图(副本)",null),
title: commonLogic.appcommonhandle("动态模型表格视图",null),
dynainstgridview: {
caption: commonLogic.appcommonhandle("副本",null),
title: commonLogic.appcommonhandle("副本",null),
},
gridview: {
caption: commonLogic.appcommonhandle("动态模型",null),
......@@ -32,27 +32,25 @@ function getLocaleResourceBase(){
group1: commonLogic.appcommonhandle("动态模型基本信息",null),
formpage1: commonLogic.appcommonhandle("基本信息",null),
srforikey: commonLogic.appcommonhandle("",null),
srfkey: commonLogic.appcommonhandle("ID",null),
srfmajortext: commonLogic.appcommonhandle("名称",null),
srfkey: commonLogic.appcommonhandle("配置标识",null),
srfmajortext: commonLogic.appcommonhandle("配置名称",null),
srftempmode: commonLogic.appcommonhandle("",null),
srfuf: commonLogic.appcommonhandle("",null),
srfdeid: commonLogic.appcommonhandle("",null),
srfsourcekey: commonLogic.appcommonhandle("",null),
configname: commonLogic.appcommonhandle("名称",null),
configname: commonLogic.appcommonhandle("配置名称",null),
formitem: commonLogic.appcommonhandle("文件",null),
configid: commonLogic.appcommonhandle("ID",null),
configid: commonLogic.appcommonhandle("配置标识",null),
},
uiactions: {
},
},
main_grid: {
columns: {
configid: commonLogic.appcommonhandle("ID",null),
dynainstid: commonLogic.appcommonhandle("动态实例标识",null),
configname: commonLogic.appcommonhandle("名称",null),
systemid: commonLogic.appcommonhandle("系统标识",null),
configname: commonLogic.appcommonhandle("配置名称",null),
systemid: commonLogic.appcommonhandle("系统",null),
dynainstid: commonLogic.appcommonhandle("动态实例",null),
status: commonLogic.appcommonhandle("状态",null),
pdynainstid: commonLogic.appcommonhandle("父ID",null),
},
nodata:commonLogic.appcommonhandle("",null),
uiactions: {
......@@ -131,7 +129,7 @@ function getLocaleResourceBase(){
tip: commonLogic.appcommonhandle("Help",null),
},
},
usr2gridviewtoolbar_toolbar: {
dynainstgridviewtoolbar_toolbar: {
tbitem3: {
caption: commonLogic.appcommonhandle("New",null),
tip: commonLogic.appcommonhandle("New",null),
......
......@@ -3,22 +3,22 @@ import commonLogic from '@/locale/logic/common/common-logic';
function getLocaleResourceBase(){
const data:any = {
fields: {
dynainstid: commonLogic.appcommonhandle("动态实例标识",null),
dynainstid: commonLogic.appcommonhandle("动态实例",null),
status: commonLogic.appcommonhandle("状态",null),
modelfile: commonLogic.appcommonhandle("文件",null),
configname: commonLogic.appcommonhandle("名称",null),
configid: commonLogic.appcommonhandle("ID",null),
system_id: commonLogic.appcommonhandle("系统标识",null),
pdynainstid: commonLogic.appcommonhandle("ID",null),
configname: commonLogic.appcommonhandle("配置名称",null),
configid: commonLogic.appcommonhandle("配置标识",null),
system_id: commonLogic.appcommonhandle("系统",null),
pdynainstid: commonLogic.appcommonhandle("父实例",null),
},
views: {
editview: {
caption: commonLogic.appcommonhandle("动态模型",null),
title: commonLogic.appcommonhandle("动态模型编辑视图",null),
},
usr2gridview: {
caption: commonLogic.appcommonhandle("动态模型实体表格视图(副本)",null),
title: commonLogic.appcommonhandle("动态模型表格视图",null),
dynainstgridview: {
caption: commonLogic.appcommonhandle("副本",null),
title: commonLogic.appcommonhandle("副本",null),
},
gridview: {
caption: commonLogic.appcommonhandle("动态模型",null),
......@@ -32,27 +32,25 @@ function getLocaleResourceBase(){
group1: commonLogic.appcommonhandle("动态模型基本信息",null),
formpage1: commonLogic.appcommonhandle("基本信息",null),
srforikey: commonLogic.appcommonhandle("",null),
srfkey: commonLogic.appcommonhandle("ID",null),
srfmajortext: commonLogic.appcommonhandle("名称",null),
srfkey: commonLogic.appcommonhandle("配置标识",null),
srfmajortext: commonLogic.appcommonhandle("配置名称",null),
srftempmode: commonLogic.appcommonhandle("",null),
srfuf: commonLogic.appcommonhandle("",null),
srfdeid: commonLogic.appcommonhandle("",null),
srfsourcekey: commonLogic.appcommonhandle("",null),
configname: commonLogic.appcommonhandle("名称",null),
configname: commonLogic.appcommonhandle("配置名称",null),
formitem: commonLogic.appcommonhandle("文件",null),
configid: commonLogic.appcommonhandle("ID",null),
configid: commonLogic.appcommonhandle("配置标识",null),
},
uiactions: {
},
},
main_grid: {
columns: {
configid: commonLogic.appcommonhandle("ID",null),
dynainstid: commonLogic.appcommonhandle("动态实例标识",null),
configname: commonLogic.appcommonhandle("名称",null),
systemid: commonLogic.appcommonhandle("系统标识",null),
configname: commonLogic.appcommonhandle("配置名称",null),
systemid: commonLogic.appcommonhandle("系统",null),
dynainstid: commonLogic.appcommonhandle("动态实例",null),
status: commonLogic.appcommonhandle("状态",null),
pdynainstid: commonLogic.appcommonhandle("父ID",null),
},
nodata:commonLogic.appcommonhandle("",null),
uiactions: {
......@@ -131,7 +129,7 @@ function getLocaleResourceBase(){
tip: commonLogic.appcommonhandle("帮助",null),
},
},
usr2gridviewtoolbar_toolbar: {
dynainstgridviewtoolbar_toolbar: {
tbitem3: {
caption: commonLogic.appcommonhandle("新建",null),
tip: commonLogic.appcommonhandle("新建",null),
......
......@@ -151,12 +151,12 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "MetaRelationshipEditView",
"viewtag": "3c4651b0fddbda6565cce70dbada576a"
},
"metadynamicmodelusr2gridview": {
"title": "动态模型表格视图",
"caption": "动态模型实体表格视图(副本)",
"metadynamicmodeldynainstgridview": {
"title": "副本",
"caption": "副本",
"viewtype": "DEGRIDVIEW",
"viewmodule": "lite",
"viewname": "MetaDynamicModelUsr2GridView",
"viewname": "MetaDynamicModelDynaInstGridView",
"viewtag": "409f7ea81d15d2e2f1ee295d189d965b"
},
"metarelationshippickupgridview": {
......
......@@ -15,7 +15,7 @@ export const PageComponents = {
Vue.component('dst-view-edit-view', () => import('@pages/lite/dst-view-edit-view/dst-view-edit-view.vue'));
Vue.component('meta-entity-pickup-view', () => import('@pages/lite/meta-entity-pickup-view/meta-entity-pickup-view.vue'));
Vue.component('dst-config-edit-view', () => import('@pages/lite/dst-config-edit-view/dst-config-edit-view.vue'));
Vue.component('meta-dynamic-model-usr2-grid-view', () => import('@pages/lite/meta-dynamic-model-usr2-grid-view/meta-dynamic-model-usr2-grid-view.vue'));
Vue.component('meta-dynamic-model-dyna-inst-grid-view', () => import('@pages/lite/meta-dynamic-model-dyna-inst-grid-view/meta-dynamic-model-dyna-inst-grid-view.vue'));
Vue.component('meta-data-set-edit-view', () => import('@pages/lite/meta-data-set-edit-view/meta-data-set-edit-view.vue'));
Vue.component('meta-model-grid-view', () => import('@pages/lite/meta-model-grid-view/meta-model-grid-view.vue'));
Vue.component('meta-module-pickup-view', () => import('@pages/lite/meta-module-pickup-view/meta-module-pickup-view.vue'));
......
......@@ -446,18 +446,18 @@ const router = new Router({
component: () => import('@pages/lite/dst-config-edit-view/dst-config-edit-view.vue'),
},
{
path: 'metadynamicmodels/:metadynamicmodel?/usr2gridview/:usr2gridview?',
path: 'metadynamicmodels/:metadynamicmodel?/dynainstgridview/:dynainstgridview?',
meta: {
caption: 'entities.metadynamicmodel.views.usr2gridview.caption',
caption: 'entities.metadynamicmodel.views.dynainstgridview.caption',
info:'',
parameters: [
{ pathName: 'liteindex', parameterName: 'liteindex' },
{ pathName: 'metadynamicmodels', parameterName: 'metadynamicmodel' },
{ pathName: 'usr2gridview', parameterName: 'usr2gridview' },
{ pathName: 'dynainstgridview', parameterName: 'dynainstgridview' },
],
requireAuth: true,
},
component: () => import('@pages/lite/meta-dynamic-model-usr2-grid-view/meta-dynamic-model-usr2-grid-view.vue'),
component: () => import('@pages/lite/meta-dynamic-model-dyna-inst-grid-view/meta-dynamic-model-dyna-inst-grid-view.vue'),
},
{
path: 'dstsystems/:dstsystem?/metaentities/:metaentity?/metadatasets/:metadataset?/editview/:editview?',
......@@ -1872,17 +1872,17 @@ const router = new Router({
component: () => import('@pages/lite/meta-relationship-edit-view/meta-relationship-edit-view.vue'),
},
{
path: '/metadynamicmodels/:metadynamicmodel?/usr2gridview/:usr2gridview?',
path: '/metadynamicmodels/:metadynamicmodel?/dynainstgridview/:dynainstgridview?',
meta: {
caption: 'entities.metadynamicmodel.views.usr2gridview.caption',
caption: 'entities.metadynamicmodel.views.dynainstgridview.caption',
info:'',
parameters: [
{ pathName: 'metadynamicmodels', parameterName: 'metadynamicmodel' },
{ pathName: 'usr2gridview', parameterName: 'usr2gridview' },
{ pathName: 'dynainstgridview', parameterName: 'dynainstgridview' },
],
requireAuth: true,
},
component: () => import('@pages/lite/meta-dynamic-model-usr2-grid-view/meta-dynamic-model-usr2-grid-view.vue'),
component: () => import('@pages/lite/meta-dynamic-model-dyna-inst-grid-view/meta-dynamic-model-dyna-inst-grid-view.vue'),
},
{
path: '/dstsystems/:dstsystem?/metaentities/:metaentity?/metarelationships/:metarelationship?/pickupgridview/:pickupgridview?',
......
<template>
<div class='view-container degridview meta-dynamic-model-dyna-inst-grid-view'>
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="metadynamicmodeldynainstgridview"></app-studioaction>
<card class='view-card ' :dis-hover="true" :bordered="false">
<div slot='title' class="header-container">
<span class='caption-info' :title="$t(model.srfCaption)">{{$t(model.srfCaption)}}</span>
</div>
<div class='view-top-messages'>
</div>
<div class='content-container'>
<div style='margin-bottom: 6px;'>
<i-input v-show="!isExpandSearchForm" v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;padding-left: 24px' placeholder="配置名称" />
<div class='pull-right'>
<div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem3.visabled" :disabled="toolBarModels.tbitem3.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem3' }, $event)">
<i class='fa fa-file-text-o'></i>
<span class='caption'>{{$t('entities.metadynamicmodel.dynainstgridviewtoolbar_toolbar.tbitem3.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.metadynamicmodel.dynainstgridviewtoolbar_toolbar.tbitem3.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem4.visabled" :disabled="toolBarModels.tbitem4.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem4' }, $event)">
<i class='fa fa-edit'></i>
<span class='caption'>{{$t('entities.metadynamicmodel.dynainstgridviewtoolbar_toolbar.tbitem4.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.metadynamicmodel.dynainstgridviewtoolbar_toolbar.tbitem4.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem6.visabled" :disabled="toolBarModels.tbitem6.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem6' }, $event)">
<i class='fa fa-copy'></i>
<span class='caption'>{{$t('entities.metadynamicmodel.dynainstgridviewtoolbar_toolbar.tbitem6.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.metadynamicmodel.dynainstgridviewtoolbar_toolbar.tbitem6.tip')}}</div>
</tooltip>
<span class='seperator'>|</span>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem8.visabled" :disabled="toolBarModels.tbitem8.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem8' }, $event)">
<i class='fa fa-remove'></i>
<span class='caption'>{{$t('entities.metadynamicmodel.dynainstgridviewtoolbar_toolbar.tbitem8.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.metadynamicmodel.dynainstgridviewtoolbar_toolbar.tbitem8.tip')}}</div>
</tooltip>
<span class='seperator'>|</span>
<tooltip :transfer="true" :max-width="600">
<app-export-excel :item="toolBarModels.tbitem13" :caption="$t('entities.metadynamicmodel.dynainstgridviewtoolbar_toolbar.tbitem13.caption')" @exportexcel="toolbar_click({ tag: 'tbitem13' }, $event)"></app-export-excel>
<div slot='content'>{{$t('entities.metadynamicmodel.dynainstgridviewtoolbar_toolbar.tbitem13.tip')}}</div>
</tooltip>
<span class='seperator'>|</span>
<dropdown v-show="toolBarModels.tbitem16.visabled" trigger='click'>
<tooltip :transfer="true" :max-width="600">
<i-button class=''>
<i class=''></i>
<span class='caption'>{{$t('entities.metadynamicmodel.dynainstgridviewtoolbar_toolbar.tbitem16.caption')}}</span>
<icon type="ios-arrow-down"></icon>
</i-button>
<div slot='content'>{{$t('entities.metadynamicmodel.dynainstgridviewtoolbar_toolbar.tbitem16.tip')}}</div>
</tooltip>
<dropdown-menu slot='list'>
<dropdown-item>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem21.visabled" :disabled="toolBarModels.tbitem21.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem21' }, $event)">
<i class='fa fa-download'></i>
<span class='caption'>{{$t('entities.metadynamicmodel.dynainstgridviewtoolbar_toolbar.tbitem21.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.metadynamicmodel.dynainstgridviewtoolbar_toolbar.tbitem21.tip')}}</div>
</tooltip>
</dropdown-item>
<dropdown-item>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem23.visabled" :disabled="toolBarModels.tbitem23.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem23' }, $event)">
<i class='fa fa-upload'></i>
<span class='caption'>{{$t('entities.metadynamicmodel.dynainstgridviewtoolbar_toolbar.tbitem23.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.metadynamicmodel.dynainstgridviewtoolbar_toolbar.tbitem23.tip')}}</div>
</tooltip>
</dropdown-item>
</dropdown-menu>
</dropdown>
<span class='seperator'>|</span>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem19.visabled" :disabled="toolBarModels.tbitem19.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem19' }, $event)">
<i class='fa fa-filter'></i>
<span class='caption'>{{$t('entities.metadynamicmodel.dynainstgridviewtoolbar_toolbar.tbitem19.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.metadynamicmodel.dynainstgridviewtoolbar_toolbar.tbitem19.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem18.visabled" :disabled="toolBarModels.tbitem18.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem18' }, $event)">
<i class='fa fa-question'></i>
<span class='caption'>{{$t('entities.metadynamicmodel.dynainstgridviewtoolbar_toolbar.tbitem18.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.metadynamicmodel.dynainstgridviewtoolbar_toolbar.tbitem18.tip')}}</div>
</tooltip>
</div>
</div>
</div>
<view_searchform
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft"
loadAction="FilterGet"
name="searchform"
ref='searchform'
@save="searchform_save($event)"
@search="searchform_search($event)"
@load="searchform_load($event)"
@closeview="closeView($event)">
</view_searchform>
<div class='view-body-messages'>
</div>
<view_grid
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:isSingleSelect="isSingleSelect"
:showBusyIndicator="true"
:isOpenEdit="false"
:gridRowActiveMode="gridRowActiveMode"
:isformDruipart="isformDruipart"
@save="onSave"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchFindbak"
:newdata="newdata"
:opendata="opendata"
name="grid"
ref='grid'
@selectionchange="grid_selectionchange($event)"
@beforeload="grid_beforeload($event)"
@rowdblclick="grid_rowdblclick($event)"
@remove="grid_remove($event)"
@load="grid_load($event)"
@closeview="closeView($event)">
</view_grid>
</div>
<div class='view-bottom-messages'>
</div>
</card>
</div>
</template>
<script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch,Inject } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils';
import NavDataService from '@/service/app/navdata-service';
import { Subject,Subscription } from 'rxjs';
import MetaDynamicModelService from '@/service/meta-dynamic-model/meta-dynamic-model-service';
import MetaDynamicModelAuthService from '@/authservice/meta-dynamic-model/meta-dynamic-model-auth-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import MetaDynamicModelUIService from '@/uiservice/meta-dynamic-model/meta-dynamic-model-ui-service';
import CodeListService from "@/codelist/codelist-service";
@Component({
components: {
},
})
export default class MetaDynamicModelDynaInstGridViewBase extends Vue {
/**
* 实体服务对象
*
* @type {MetaDynamicModelService}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public appEntityService: MetaDynamicModelService = new MetaDynamicModelService;
/**
* 实体UI服务对象
*
* @type MetaDynamicModelUIService
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public appUIService: MetaDynamicModelUIService = new MetaDynamicModelUIService(this.$store);
/**
* 数据变化
*
* @param {*} val
* @returns {*}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
@Emit()
public viewDatasChange(val: any):any {
return val;
}
/**
* 传入视图上下文
*
* @type {string}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
@Prop() public viewdata!: string;
/**
* 传入视图参数
*
* @type {string}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
@Prop() public viewparam!: string;
/**
* 视图默认使用
*
* @type {boolean}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
@Prop({ default: true }) public viewDefaultUsage!: boolean;
/**
* 视图默认使用
*
* @type {string}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 视图标识
*
* @type {string}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public viewtag: string = '409f7ea81d15d2e2f1ee295d189d965b';
/**
* 自定义视图导航上下文集合
*
* @type {*}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public customViewNavContexts:any ={
};
/**
* 自定义视图导航参数集合
*
* @type {*}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public customViewParams:any ={
};
/**
* 视图模型数据
*
* @type {*}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public model: any = {
srfCaption: 'entities.metadynamicmodel.views.dynainstgridview.caption',
srfTitle: 'entities.metadynamicmodel.views.dynainstgridview.title',
srfSubTitle: 'entities.metadynamicmodel.views.dynainstgridview.subtitle',
dataInfo: ''
}
/**
* 视图参数变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
@Watch('viewparam',{immediate: true, deep: true})
onParamData(newVal: any, oldVal: any) {
if(newVal){
this.viewparams = {};
if(typeof newVal == 'string') {
Object.assign(this.viewparams, JSON.parse(this.viewparam));
}else{
this.viewparams = Util.deepCopy(this.viewparam);
}
}
}
/**
* 处理应用上下文变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
@Watch('viewdata')
onViewData(newVal: any, oldVal: any) {
const _this: any = this;
if (!Object.is(newVal, oldVal) && _this.engine) {
this.$nextTick(()=>{
_this.parseViewParam();
_this.engine.load();
});
} else if(!Object.is(newVal, oldVal) && _this.refresh && _this.refresh instanceof Function) {
_this.refresh();
}
}
/**
* 容器模型
*
* @type {*}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 视图刷新
*
* @param {*} args
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public refresh(args?: any): void {
const refs: any = this.$refs;
if (refs && refs.grid) {
refs.grid.refresh();
}
}
/**
* 计数器刷新
*
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public counterRefresh(){
const _this:any =this;
if(_this.counterServiceArray && _this.counterServiceArray.length >0){
_this.counterServiceArray.forEach((item:any) =>{
if(item.refreshData && item.refreshData instanceof Function){
item.refreshData();
}
})
}
}
/**
* 视图状态订阅对象
*
* @public
* @type {Subject<{action: string, data: any}>}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public viewState: Subject<ViewState> = new Subject();
/**
* 工具栏模型
*
* @type {*}
* @memberof MetaDynamicModelDynaInstGridView
*/
public toolBarModels: any = {
tbitem3: { name: 'tbitem3', actiontarget: 'NONE', caption: '新建', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'New', target: '' } },
tbitem4: { name: 'tbitem4', actiontarget: 'NONE', caption: '编辑', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' } },
tbitem6: { name: 'tbitem6', actiontarget: 'NONE', caption: '拷贝', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' } },
tbitem7: { name: 'tbitem7', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem8: { name: 'tbitem8', actiontarget: 'NONE', caption: '删除', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Remove', target: 'MULTIKEY' } },
tbitem9: { name: 'tbitem9', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem13: { name: 'tbitem13', actiontarget: 'NONE', caption: '导出', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ExportExcel', target: '' }, MaxRowCount: 1000 },
tbitem10: { name: 'tbitem10', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem16: { name: 'tbitem16', caption: '其它', disabled: false, type: 'ITEMS', visabled: true, dataaccaction: '', uiaction: { } },
tbitem21: { name: 'tbitem21', actiontarget: 'NONE', caption: '导出数据模型', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ExportModel', target: '' } },
tbitem23: { name: 'tbitem23', actiontarget: 'NONE', caption: '数据导入', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Import', target: '' } },
tbitem17: { name: 'tbitem17', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem19: { name: 'tbitem19', actiontarget: 'NONE', caption: '过滤', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ToggleFilter', target: '' } },
tbitem18: { name: 'tbitem18', actiontarget: 'NONE', caption: '帮助', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Help', target: '' } },
};
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
opendata: (args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) => {
this.opendata(args,fullargs, params, $event, xData);
},
newdata: (args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) => {
this.newdata(args,fullargs, params, $event, xData);
},
grid: this.$refs.grid,
searchform: this.$refs.searchform,
keyPSDEField: 'metadynamicmodel',
majorPSDEField: 'configname',
isLoadDefault: true,
});
}
/**
* 应用导航服务
*
* @type {*}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public navDataService = NavDataService.getInstance(this.$store);
/**
* 导航服务事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public serviceStateEvent: Subscription | undefined;
/**
* 门户部件状态对象
*
* @type {*}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
@Prop() public portletState?: any;
/**
* 门户部件状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public portletStateEvent: Subscription | undefined;
/**
* 应用上下文
*
* @type {*}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public context:any = {};
/**
* 视图参数
*
* @type {*}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public viewparams:any = {};
/**
* 视图缓存数据
*
* @type {*}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
* @public
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public parseViewParam(inputvalue:any = null): void {
for(let key in this.context){
delete this.context[key];
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
if (!this.viewDefaultUsage && this.viewdata && !Object.is(this.viewdata, '')) {
if(typeof this.viewdata == 'string') {
Object.assign(this.context, JSON.parse(this.viewdata));
}
if(this.context && this.context.srfparentdename){
Object.assign(this.viewparams,{srfparentdename:this.context.srfparentdename});
}
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
this.handleCustomViewData();
return;
}
const path = (this.$route.matched[this.$route.matched.length - 1]).path;
const keys: Array<any> = [];
const curReg = this.$pathToRegExp.pathToRegexp(path, keys);
const matchArray = curReg.exec(this.$route.path);
let tempValue: Object = {};
keys.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item.name, {
enumerable: true,
value: matchArray[index + 1]
});
});
this.$viewTool.formatRouteParams(tempValue,this.$route,this.context,this.viewparams);
if(inputvalue){
Object.assign(this.context,{'metadynamicmodel':inputvalue});
}
//初始化视图唯一标识
Object.assign(this.context,{srfsessionid:this.$util.createUUID()});
this.handleCustomViewData();
//初始化导航数据
this.initNavDataWithRoute();
}
/**
* 处理自定义视图数据
*
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public handleCustomViewData(){
if(Object.keys(this.customViewNavContexts).length > 0){
Object.keys(this.customViewNavContexts).forEach((item:any) =>{
let tempContext:any = {};
let curNavContext:any = this.customViewNavContexts[item];
this.handleCustomDataLogic(curNavContext,tempContext,item);
Object.assign(this.context,tempContext);
})
}
if(Object.keys(this.customViewParams).length > 0){
Object.keys(this.customViewParams).forEach((item:any) =>{
let tempParam:any = {};
let curNavParam:any = this.customViewParams[item];
this.handleCustomDataLogic(curNavParam,tempParam,item);
Object.assign(this.viewparams,tempParam);
})
}
}
/**
* 处理自定义视图数据逻辑
*
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public handleCustomDataLogic(curNavData:any,tempData:any,item:string){
// 直接值直接赋值
if(curNavData.isRawValue){
if(Object.is(curNavData.value,"null") || Object.is(curNavData.value,"")){
Object.defineProperty(tempData, item.toLowerCase(), {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item.toLowerCase(), {
value: curNavData.value,
writable : true,
enumerable : true,
configurable : true
});
}
}else{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if(this.context[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.context[(curNavData.value).toLowerCase()],
writable : true,
enumerable : true,
configurable : true
});
}else{
if(this.viewparams[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.viewparams[(curNavData.value).toLowerCase()],
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item.toLowerCase(), {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}
}
}
}
/**
* 初始化导航数据(路由模式)
*
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public initNavDataWithRoute(data:any = null, isNew:boolean = false, isAlways:boolean = false){
if( isAlways || (this.viewDefaultUsage && Object.is(this.navModel,"route")) ){
this.navDataService.addNavData({id:'meta-dynamic-model-dyna-inst-grid-view',tag:this.viewtag,srfkey:isNew ? null : this.context.metadynamicmodel,title:this.$t(this.model.srfCaption),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath});
}
}
/**
* 初始化导航数据(分页模式)
*
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public initNavDataWithTab(data:any = null,isOnlyAdd:boolean = true, isAlways:boolean = false){
if( isAlways || (this.viewDefaultUsage && !Object.is(this.navModel,"route")) ){
this.navDataService.addNavDataByOnly({id:'meta-dynamic-model-dyna-inst-grid-view',tag:this.viewtag,srfkey:this.context.metadynamicmodel,title:this.$t(this.model.srfCaption),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath},isOnlyAdd);
}
}
/**
* Vue声明周期
*
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public afterCreated(){
let _this:any = this;
const secondtag = _this.$util.createUUID();
_this.$store.commit('viewaction/createdView', { viewtag: _this.viewtag, secondtag: secondtag });
_this.viewtag = secondtag;
_this.parseViewParam();
_this.serviceStateEvent = _this.navDataService.serviceState.subscribe(({ action,name, data }:{ action:string,name:any,data:any }) => {
if(!Object.is(name,'meta-dynamic-model-dyna-inst-grid-view')){
return;
}
if (Object.is(action, 'viewrefresh')) {
_this.$nextTick(()=>{
_this.parseViewParam(data);
if(_this.engine){
_this.engine.load();
}
});
}
});
if(_this.portletState){
_this.portletStateEvent = _this.portletState.subscribe((res:any) =>{
if(!Object.is(res.name,'MetaDynamicModelDynaInstGridView')){
return;
}
if(Object.is(res.action,'refresh') && _this.refresh && _this.refresh instanceof Function){
_this.refresh();
}
})
}
if(this.formDruipart){
this.formDruipart.subscribe((res:any) =>{
if(Object.is(res.action,'save')){
this.viewState.next({ tag:'grid', action: 'save', data: this.viewparams });
}
if(Object.is(res.action,'load')){
const _this: any = this;
_this.engine.load(res.data,true);
}
});
}
}
/**
* 销毁之前
*
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public beforeDestroy() {
this.$store.commit('viewaction/removeView', this.viewtag);
}
/**
* Vue声明周期(组件初始化完毕)
*
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public mounted() {
this.afterMounted();
}
/**
* 执行mounted后的逻辑
*
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public afterMounted(){
const _this: any = this;
_this.engineInit();
if (_this.loadModel && _this.loadModel instanceof Function) {
_this.loadModel();
}
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public toolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem6')) {
this.toolbar_tbitem6_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem24')) {
this.toolbar_tbitem24_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem25')) {
this.toolbar_tbitem25_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction1')) {
this.toolbar_deuiaction1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem13')) {
this.toolbar_tbitem13_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem11')) {
this.toolbar_tbitem11_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem21')) {
this.toolbar_tbitem21_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem23')) {
this.toolbar_tbitem23_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem19')) {
this.toolbar_tbitem19_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem18')) {
this.toolbar_tbitem18_click(null, '', $event2);
}
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any) {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public grid_beforeload($event: any, $event2?: any) {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any) {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public grid_remove($event: any, $event2?: any) {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public grid_load($event: any, $event2?: any) {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public searchform_save($event: any, $event2?: any) {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public searchform_search($event: any, $event2?: any) {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public searchform_load($event: any, $event2?: any) {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem3_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"MetaDynamicModel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem4_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Edit(datas, contextJO,paramJO, $event, xData,this,"MetaDynamicModel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem5_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.View(datas, contextJO,paramJO, $event, xData,this,"MetaDynamicModel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem6_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"MetaDynamicModel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem24_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"MetaDynamicModel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem25_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.NewRow(datas, contextJO,paramJO, $event, xData,this,"MetaDynamicModel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction1_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveRow(datas, contextJO,paramJO, $event, xData,this,"MetaDynamicModel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem8_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Remove(datas, contextJO,paramJO, $event, xData,this,"MetaDynamicModel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem13_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ExportExcel(datas, contextJO,paramJO, $event, xData,this,"MetaDynamicModel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem11_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"MetaDynamicModel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem21_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ExportModel(datas, contextJO,paramJO, $event, xData,this,"MetaDynamicModel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem23_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Import(datas, contextJO,paramJO, $event, xData,this,"MetaDynamicModel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem19_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleFilter(datas, contextJO,paramJO, $event, xData,this,"MetaDynamicModel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem18_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Help(datas, contextJO,paramJO, $event, xData,this,"MetaDynamicModel");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof MetaDynamicModelDynaInstGridView
*/
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
let localContext:any = null;
let localViewParam:any =null;
const data: any = {};
if(args[0].srfsourcekey){
data.srfsourcekey = args[0].srfsourcekey;
}
let tempContext = JSON.parse(JSON.stringify(this.context));
delete tempContext.metadynamicmodel;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'metadynamicmodels', parameterName: 'metadynamicmodel' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof MetaDynamicModelDynaInstGridView
*/
public opendata(args: any[],fullargs?:any,params?: any, $event?: any, xData?: any) {
if(!this.viewDefaultUsage){
if(Object.is(this.navModel,"route")){
this.initNavDataWithRoute(this.viewCacheData, false, true);
}else{
this.initNavDataWithTab(this.viewCacheData, false, true);
}
}
let localContext:any = null;
let localViewParam:any =null;
const data: any = {};
let tempContext = JSON.parse(JSON.stringify(this.context));
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'metadynamicmodels', parameterName: 'metadynamicmodel' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
if(fullargs && fullargs.copymode){
Object.assign(data,{copymode:true});
}
const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
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 视图处理逻辑不存在,请添加!' });
}
}
/**
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { metadynamicmodel: args[0].metadynamicmodel })
}
_this.opendata([{ ...data }], args, params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 查看
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public View(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { metadynamicmodel: args[0].metadynamicmodel })
}
_this.opendata([{ ...data }], args, params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 拷贝
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public Copy(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { metadynamicmodel: args[0].metadynamicmodel });
}
if(!params) params = {};
Object.assign(args,{copymode:true});
_this.opendata([{ ...data }], args, params, $event, xData);
} else {
Object.assign(this.viewparams,{copymode:true});
}
}
/**
* 行编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public ToggleRowEdit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
xData.actualIsOpenEdit = !xData.actualIsOpenEdit;
}
/**
* 新建行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public NewRow(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
const data: any = {};
if (_this.hasOwnProperty('newRow') && _this.newRow instanceof Function) {
_this.newRow([{ ...data }], params, $event, xData);
} else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData);
}else{
_this.$Notice.error({ title: '错误', desc: 'newRow 视图处理逻辑不存在,请添加!' });
}
}
/**
* 保存行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public SaveRow(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
// 界面行为容器对象 _this
const _this: any = this;
if (xData && xData.save instanceof Function) {
xData.save();
} else if (_this.save && _this.save instanceof Function) {
_this.save();
}
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public Remove(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.remove instanceof Function)) {
return ;
}
xData.remove(args);
}
/**
* 导出
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public ExportExcel(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.exportExcel instanceof Function) || !$event) {
return ;
}
xData.exportExcel($event.exportparms);
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public Print(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.print instanceof Function) || !$event) {
return ;
}
xData.print();
}
/**
* 导出数据模型
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public ExportModel(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.$Notice.error({ title: '错误', desc: '导出数据模型未支持' });
}
/**
* 数据导入
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public Import(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.importExcel instanceof Function) || !$event) {
return ;
}
xData.importExcel(params);
}
/**
* 过滤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public ToggleFilter(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.hasOwnProperty('isExpandSearchForm')) {
_this.isExpandSearchForm = !_this.isExpandSearchForm;
}
}
/**
* 帮助
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public Help(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.$Notice.error({ title: '错误', desc: '帮助未支持' });
}
/**
* 关闭视图
*
* @param {any[]} args
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public closeView(args: any[]): void {
let _view: any = this;
if (_view.viewdata) {
_view.$emit('viewdataschange', Array.isArray(args)?args:[args]);
_view.$emit('close', Array.isArray(args)?args:[args]);
} else if (_view.$tabPageExp) {
_view.$tabPageExp.onClose(_view.$route.fullPath);
}
}
/**
* 销毁视图回调
*
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public destroyed(){
this.afterDestroyed();
}
/**
* 执行destroyed后的逻辑
*
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public afterDestroyed(){
if(this.viewDefaultUsage){
let localStoreLength = Object.keys(localStorage);
if(localStoreLength.length > 0){
localStoreLength.forEach((item:string) =>{
if(item.startsWith(this.context.srfsessionid)){
localStorage.removeItem(item);
}
})
}
if(Object.is(this.navModel,"tab")){
this.navDataService.removeNavDataByTag(this.viewtag);
}
if (this.serviceStateEvent) {
this.serviceStateEvent.unsubscribe();
}
}
// 销毁计数器定时器
if(this.counterServiceArray && this.counterServiceArray.length >0){
this.counterServiceArray.forEach((item:any) =>{
if(item.destroyCounter && item.destroyCounter instanceof Function){
item.destroyCounter();
}
})
}
if(this.portletStateEvent){
this.portletStateEvent.unsubscribe();
}
}
/**
* 是否单选
*
* @type {boolean}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public isSingleSelect: boolean = false;
/**
* 是否嵌入关系界面
*
* @type {boolean}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
@Prop({default:false}) public isformDruipart?: boolean;
/**
* 界面关系通讯对象
*
* @type {Subject<ViewState>}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
@Prop() public formDruipart?: Subject<ViewState>;
/**
* 搜索值
*
* @type {string}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public query: string = '';
/**
* 是否展开搜索表单
*
* @type {boolean}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public isExpandSearchForm: boolean = false;
/**
* 表格行数据默认激活模式
* 0 不激活
* 1 单击激活
* 2 双击激活
*
* @type {(number | 0 | 1 | 2)}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public gridRowActiveMode: number | 0 | 1 | 2 = 2;
/**
* 快速搜索
*
* @param {*} $event
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
public onSearch($event: any): void {
const grid: any = this.$refs.grid;
if (grid) {
grid.load(this.context, true);
}
}
/**
* grid 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof ENTITYTEST1Usr2GridViewBase
*/
public onSave($event: any) {
this.$emit('drdatasaved', $event);
}
/**
* 刷新数据
*
* @readonly
* @type {(number | null)}
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
get refreshdata(): number | null {
return this.$store.getters['viewaction/getRefreshData'](this.viewtag);
}
/**
* 监控数据变化
*
* @param {*} newVal
* @param {*} oldVal
* @returns
* @memberof MetaDynamicModelDynaInstGridViewBase
*/
@Watch('refreshdata')
onRefreshData(newVal: any, oldVal: any) {
if (newVal === null || newVal === undefined) {
return;
}
if (newVal === 0) {
return;
}
const grid: any = this.$refs.grid;
if (grid) {
grid.load({});
}
}
}
</script>
<style lang='less'>
@import './meta-dynamic-model-dyna-inst-grid-view.less';
</style>
\ No newline at end of file
.meta-dynamic-model-dyna-inst-grid-view{
position: relative;
}
.toolbar-container {
button {
margin: 6px 0px 4px 4px;
.caption {
margin-left: 4px;
}
}
.seperator {
color: #dcdee2;
margin: 0 0px 0 4px;
}
}
// this is less
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import MetaDynamicModelDynaInstGridViewBase from './meta-dynamic-model-dyna-inst-grid-view-base.vue';
import view_grid from '@widgets/meta-dynamic-model/main-grid/main-grid.vue';
import view_searchform from '@widgets/meta-dynamic-model/default-searchform/default-searchform.vue';
@Component({
components: {
view_grid,
view_searchform,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
if(!Object.is(vm.navModel,"route")){
vm.initNavDataWithTab(vm.viewCacheData);
}
vm.$store.commit('addCurPageViewtag', { fullPath: to.fullPath, viewtag: vm.viewtag });
});
},
})
export default class MetaDynamicModelDynaInstGridView extends MetaDynamicModelDynaInstGridViewBase {
}
</script>
\ No newline at end of file
......@@ -9,7 +9,7 @@
</div>
<div class='content-container'>
<div style='margin-bottom: 6px;'>
<i-input v-show="!isExpandSearchForm" v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;padding-left: 24px' placeholder="名称" />
<i-input v-show="!isExpandSearchForm" v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;padding-left: 24px' placeholder="配置名称" />
<div class='pull-right'>
<div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600">
......
......@@ -168,7 +168,7 @@ export const viewstate: any = {
{
viewtag: '409f7ea81d15d2e2f1ee295d189d965b',
viewmodule: 'lite',
viewname: 'MetaDynamicModelUsr2GridView',
viewname: 'MetaDynamicModelDynaInstGridView',
viewaction: '',
viewdatachange: false,
refviews: [
......
......@@ -97,7 +97,7 @@ export default class MetaDynamicModelUIServiceBase extends UIService {
*/
public initViewMap(){
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'metadynamicmodels',component:'meta-dynamic-model-edit-view'});
this.allViewMap.set(':',{viewname:'usr2gridview',srfappde:'metadynamicmodels',component:'meta-dynamic-model-usr2-grid-view'});
this.allViewMap.set(':',{viewname:'dynainstgridview',srfappde:'metadynamicmodels',component:'meta-dynamic-model-dyna-inst-grid-view'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'metadynamicmodels',component:'meta-dynamic-model-grid-view'});
}
......
......@@ -44,7 +44,7 @@
refviewtype='DEGRIDVIEW'
refreshitems=''
:ignorefieldvaluechange="ignorefieldvaluechange"
viewname='meta-dynamic-model-usr2-grid-view'
viewname='meta-dynamic-model-dyna-inst-grid-view'
tempMode='0'
:data="JSON.stringify(this.data)"
@drdatasaved="drdatasaved($event)"
......@@ -520,8 +520,8 @@ export default class MainBase extends Vue implements ControlInterface {
public rules() :any {
return {
configname: [
{ required: this.detailsModel.configname.required, type: 'string', message: '名称 值不能为空', trigger: 'change' },
{ required: this.detailsModel.configname.required, type: 'string', message: '名称 值不能为空', trigger: 'blur' },
{ required: this.detailsModel.configname.required, type: 'string', message: '配置名称 值不能为空', trigger: 'change' },
{ required: this.detailsModel.configname.required, type: 'string', message: '配置名称 值不能为空', trigger: 'blur' },
],
formitem: [
{ required: this.detailsModel.formitem.required, type: 'string', message: '文件 值不能为空', trigger: 'change' },
......@@ -644,9 +644,9 @@ export default class MainBase extends Vue implements ControlInterface {
,
srforikey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srforikey', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
srfkey: new FormItemModel({ caption: 'ID', detailType: 'FORMITEM', name: 'srfkey', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
srfkey: new FormItemModel({ caption: '配置标识', detailType: 'FORMITEM', name: 'srfkey', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
srfmajortext: new FormItemModel({ caption: '名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
srfmajortext: new FormItemModel({ caption: '配置名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
srftempmode: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srftempmode', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
......@@ -656,11 +656,11 @@ export default class MainBase extends Vue implements ControlInterface {
,
srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
configname: new FormItemModel({ caption: '名称', detailType: 'FORMITEM', name: 'configname', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
configname: new FormItemModel({ caption: '配置名称', detailType: 'FORMITEM', name: 'configname', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
formitem: new FormItemModel({ caption: '文件', detailType: 'FORMITEM', name: 'formitem', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:true, disabled: false, enableCond: 3 })
,
configid: new FormItemModel({ caption: 'ID', detailType: 'FORMITEM', name: 'configid', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
configid: new FormItemModel({ caption: '配置标识', detailType: 'FORMITEM', name: 'configid', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
};
......
......@@ -22,30 +22,6 @@
<template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template>
<template v-if="getColumnState('configid')">
<el-table-column show-overflow-tooltip :prop="'configid'" :label="$t('entities.metadynamicmodel.main_grid.columns.configid')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.metadynamicmodel.main_grid.columns.configid')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.configid}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('dynainstid')">
<el-table-column show-overflow-tooltip :prop="'dynainstid'" :label="$t('entities.metadynamicmodel.main_grid.columns.dynainstid')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.metadynamicmodel.main_grid.columns.dynainstid')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.dynainstid}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('configname')">
<el-table-column show-overflow-tooltip :prop="'configname'" :label="$t('entities.metadynamicmodel.main_grid.columns.configname')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
......@@ -70,29 +46,29 @@
</template>
</el-table-column>
</template>
<template v-if="getColumnState('status')">
<el-table-column show-overflow-tooltip :prop="'status'" :label="$t('entities.metadynamicmodel.main_grid.columns.status')" :width="200" :align="'left'" :sortable="'custom'">
<template v-if="getColumnState('dynainstid')">
<el-table-column show-overflow-tooltip :prop="'dynainstid'" :label="$t('entities.metadynamicmodel.main_grid.columns.dynainstid')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.metadynamicmodel.main_grid.columns.status')}}
{{$t('entities.metadynamicmodel.main_grid.columns.dynainstid')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<template >
<codelist :value="row.status" tag='DynamicModelStatus' codelistType='STATIC' ></codelist>
</template>
<span>{{row.dynainstid}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('pdynainstid')">
<el-table-column show-overflow-tooltip :prop="'pdynainstid'" :label="$t('entities.metadynamicmodel.main_grid.columns.pdynainstid')" :width="200" :align="'left'" :sortable="'custom'">
<template v-if="getColumnState('status')">
<el-table-column show-overflow-tooltip :prop="'status'" :label="$t('entities.metadynamicmodel.main_grid.columns.status')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.metadynamicmodel.main_grid.columns.pdynainstid')}}
{{$t('entities.metadynamicmodel.main_grid.columns.status')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.pdynainstid}}</span>
<template >
<codelist :value="row.status" tag='DynamicModelStatus' codelistType='STATIC' ></codelist>
</template>
</template>
</el-table-column>
</template>
......@@ -653,27 +629,9 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public allColumns: any[] = [
{
name: 'configid',
label: 'ID',
langtag: 'entities.metadynamicmodel.main_grid.columns.configid',
show: true,
unit: 'PX',
isEnableRowEdit: false,
enableCond: 3 ,
},
{
name: 'dynainstid',
label: '动态实例标识',
langtag: 'entities.metadynamicmodel.main_grid.columns.dynainstid',
show: true,
unit: 'PX',
isEnableRowEdit: false,
enableCond: 3 ,
},
{
name: 'configname',
label: '名称',
label: '配置名称',
langtag: 'entities.metadynamicmodel.main_grid.columns.configname',
show: true,
unit: 'PX',
......@@ -682,7 +640,7 @@ export default class MainBase extends Vue implements ControlInterface {
},
{
name: 'systemid',
label: '系统标识',
label: '系统',
langtag: 'entities.metadynamicmodel.main_grid.columns.systemid',
show: true,
unit: 'PX',
......@@ -690,18 +648,18 @@ export default class MainBase extends Vue implements ControlInterface {
enableCond: 3 ,
},
{
name: 'status',
label: '状态',
langtag: 'entities.metadynamicmodel.main_grid.columns.status',
name: 'dynainstid',
label: '动态实例',
langtag: 'entities.metadynamicmodel.main_grid.columns.dynainstid',
show: true,
unit: 'PX',
isEnableRowEdit: false,
enableCond: 3 ,
},
{
name: 'pdynainstid',
label: '父ID',
langtag: 'entities.metadynamicmodel.main_grid.columns.pdynainstid',
name: 'status',
label: '状态',
langtag: 'entities.metadynamicmodel.main_grid.columns.status',
show: true,
unit: 'PX',
isEnableRowEdit: false,
......@@ -1411,7 +1369,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public arraySpanMethod({row, column, rowIndex, columnIndex} : any) {
let allColumns:Array<any> = ['configid','dynainstid','configname','systemid','status','pdynainstid'];
let allColumns:Array<any> = ['configname','systemid','dynainstid','status'];
if(row && row.children) {
if(columnIndex == (this.isSingleSelect ? 0:1)) {
return [1, allColumns.length+1];
......@@ -1491,12 +1449,10 @@ export default class MainBase extends Vue implements ControlInterface {
const tree: any ={
groupById: Number((i+1)*100),
group: group.label,
configid:'',
dynainstid:'',
configname:'',
systemid:'',
dynainstid:'',
status:'',
pdynainstid:'',
children: children
}
groupTree.push(tree);
......@@ -1523,12 +1479,10 @@ export default class MainBase extends Vue implements ControlInterface {
const Tree: any = {
groupById: Number((allGroup.length+1)*100),
group: this.$t('app.gridpage.other'),
configid:'',
dynainstid:'',
configname:'',
systemid:'',
dynainstid:'',
status:'',
pdynainstid:'',
children: child
}
if(child && child.length > 0){
......@@ -1575,12 +1529,10 @@ export default class MainBase extends Vue implements ControlInterface {
const tree: any ={
groupById: Number((groupIndex+1)*100),
group: group,
configid:'',
dynainstid:'',
configname:'',
systemid:'',
dynainstid:'',
status:'',
pdynainstid:'',
children: children,
}
groupTree.push(tree);
......@@ -2010,16 +1962,10 @@ export default class MainBase extends Vue implements ControlInterface {
});
}
} else if(Object.is(errorMessage[index].data.errorKey, 'DuplicateKeyException')){
let name: string = this.service.getNameByProp("configid");
if(name){
let desc: any = this.allColumns.find((column: any) =>{
return Object.is(column.name, name);
});
this.$Notice.error({
title: (this.$t('app.commonWords.createFailed') as string),
desc: (desc ? desc.label : '') + " : " + item[name] + (this.$t('app.commonWords.isExist') as string) + '!',
});
}
this.$Notice.error({
title: (this.$t('app.commonWords.saveFailed') as string),
desc: errorMessage[index].data.message?errorMessage[index].data.message:(this.$t('app.commonWords.sysException') as string),
});
}else {
this.$Notice.error({
title: (this.$t('app.commonWords.saveFailed') as string),
......@@ -2128,7 +2074,6 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
let tempContext: any = this.$util.deepCopy(this.context);
Object.is(tempContext, { metadynamicmodel: data.configid });
const arg: any = JSON.parse(JSON.stringify(data));
Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = this.service.frontLogic(mode,JSON.parse(JSON.stringify(tempContext)),arg, showloading);
......
......@@ -41,11 +41,6 @@ export default class MainModel {
prop: 'status',
dataType: 'SSCODELIST',
},
{
name: 'configid',
prop: 'configid',
dataType: 'TEXT',
},
{
name: 'configname',
prop: 'configname',
......
......@@ -47,12 +47,12 @@ public class MetaDynamicModel extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 动态实例标识
* 动态实例
*/
@TableField(value = "dynainstid")
@JSONField(name = "dynainstid")
@JsonProperty("dynainstid")
@ApiModelProperty("动态实例标识")
@ApiModelProperty("动态实例")
private String dynainstid;
/**
* 状态
......@@ -72,37 +72,37 @@ public class MetaDynamicModel extends EntityMP implements Serializable {
@ApiModelProperty("文件")
private String modelfile;
/**
* 名称
* 配置名称
*/
@TableField(value = "configname")
@JSONField(name = "configname")
@JsonProperty("configname")
@ApiModelProperty("名称")
@ApiModelProperty("配置名称")
private String configname;
/**
* ID
* 配置标识
*/
@DEField(isKeyField = true)
@TableId(value = "configid", type = IdType.ASSIGN_UUID)
@JSONField(name = "configid")
@JsonProperty("configid")
@ApiModelProperty("ID")
@ApiModelProperty("配置标识")
private String configid;
/**
* 系统标识
* 系统
*/
@TableField(value = "systemid")
@JSONField(name = "system_id")
@JsonProperty("system_id")
@ApiModelProperty("系统标识")
@ApiModelProperty("系统")
private String systemId;
/**
* ID
* 父实例
*/
@TableField(value = "pdynainstid")
@JSONField(name = "pdynainstid")
@JsonProperty("pdynainstid")
@ApiModelProperty("ID")
@ApiModelProperty("父实例")
private String pdynainstid;
/**
......@@ -124,7 +124,7 @@ public class MetaDynamicModel extends EntityMP implements Serializable {
/**
* 设置 [动态实例标识]
* 设置 [动态实例]
*/
public void setDynainstid(String dynainstid) {
this.dynainstid = dynainstid;
......@@ -148,7 +148,7 @@ public class MetaDynamicModel extends EntityMP implements Serializable {
}
/**
* 设置 [名称]
* 设置 [配置名称]
*/
public void setConfigname(String configname) {
this.configname = configname;
......@@ -156,7 +156,7 @@ public class MetaDynamicModel extends EntityMP implements Serializable {
}
/**
* 设置 [系统标识]
* 设置 [系统]
*/
public void setSystemId(String systemId) {
this.systemId = systemId;
......@@ -164,7 +164,7 @@ public class MetaDynamicModel extends EntityMP implements Serializable {
}
/**
* 设置 [ID]
* 设置 [父实例]
*/
public void setPdynainstid(String pdynainstid) {
this.pdynainstid = pdynainstid;
......
......@@ -34,21 +34,21 @@ public class MetaDynamicModelSearchContext extends QueryWrapperContext<MetaDynam
this.getSearchCond().eq("status", n_status_eq);
}
}
private String n_configname_like;//[名称]
private String n_configname_like;//[配置名称]
public void setN_configname_like(String n_configname_like) {
this.n_configname_like = n_configname_like;
if(!ObjectUtils.isEmpty(this.n_configname_like)){
this.getSearchCond().like("configname", n_configname_like);
}
}
private String n_systemid_eq;//[系统标识]
private String n_systemid_eq;//[系统]
public void setN_systemid_eq(String n_systemid_eq) {
this.n_systemid_eq = n_systemid_eq;
if(!ObjectUtils.isEmpty(this.n_systemid_eq)){
this.getSearchCond().eq("systemid", n_systemid_eq);
}
}
private String n_pdynainstid_eq;//[ID]
private String n_pdynainstid_eq;//[父实例]
public void setN_pdynainstid_eq(String n_pdynainstid_eq) {
this.n_pdynainstid_eq = n_pdynainstid_eq;
if(!ObjectUtils.isEmpty(this.n_pdynainstid_eq)){
......
......@@ -4,7 +4,7 @@
<!--输出实体[BLADE_VISUAL]数据结构 -->
<changeSet author="root" id="tab-blade_visual-55-1">
<changeSet author="a_A_5d9d78509" id="tab-blade_visual-55-1">
<createTable tableName="blade_visual">
<column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_ID"/>
......@@ -36,7 +36,7 @@
<!--输出实体[BLADE_VISUAL_CATEGORY]数据结构 -->
<changeSet author="root" id="tab-blade_visual_category-23-2">
<changeSet author="a_A_5d9d78509" id="tab-blade_visual_category-23-2">
<createTable tableName="blade_visual_category">
<column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_CATEGORY_ID"/>
......@@ -52,7 +52,7 @@
<!--输出实体[BLADE_VISUAL_CONFIG]数据结构 -->
<changeSet author="root" id="tab-blade_visual_config-18-3">
<changeSet author="a_A_5d9d78509" id="tab-blade_visual_config-18-3">
<createTable tableName="blade_visual_config">
<column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_CONFIG_ID"/>
......@@ -68,7 +68,7 @@
<!--输出实体[BLADE_VISUAL_MAP]数据结构 -->
<changeSet author="root" id="tab-blade_visual_map-18-4">
<changeSet author="a_A_5d9d78509" id="tab-blade_visual_map-18-4">
<createTable tableName="blade_visual_map">
<column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_MAP_ID"/>
......@@ -86,7 +86,7 @@
<!--输出实体[DST_COMPONENT]数据结构 -->
<changeSet author="root" id="tab-dst_component-59-5">
<changeSet author="a_A_5d9d78509" id="tab-dst_component-59-5">
<createTable tableName="IBZCOMPONENT">
<column name="CID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_COMPONENT_CID"/>
......@@ -112,7 +112,7 @@
<!--输出实体[DST_CONFIG]数据结构 -->
<changeSet author="root" id="tab-dst_config-32-6">
<changeSet author="a_A_5d9d78509" id="tab-dst_config-32-6">
<createTable tableName="IBZCFG">
<column name="CFGID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_CONFIG_CFGID"/>
......@@ -134,7 +134,7 @@
<!--输出实体[DST_DATASOURCE]数据结构 -->
<changeSet author="root" id="tab-dst_datasource-75-7">
<changeSet author="a_A_5d9d78509" id="tab-dst_datasource-75-7">
<createTable tableName="IBZDATASOURCE">
<column name="DSID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_DATASOURCE_DSID"/>
......@@ -152,7 +152,7 @@
<!--输出实体[DST_ROUTER]数据结构 -->
<changeSet author="root" id="tab-dst_router-37-8">
<changeSet author="a_A_5d9d78509" id="tab-dst_router-37-8">
<createTable tableName="IBZROUTER">
<column name="ROUTERID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_ROUTER_ROUTERID"/>
......@@ -178,7 +178,7 @@
<!--输出实体[DST_SYSTEM]数据结构 -->
<changeSet author="root" id="tab-dst_system-45-9">
<changeSet author="a_A_5d9d78509" id="tab-dst_system-45-9">
<createTable tableName="IBZPSSYSTEM">
<column name="PSSYSTEMID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_SYSTEM_PSSYSTEMID"/>
......@@ -198,7 +198,7 @@
<!--输出实体[DST_VIEW]数据结构 -->
<changeSet author="root" id="tab-dst_view-46-10">
<changeSet author="a_A_5d9d78509" id="tab-dst_view-46-10">
<createTable tableName="IBZVIEW">
<column name="VIEWID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_VIEW_VIEWID"/>
......@@ -222,7 +222,7 @@
<!--输出实体[META_DATASET]数据结构 -->
<changeSet author="root" id="tab-meta_dataset-33-11">
<changeSet author="a_A_5d9d78509" id="tab-meta_dataset-33-11">
<createTable tableName="IBZDATASET">
<column name="DATASETID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_DATASET_DATASETID"/>
......@@ -244,7 +244,7 @@
<!--输出实体[META_DYNAMICMODEL]数据结构 -->
<changeSet author="root" id="tab-meta_dynamicmodel-44-12">
<changeSet author="a_A_5d9d78509" id="tab-meta_dynamicmodel-68-12">
<createTable tableName="IBZDYNAMICMODEL">
<column name="DYNAINSTID" remarks="" type="VARCHAR(100)">
</column>
......@@ -266,7 +266,7 @@
<!--输出实体[META_ENTITY]数据结构 -->
<changeSet author="root" id="tab-meta_entity-105-13">
<changeSet author="a_A_5d9d78509" id="tab-meta_entity-105-13">
<createTable tableName="IBZENTITY">
<column name="ENTITYID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_ENTITY_ENTITYID"/>
......@@ -298,7 +298,7 @@
<!--输出实体[META_FIELD]数据结构 -->
<changeSet author="root" id="tab-meta_field-153-14">
<changeSet author="a_A_5d9d78509" id="tab-meta_field-153-14">
<createTable tableName="IBZFIELD">
<column name="FIELDID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_FIELD_FIELDID"/>
......@@ -362,7 +362,7 @@
<!--输出实体[META_MODEL]数据结构 -->
<changeSet author="root" id="tab-meta_model-44-15">
<changeSet author="a_A_5d9d78509" id="tab-meta_model-44-15">
<createTable tableName="IBZMODEL">
<column name="MODELID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_MODEL_MODELID"/>
......@@ -388,7 +388,7 @@
<!--输出实体[META_MODULE]数据结构 -->
<changeSet author="root" id="tab-meta_module-34-16">
<changeSet author="a_A_5d9d78509" id="tab-meta_module-34-16">
<createTable tableName="IBZMODULE">
<column name="MODULEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_MODULE_MODULEID"/>
......@@ -406,7 +406,7 @@
<!--输出实体[META_RELATION]数据结构 -->
<changeSet author="root" id="tab-meta_relation-106-17">
<changeSet author="a_A_5d9d78509" id="tab-meta_relation-106-17">
<createTable tableName="IBZRELATION">
<column name="RELATIONID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_RELATION_RELATIONID"/>
......@@ -448,10 +448,10 @@
<!--输出实体[DST_VIEW]外键关系 -->
<!--输出实体[META_DATASET]外键关系 -->
<!--输出实体[META_DYNAMICMODEL]外键关系 -->
<changeSet author="root" id="fk-meta_dynamicmodel-44-18">
<changeSet author="a_A_5d9d78509" id="fk-meta_dynamicmodel-68-18">
<addForeignKeyConstraint baseColumnNames="SYSTEMID" baseTableName="IBZDYNAMICMODEL" constraintName="DER1N_META_DYNAMICMODEL_DST_SY" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PSSYSTEMID" referencedTableName="IBZPSSYSTEM" validate="true"/>
</changeSet>
<changeSet author="root" id="fk-meta_dynamicmodel-44-19">
<changeSet author="a_A_5d9d78509" id="fk-meta_dynamicmodel-68-19">
<addForeignKeyConstraint baseColumnNames="PDYNAINSTID" baseTableName="IBZDYNAMICMODEL" constraintName="DER1N_META_DYNAMICMODEL_META_D" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CONFIGID" referencedTableName="IBZDYNAMICMODEL" validate="true"/>
</changeSet>
<!--输出实体[META_ENTITY]外键关系 -->
......
......@@ -70,7 +70,6 @@
<!--数据查询[FINDDYNAMICS]-->
<sql id="FINDDYNAMICS" databaseId="mysql">
<![CDATA[ SELECT t1.`CONFIGID`, t1.`CONFIGNAME`, t1.`DYNAINSTID`, t1.`MODELFILE`, t1.`PDYNAINSTID`, t1.`STATUS`, t1.`SYSTEMID` FROM `IBZDYNAMICMODEL` t1
WHERE t1.`PDYNAINSTID` = #{srf.datacontext.configid}
]]>
</sql>
<!--数据查询[FINDDYNAMICS]-->
......
......@@ -1912,7 +1912,7 @@
{
"fieldname":"DYNAINSTID" ,
"codename":"Dynainstid",
"field_logic_name":"动态实例标识",
"field_logic_name":"动态实例",
"entity_name":"META_DYNAMICMODEL",
"field_type":"TEXT",
"nullable":1,
......@@ -1955,7 +1955,7 @@
{
"fieldname":"CONFIGNAME" ,
"codename":"Configname",
"field_logic_name":"名称",
"field_logic_name":"配置名称",
"entity_name":"META_DYNAMICMODEL",
"field_type":"TEXT",
"nullable":1,
......@@ -1969,7 +1969,7 @@
{
"fieldname":"CONFIGID" ,
"codename":"Configid",
"field_logic_name":"ID",
"field_logic_name":"配置标识",
"entity_name":"META_DYNAMICMODEL",
"field_type":"TEXT",
"nullable":1,
......@@ -1983,7 +1983,7 @@
{
"fieldname":"SYSTEMID" ,
"codename":"System_id",
"field_logic_name":"系统标识",
"field_logic_name":"系统",
"entity_name":"META_DYNAMICMODEL",
"ref_de":"DST_SYSTEM",
"ref_field_name":"PSSYSTEMID",
......@@ -2001,7 +2001,7 @@
{
"fieldname":"PDYNAINSTID" ,
"codename":"Pdynainstid",
"field_logic_name":"ID",
"field_logic_name":"父实例",
"entity_name":"META_DYNAMICMODEL",
"ref_de":"META_DYNAMICMODEL",
"ref_field_name":"CONFIGID",
......
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:flowable="http://flowable.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.flowable.org/processdef">
<process id="ibzlite-workflowv1" isClosed="false" isExecutable="true" name="1 v1" processType="None">
<extensionElements>
<flowable:eventListener delegateExpression="${processInstanceListener}" />
</extensionElements>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_ibzlite-workflowv1">
<bpmndi:BPMNPlane id="BPMNPlane_ibzlite-workflowv1" bpmnElement="ibzlite-workflowv1">
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
......@@ -39,7 +39,7 @@ public class MetaDynamicModelDTO extends DTOBase implements Serializable {
@JSONField(name = "dynainstid")
@JsonProperty("dynainstid")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("动态实例标识")
@ApiModelProperty("动态实例")
private String dynainstid;
/**
......@@ -69,7 +69,7 @@ public class MetaDynamicModelDTO extends DTOBase implements Serializable {
@JSONField(name = "configname")
@JsonProperty("configname")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("名称")
@ApiModelProperty("配置名称")
private String configname;
/**
......@@ -79,7 +79,7 @@ public class MetaDynamicModelDTO extends DTOBase implements Serializable {
@JSONField(name = "configid")
@JsonProperty("configid")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("ID")
@ApiModelProperty("配置标识")
private String configid;
/**
......@@ -89,7 +89,7 @@ public class MetaDynamicModelDTO extends DTOBase implements Serializable {
@JSONField(name = "system_id")
@JsonProperty("system_id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("系统标识")
@ApiModelProperty("系统")
private String systemId;
/**
......@@ -99,7 +99,7 @@ public class MetaDynamicModelDTO extends DTOBase implements Serializable {
@JSONField(name = "pdynainstid")
@JsonProperty("pdynainstid")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("ID")
@ApiModelProperty("父实例")
private String pdynainstid;
......
......@@ -78,12 +78,14 @@ public class DELogicAspect {
EntityBase entity = null;
if ("remove".equalsIgnoreCase(action) || "get".equalsIgnoreCase(action)) {
entity = getEntity(service.getClass());
String id = DEFieldCacheMap.getDEKeyField(entity.getClass());
if(StringUtils.isEmpty(id)) {
log.debug("无法获取实体主键属性[{}]",entity.getClass().getSimpleName());
return point.proceed();
if(!ObjectUtils.isEmpty(entity)) {
String id = DEFieldCacheMap.getDEKeyField(entity.getClass());
if(StringUtils.isEmpty(id)) {
log.debug("无法获取实体主键属性[{}]",entity.getClass().getSimpleName());
return point.proceed();
}
entity.set(id, arg);
}
entity.set(id, arg);
} else if (arg instanceof EntityBase) {
entity = (EntityBase) arg;
}
......@@ -187,7 +189,7 @@ public class DELogicAspect {
KieBuilder kieBuilder = kieServices.newKieBuilder(kieFileSystem).buildAll();
Results results = kieBuilder.getResults();
if (results.hasMessages(Message.Level.ERROR)) {
throw new BadRequestAlertException(String.format("编译实体处理逻辑 [%s] 发生异常, %s", logic.getName(), results.getMessages()), "LogicAspect", "reloadLogic");
throw new BadRequestAlertException(String.format("编译实体处理逻辑 [%s] 发生异常, %s", logic.getName(), results.getMessages()), "DELogicAspect", "reloadLogic");
}
KieContainer kieContainer = kieServices.newKieContainer(kieServices.getRepository().getDefaultReleaseId());
logic.setContainer(kieContainer);
......@@ -290,6 +292,7 @@ public class DELogicAspect {
logic.setMd5(getMd5(refFiles));
}
} catch (Exception e) {
log.error("执行处理逻辑失败"+e);
} finally {
try {
if (reader != null) {
......@@ -299,6 +302,7 @@ public class DELogicAspect {
bpmn.close();
}
} catch (Exception e) {
log.error("执行处理逻辑失败"+e);
}
}
return logic;
......@@ -326,7 +330,8 @@ public class DELogicAspect {
if(!ObjectUtils.isEmpty(service.getSuperclass()) && !service.getSuperclass().getName().equals(Object.class.getName())) {
return getEntity(service.getSuperclass());
}
throw new BadRequestAlertException("获取实体信息失败", "DELogicAspect", "getEntity");
log.error("获取实体信息失败,未能在[{}]中找到参数为实体类对象的行为,如create.update等",service.getSimpleName());
return null;
}
/**
......@@ -347,6 +352,7 @@ public class DELogicAspect {
buffer.append(strBpmn);
}
} catch (Exception e) {
log.error("处理逻辑版本检查失败"+e);
} finally {
if (bpmnFile != null) {
bpmnFile.close();
......@@ -359,6 +365,7 @@ public class DELogicAspect {
return null;
}
} catch (Exception e) {
log.error("处理逻辑版本检查失败"+e);
return null;
}
}
......@@ -418,6 +425,7 @@ public class DELogicAspect {
FileUtils.copyToFile(in, bpmn);
}
} catch (IOException e) {
log.error("执行处理逻辑失败,无法获取逻辑文件"+e);
} finally {
if (in != null) {
try {
......
......@@ -40,6 +40,10 @@ public class PermissionSyncJob implements ApplicationRunner {
@Lazy
IBZLiteFeignClient liteClient;
@Autowired
@Lazy
private cn.ibizlab.util.client.IBZWFFeignClient wfClient;
@Override
public void run(ApplicationArguments args) {
try {
......@@ -76,5 +80,23 @@ public class PermissionSyncJob implements ApplicationRunner {
} catch (Exception ex) {
log.error("向[lite]同步系统模型失败,请检查[lite]服务是否正常运行! {}", ex.getMessage());
}
try {
List<Map<String, Object>> workflows = new ArrayList(); //工作流
if (!ObjectUtils.isEmpty(this.getClass().getResourceAsStream("/workflow/Workflowv1.bpmn"))) {
workflows.add(new HashMap<String, Object>() {{
put("Workflowv1.bpmn", IOUtils.toString(this.getClass().getResourceAsStream("/workflow/Workflowv1.bpmn"), "UTF-8"));
}});
}
if (workflows.size() > 0) {
if (wfClient.deployBpmnFile(workflows)) {
log.info("向[wf]部署流程成功");
} else {
log.error("向[wf]部署流程失败");
}
}
} catch (Exception ex) {
log.error("向[wf]部署流程失败,请检查[wf]服务是否正常运行! {}", ex.getMessage());
}
}
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册