提交 d741b4d2 编写于 作者: tony001's avatar tony001

Merge branch 'dev'

上级 eadf97e2
......@@ -3,7 +3,7 @@ import { Vue, Component, Prop, Provide, Emit, Watch, Model,Inject } from 'vue-pr
import { CreateElement } from 'vue';
import { Subject, Subscription } from 'rxjs';
import { ControlInterface } from '@/interface/control';
import { UIActionTool,Util } from '@/utils';
import { UIActionTool,Util,ViewTool } from '@/utils';
import NavDataService from '@/service/app/navdata-service';
import AppCenterService from "@service/app/app-center-service";
<#if ctrl.getPSAppCounterRefs?? && ctrl.getPSAppCounterRefs()??>
......@@ -18,17 +18,20 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
import ${srfclassname('${appde.getCodeName()}')}Service from '@/service/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-service';
</#if>
import ${srfclassname('${ctrl.codeName}')}Service from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-service';
<#if ctrl.getPSUIActions?? && ctrl.getPSUIActions()??>
<#list ctrl.getPSUIActions() as uiAction>
<#if uiAction.getPSAppDataEntity()??>
<#assign curAppEntity = uiAction.getPSAppDataEntity()/>
<#if !P.exists("importService", curAppEntity.getId(), "")>
<#if !P.exists("importService", curAppEntity.getId(), "") >
import ${srfclassname('${curAppEntity.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(curAppEntity.getCodeName())}/${srffilepath2(curAppEntity.getCodeName())}-ui-service';
<#if appde?? && (curAppEntity.getId() == appde.getId())><#assign hasAppDE = true /></#if>
</#if>
</#if>
</#list>
</#if>
<#if appde?? && !hasAppDE??>
import ${srfclassname('${appde.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-ui-service';
</#if>
<#-- 语言资源入口 -->
<#ibizinclude>
./LANGBASE.vue.ftl
......@@ -188,6 +191,21 @@ ${P.getLogicCode(logic, "LOGIC.vue").code}
${P.getLogicCode(uiAction, "LOGIC.vue").code}
</#if>
</#list>
</#if>
<#if appde??>
/**
* 转化数据
*
* @param {any} args
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public transformData(args: any) {
let _this: any = this;
if(_this.service && _this.service.handleRequestData instanceof Function && _this.service.handleRequestData('transform',_this.context,args)){
return _this.service.handleRequestData('transform',_this.context,args)['data'];
}
}
</#if>
/**
......
......@@ -19,7 +19,7 @@
</#if>
</div>
<div v-else>
暂无数据
{{ $t('app.commonWords.noData') }}
</div>
</div>
</template>
......@@ -326,7 +326,7 @@
*/
public load(opt: any = {}): void {
if(!this.fetchAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图列表fetchAction参数未配置' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.list.notConfig.fetchAction') as string) });
return;
}
const arg: any = {...opt};
......@@ -352,7 +352,7 @@
post.then((response: any) => {
if (!response || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}
return;
}
......@@ -377,7 +377,7 @@
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '错误', desc: response.errorMessage });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
});
}
......@@ -390,7 +390,7 @@
*/
public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格removeAction参数未配置' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.list.notConfig.removeAction') as string) });
return;
}
if (datas.length === 0) {
......@@ -426,10 +426,10 @@
return new Promise((resolve: any, reject: any) => {
post.then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: '', desc: '删除数据失败,' + response.info });
this.$Notice.error({ title: '', desc: (this.$t('app.commonWords.delDataFail') as string) + ',' + response.info });
return;
} else {
this.$Notice.success({ title: '', desc: '删除成功!' });
this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.deleteSuccess') as string) });
}
//删除items中已删除的项
datas.forEach((data: any) => {
......@@ -448,7 +448,7 @@
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
reject(response);
return;
}
......@@ -459,8 +459,8 @@
dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '').replace(/[ ]/g, '');
this.$Modal.confirm({
title: '警告',
content: '确认要删除 ' + dataInfo + ',删除操作将不可恢复?',
title: (this.$t('app.commonWords.warning') as string),
content: (this.$t('app.list.confirmDel') as string) + ' ' + dataInfo + ',' + (this.$t('app.list.notRecoverable') as string) ,
onOk: () => {
removeData();
},
......@@ -485,7 +485,7 @@
try {
if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图列表createAction参数未配置' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.list.notConfig.createAction') as string) });
}else{
Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
......@@ -493,7 +493,7 @@
}
}else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图列表updateAction参数未配置' });
this.$Notice.error({ title: (this.$t('app.commonWords.warning') as string), desc: '${view.getName()}' + (this.$t('app.list.notConfig.updateAction') as string) });
}else{
Object.assign(item,{viewparams:this.viewparams});
<#if de??>
......@@ -513,10 +513,10 @@
this.$emit('save', successItems);
this.refresh();
if(errorItems.length === 0){
this.$Notice.success({ title: '', desc: '保存成功!' });
this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.saveSuccess') as string) });
}else{
errorItems.forEach((item:any,index:number)=>{
this.$Notice.error({ title: '保存失败', desc: item.majorentityname+'保存失败!' });
this.$Notice.error({ title: (this.$t('app.commonWords.saveFailed') as string), desc: item.majorentityname+ (this.$t('app.commonWords.saveFailed') as string) + '!' });
console.error(errorMessage[index]);
});
}
......
......@@ -6,7 +6,7 @@
<div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'>
<#if ctrl.isShowTitleBar()>
<div class='list-exp-bar-header'>
<#if ctrl.getTitle() == ''>列表导航栏<#else>${ctrl.getTitle()}</#if>
<#if ctrl.getTitle() == ''>{{$t('app.listExpBar.title')}}<#else>${ctrl.getTitle()}</#if>
</div>
</#if>
<div class="container-header">
......
......@@ -6,7 +6,7 @@
<div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'>
<#if ctrl.isShowTitleBar()>
<div class='dataview-exp-bar-header'>
<div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>卡片视图导航栏<#else>${ctrl.getTitle()}</#if></div>
<div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>{{ $t('app.dataViewExpBar.title') }}<#else>${ctrl.getTitle()}</#if></div>
</div>
</#if>
<div class="container-header">
......
......@@ -32,9 +32,9 @@
</#if>
</i-content>
<footer class="app-wizard-footer">
<i-button :disabled="isDisabled('PREV')" @click="onClickPrev()" type="primary">上一步</i-button>
<i-button :disabled="isDisabled('NEXT')" @click="onClickNext()" type="primary">下一步</i-button>
<i-button :disabled="isDisabled('FINISH')" @click="onClickFinish()" type="primary">完成</i-button>
<i-button :disabled="isDisabled('PREV')" @click="onClickPrev()" type="primary">{{$t('app.wizardPanel.back')}}</i-button>
<i-button :disabled="isDisabled('NEXT')" @click="onClickNext()" type="primary">{{$t('app.wizardPanel.next')}}</i-button>
<i-button :disabled="isDisabled('FINISH')" @click="onClickFinish()" type="primary">{{$t('app.wizardPanel.complete')}}</i-button>
</footer>
</layout>
</template>
......@@ -229,7 +229,7 @@
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '错误', desc: response.info });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
});
</#if>
}
......@@ -266,7 +266,7 @@
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '错误', desc: response.info });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
});
</#if>
}
......@@ -354,7 +354,7 @@
this.curState = 'NEXT';
this.wizardState.next({ tag: this.activeForm, action: 'save', data: this.formParam });
} else {
this.$Notice.error({ title: '错误', desc: '值规则校验异常' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.rulesException') as string) });
}
}
}
......@@ -373,7 +373,7 @@
this.curState = 'FINISH';
this.wizardState.next({ tag: this.activeForm, action: 'save', data: this.formParam });
} else {
this.$Notice.error({ title: '错误', desc: '值规则校验异常' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.rulesException') as string) });
}
}
}
......
......@@ -17,7 +17,7 @@
</div>
<div>
<i-button type="primary" @click="handleAdd" style="float: right;">
增加
{{ $t('app.local.add')}}
</i-button>
</div>
</div>
......@@ -341,7 +341,7 @@
*/
public load(data: any): void {
if(!this.fetchAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图多编辑视图面板fetchAction参数未配置' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.multiEditView.notConfig.fetchAction') as string) });
return;
}
let arg: any = {};
......@@ -351,7 +351,7 @@
promice.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}
return;
}
......@@ -365,7 +365,7 @@
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '错误', desc: response.errorMessage });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
});
}
......@@ -376,14 +376,14 @@
*/
public handleAdd(){
if(!this.loaddraftAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图多编辑视图面板loaddraftAction参数未配置' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.multiEditView.notConfig.loaddraftAction') as string) });
return;
}
const promice: Promise<any> = this.service.loadDraft(this.loaddraftAction,JSON.parse(JSON.stringify(this.context)),{viewparams:this.viewparams}, this.showBusyIndicator);
promice.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}
return;
}
......@@ -393,7 +393,7 @@
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '错误', desc: response.errorMessage });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
});
}
......
......@@ -13,12 +13,18 @@
<#if deuiaction.getUIActionTag() == 'ExportExcel'>
<app-export-excel :item="${ModelsName}.${item.name}" :caption="$t('${langbase}.${item.name}.caption')" @exportexcel="${ctrl.name}_click({ tag: '${item.name}' }, $event)"></app-export-excel>
<#else>
<@badge item>
<#if item.getPSUIAction?? && item.getPSUIAction()?? && item.getPSUIAction().getPSAppCounter?? && item.getPSUIAction().getPSAppCounter()??>
<#assign uiaction = item.getPSUIAction() />
<#assign counter = uiaction.getPSAppCounter() />
<Badge type="primary" v-show="${ModelsName}.${item.name}.visabled" :count="${srfclassname('${counter.getCodeName()}')}counterservice.counterData.<#if uiaction.getCounterId()??>${uiaction.getCounterId()}</#if>">
</#if>
<i-button v-show="${ModelsName}.${item.name}.visabled" :disabled="${ModelsName}.${item.name}.disabled" class='<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)">
<#if item.isShowIcon()><i class='<#if item.getPSSysImage()??><#assign img=item.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i></#if>
<#if item.isShowCaption()><span class='caption'>{{<#if langbase??>$t('${langbase}.${item.name}.caption')<#else>'${item.getCaption()}'</#if>}}</span></#if>
</i-button>
</@badge>
<#if item.getPSUIAction?? && item.getPSUIAction()?? && item.getPSUIAction().getPSAppCounter?? && item.getPSUIAction().getPSAppCounter()??>
</Badge>
</#if>
</#if>
<div slot='content'>{{<#if langbase??>$t('${langbase}.${item.name}.tip')<#else>'${item.getTooltip()}'</#if>}}</div>
</tooltip>
......@@ -26,12 +32,18 @@
<#if deuiaction.getUIActionTag() == 'ExportExcel'>
<app-export-excel :item="${ModelsName}.${item.name}" :caption="$t('${langbase}.${item.name}.caption')" @exportexcel="${ctrl.name}_click({ tag: '${item.name}' }, $event)"></app-export-excel>
<#else>
<@badge item>
<#if item.getPSUIAction?? && item.getPSUIAction()?? && item.getPSUIAction().getPSAppCounter?? && item.getPSUIAction().getPSAppCounter()??>
<#assign uiaction = item.getPSUIAction() />
<#assign counter = uiaction.getPSAppCounter() />
<Badge type="primary" v-show="${ModelsName}.${item.name}.visabled" :count="${srfclassname('${counter.getCodeName()}')}counterservice.counterData.<#if uiaction.getCounterId()??>${uiaction.getCounterId()}</#if>">
</#if>
<i-button v-show="${ModelsName}.${item.name}.visabled" :disabled="${ModelsName}.${item.name}.disabled" class='<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)">
<#if item.isShowIcon()><i class='<#if item.getPSSysImage()??><#assign img=item.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i></#if>
<#if item.isShowCaption()><span class='caption'>{{<#if langbase??>$t('${langbase}.${item.name}.caption')<#else>'${item.getCaption()}'</#if>}}</span></#if>
</i-button>
</@badge>
<#if item.getPSUIAction?? && item.getPSUIAction()?? && item.getPSUIAction().getPSAppCounter?? && item.getPSUIAction().getPSAppCounter()??>
</Badge>
</#if>
</#if>
</#if>
<#assign deuiaction=item.getPSUIAction()>
<#if deuiaction.getUIActionTag() == 'ExportExcel'>
${item.getName()?lower_case}: { name: '${item.getName()?lower_case}', <#if item.isShowCaption()>caption: '${item.caption}',</#if> disabled: false, type: '${item.getItemType()}', visabled: true, dataaccaction: '<#if deuiaction.getDataAccessAction()??>${deuiaction.getDataAccessAction()}</#if>', uiaction: { tag: '${deuiaction.getUIActionTag()}', target: '${deuiaction.getActionTarget()}' }<#if view.hasPSControl("GRID")><#assign gridhandler = view.getPSControl("GRID").getPSAjaxControlHandler()>, MaxRowCount: <#if gridhandler?? && gridhandler.getPSDEDataExport()??>${gridhandler.getPSDEDataExport().getMaxRowCount()?c}<#elseif sys.getDEDataExportMaxRowCount() gt 0>${sys.getDEDataExportMaxRowCount()?c}<#else>10000</#if></#if> },
${item.getName()?lower_case}: { name: '${item.getName()?lower_case}', <#if item.isShowCaption()>caption: '${item.caption}',</#if> disabled: false, type: '${item.getItemType()}', visabled: true,noprivdisplaymode:<#if item.getNoPrivDisplayMode()??>${item.getNoPrivDisplayMode()}</#if>,dataaccaction: '<#if deuiaction.getDataAccessAction()??>${deuiaction.getDataAccessAction()}</#if>', uiaction: { tag: '${deuiaction.getUIActionTag()}', target: '${deuiaction.getActionTarget()}' }<#if view.hasPSControl("GRID")><#assign gridhandler = view.getPSControl("GRID").getPSAjaxControlHandler()>, MaxRowCount: <#if gridhandler?? && gridhandler.getPSDEDataExport()??>${gridhandler.getPSDEDataExport().getMaxRowCount()?c}<#elseif sys.getDEDataExportMaxRowCount() gt 0>${sys.getDEDataExportMaxRowCount()?c}<#else>10000</#if></#if> },
<#elseif deuiaction.getUIActionTag() == 'ToggleRowEdit'>
${item.getName()?lower_case}: { name: '${item.getName()?lower_case}', <#if item.isShowCaption()>caption: '${item.caption}', </#if>disabled: false, type: '${item.getItemType()}', visabled: true, dataaccaction: '<#if deuiaction.getDataAccessAction()??>${deuiaction.getDataAccessAction()}</#if>', uiaction: { tag: '${deuiaction.getUIActionTag()}', target: '${deuiaction.getActionTarget()}' } },
${item.getName()?lower_case}: { name: '${item.getName()?lower_case}', <#if item.isShowCaption()>caption: '${item.caption}', </#if>disabled: false, type: '${item.getItemType()}', visabled: true,noprivdisplaymode:<#if item.getNoPrivDisplayMode()??>${item.getNoPrivDisplayMode()}</#if>,dataaccaction: '<#if deuiaction.getDataAccessAction()??>${deuiaction.getDataAccessAction()}</#if>', uiaction: { tag: '${deuiaction.getUIActionTag()}', target: '${deuiaction.getActionTarget()}' } },
<#else>
${item.getName()?lower_case}: { name: '${item.getName()?lower_case}', <#if item.isShowCaption()>caption: '${item.caption}', </#if>disabled: false, type: '${item.getItemType()}', visabled: true, dataaccaction: '<#if deuiaction.getDataAccessAction()??>${deuiaction.getDataAccessAction()}</#if>', uiaction: { tag: '${deuiaction.getUIActionTag()}', target: '${deuiaction.getActionTarget()}' } },
${item.getName()?lower_case}: { name: '${item.getName()?lower_case}', <#if item.isShowCaption()>caption: '${item.caption}', </#if>disabled: false, type: '${item.getItemType()}', visabled: true,noprivdisplaymode:<#if item.getNoPrivDisplayMode()??>${item.getNoPrivDisplayMode()}</#if>,dataaccaction: '<#if deuiaction.getDataAccessAction()??>${deuiaction.getDataAccessAction()}</#if>', uiaction: { tag: '${deuiaction.getUIActionTag()}', target: '${deuiaction.getActionTarget()}' } },
</#if>
\ No newline at end of file
......@@ -538,6 +538,7 @@ ${P.getLogicCode(singleFuncs,"LOGIC.vue").code}
public handleMenusResource(inputMenus:Array<any>){
if(Environment.enablePermissionValid){
this.computedEffectiveMenus(inputMenus);
this.computeParentMenus(inputMenus);
}
this.dataProcess(inputMenus);
this.menus = inputMenus;
......@@ -549,7 +550,7 @@ ${P.getLogicCode(singleFuncs,"LOGIC.vue").code}
/**
* 计算有效菜单项
*
* @param {*} data
* @param {*} inputMenus
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public computedEffectiveMenus(inputMenus:Array<any>){
......@@ -563,6 +564,29 @@ ${P.getLogicCode(singleFuncs,"LOGIC.vue").code}
})
}
/**
* 计算父项菜单项是否隐藏
*
* @param {*} inputMenus
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public computeParentMenus(inputMenus:Array<any>){
if(inputMenus && inputMenus.length >0){
inputMenus.forEach((item:any) =>{
if(item.hidden && item.items && item.items.length >0){
item.items.map((singleItem:any) =>{
if(!singleItem.hidden){
item.hidden = false;
}
if(singleItem.items && singleItem.items.length >0){
this.computeParentMenus(singleItem.items);
}
})
}
})
}
}
/**
* 数据处理
*
......
......@@ -5,7 +5,7 @@
<template slot-scope="{ data }">
<#if ctrl.getPSSearchBarFilters()??>
<#list ctrl.getPSSearchBarFilters() as filter>
<template v-if="Object.is(data.field, '${filter.getName()}')">
<template v-if="Object.is(data.editor, '${filter.getName()}')">
${P.getEditorCode(filter, "EDITOR.vue").code}
</template>
</#list>
......@@ -21,16 +21,16 @@
<el-select size="small" v-if="historyItems.length > 0" v-model="selectItem" @change="onFilterChange">
<el-option v-for="item in historyItems" :key="item.value" :label="item.name" :value="item.value"></el-option>
</el-select>
<i-button type="primary" @click="onSearch">搜索</i-button>
<i-button @click="onReset">重置</i-button>
<Poptip ref="propip" trigger="hover" placement="top-end" title="存储自定义查询" :width="250" @on-popper-show="openPoper">
<i-button type="primary" @click="onSearch">{{ $t('app.searchButton.search') }}</i-button>
<i-button @click="onReset">{{ $t('app.searchButton.reset') }}</i-button>
<Poptip ref="propip" trigger="hover" placement="top-end" :title="$t('app.searchForm.custom')" :width="250" @on-popper-show="openPoper">
<i-button><i class="fa fa-floppy-o" aria-hidden="true"></i></i-button>
<template slot="content">
<div>
<i-input v-model="saveItemName" placeholder="名称"></i-input>
<i-input v-model="saveItemName" :placeholder="$t('app.searchForm.title')"></i-input>
<div class="save-action">
<i-button @click="onCancel">取消</i-button>
<i-button type="primary" @click="onOk">保存</i-button>
<i-button @click="onCancel">{{ $t('app.commonWords.cancel') }}</i-button>
<i-button type="primary" @click="onOk">{{ $t('app.commonWords.save') }}</i-button>
</div>
</div>
</template>
......@@ -83,6 +83,9 @@ FilterTree,
label: '<#if filter.getPSDEField()??>${filter.getPSDEField().getLogicName()}</#if>',
name: '${filter.getName()}',
prop: '<#if filter.getPSDEField()??>${filter.getPSDEField().getCodeName()?lower_case}<#else>${filter.getName()}</#if>',
<#if filter.getPSDEFSearchMode()??>
mode: '${filter.getPSDEFSearchMode().getValueOP()}',
</#if>
disabled: false
},
</#list>
......@@ -223,9 +226,9 @@ FilterTree,
datas.forEach((data: any) => {
let item: any = {};
if(data.field && data.mode) {
let field: any = this.detailsModel[data.field];
item[field.prop] = {};
item[field.prop][data.mode] = (data[data.field] == null ? '' : data[data.field]);
item[data.field] = {};
let valField: string = data.editor ? data.editor : data.field;
item[data.field][data.mode] = (data[valField] == null ? '' : data[valField]);
result.push(item)
} else if(Object.is(data.label, '$and')) {
let items: any[] = this.transformAnd(data.children);
......@@ -249,9 +252,9 @@ FilterTree,
datas.forEach((data: any) => {
let item: any = {};
if(data.field && data.mode) {
let field: any = this.detailsModel[data.field];
item[field.prop] = {};
item[field.prop][data.mode] = (data[data.field] == null ? '' : data[data.field]);
item[data.field] = {};
let valField: string = data.editor ? data.editor : data.field;
item[data.field][data.mode] = (data[valField] == null ? '' : data[valField]);
result.push(item);
} else if(Object.is(data.label, '$and')) {
item[data.label] = this.transformAnd(data.children);
......
......@@ -467,7 +467,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
if (value && value.startsWith('%') && value.endsWith('%')) {
const key: string = value.substring(1, value.length - 1);
if (!this.data.hasOwnProperty(key)) {
this.$Notice.error({ title: '错误', desc: `操作失败,未能找到当前表单项${r'${key}'},无法继续操作` });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: `<#noparse>${(this.$t('app.formpage.desc1') as string)}${r'${key}'},${(this.$t('app.formpage.desc2') as string)}</#noparse>` });
return false;
}
value = this.data[key];
......@@ -609,7 +609,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/
public load(opt: any = {}): void {
if(!this.loadAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图搜索表单loadAction参数未配置' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -629,7 +629,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return;
}
......@@ -646,7 +646,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/
public loadDraft(opt: any = {},mode?:string): void {
if(!this.loaddraftAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图搜索表单loaddraftAction参数未配置' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return;
}
const arg: any = { ...opt } ;
......@@ -655,7 +655,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}
return;
}
......@@ -687,7 +687,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return;
}
......
......@@ -3,7 +3,7 @@
<#if ctrl.render??><#t>
${ctrl.render.code}
<#else><#t>
<div v-if="isNoData" class="chart-no-data"><i class="el-icon-data-analysis"></i>暂无数据</div>
<div v-if="isNoData" class="chart-no-data"><i class="el-icon-data-analysis"></i>{{$t('app.commonWords.noData')}}</div>
<div v-else class="app-charts" :id="chartId" style="<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()};</#if>height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()}px<#else>100%</#if>;padding: 6px 0;"></div>
</#if>
</div>
......@@ -635,7 +635,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
}
// 补全空白分类
if(returnArray.length >0){
let emptyText = (groupFieldModel[0] && groupFieldModel[0].codeList)?groupFieldModel[0].codeList.emptytext:"未定义";
let emptyText = (groupFieldModel[0] && groupFieldModel[0].codeList)?groupFieldModel[0].codeList.emptytext:(this.$t('app.chart.undefined') as string);
returnArray.forEach((item:any) =>{
if(!item[groupField[0]]){
item[groupField[0]] = emptyText;
......@@ -701,11 +701,11 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
return Number(a[groupField[0].name]) - Number(b[groupField[0].name]);
});
}else if(Object.is(groupField[0].groupMode,"QUARTER")){
returnArray = this.handleSortGroupData(arr,groupField,"季度");
returnArray = this.handleSortGroupData(arr,groupField,(this.$t('app.chart.quarter') as string));
}else if(Object.is(groupField[0].groupMode,"MONTH")){
returnArray = this.handleSortGroupData(arr,groupField,"月");
returnArray = this.handleSortGroupData(arr,groupField,(this.$t('app.calendar.month') as string));
}else if(Object.is(groupField[0].groupMode,"YEARWEEK")){
returnArray = this.handleSortGroupData(arr,groupField,"周");
returnArray = this.handleSortGroupData(arr,groupField,(this.$t('app.calendar.week') as string));
}else if(Object.is(groupField[0].groupMode,"DAY")){
returnArray = arr.sort((a:any, b:any) => {
return moment(a[groupField[0].name]).unix() - moment(b[groupField[0].name]).unix();
......@@ -743,7 +743,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
arr.forEach((item:any) =>{
let sortFieldValue:Array<any> = item[groupField[0].name].split("-");
Object.assign(item,{sortField:Number(sortFieldValue[0])*10000+Number(sortFieldValue[1])});
item[groupField[0].name] = sortFieldValue[0]+"年"+sortFieldValue[1]+label;
item[groupField[0].name] = sortFieldValue[0]+(this.$t('app.chart.year') as string)+sortFieldValue[1]+label;
})
arr.sort((a:any, b:any) => {
return Number(a.sortField) - Number(b.sortField);
......
......@@ -3,7 +3,7 @@
<#if ctrl.render??><#t>
${ctrl.render.code}
<#else><#t>
<div v-if="isNoData" class="chart-no-data"><i class="el-icon-data-analysis"></i>暂无数据</div>
<div v-if="isNoData" class="chart-no-data"><i class="el-icon-data-analysis"></i>{{$t('app.commonWords.noData')}}</div>
<div v-else class="app-charts" :id="chartId" style="<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()};</#if>height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()}px<#else>100%</#if>;padding: 6px 0;"></div>
</#if>
</div>
......@@ -635,7 +635,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
}
// 补全空白分类
if(returnArray.length >0){
let emptyText = (groupFieldModel[0] && groupFieldModel[0].codeList)?groupFieldModel[0].codeList.emptytext:"未定义";
let emptyText = (groupFieldModel[0] && groupFieldModel[0].codeList)?groupFieldModel[0].codeList.emptytext:(this.$t('app.chart.undefined') as string);
returnArray.forEach((item:any) =>{
if(!item[groupField[0]]){
item[groupField[0]] = emptyText;
......@@ -701,11 +701,11 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
return Number(a[groupField[0].name]) - Number(b[groupField[0].name]);
});
}else if(Object.is(groupField[0].groupMode,"QUARTER")){
returnArray = this.handleSortGroupData(arr,groupField,"季度");
returnArray = this.handleSortGroupData(arr,groupField,(this.$t('app.chart.quarter') as string));
}else if(Object.is(groupField[0].groupMode,"MONTH")){
returnArray = this.handleSortGroupData(arr,groupField,"月");
returnArray = this.handleSortGroupData(arr,groupField,(this.$t('app.calendar.month') as string));
}else if(Object.is(groupField[0].groupMode,"YEARWEEK")){
returnArray = this.handleSortGroupData(arr,groupField,"周");
returnArray = this.handleSortGroupData(arr,groupField,(this.$t('app.calendar.week') as string));
}else if(Object.is(groupField[0].groupMode,"DAY")){
returnArray = arr.sort((a:any, b:any) => {
return moment(a[groupField[0].name]).unix() - moment(b[groupField[0].name]).unix();
......@@ -743,7 +743,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
arr.forEach((item:any) =>{
let sortFieldValue:Array<any> = item[groupField[0].name].split("-");
Object.assign(item,{sortField:Number(sortFieldValue[0])*10000+Number(sortFieldValue[1])});
item[groupField[0].name] = sortFieldValue[0]+"年"+sortFieldValue[1]+label;
item[groupField[0].name] = sortFieldValue[0]+(this.$t('app.chart.year') as string)+sortFieldValue[1]+label;
})
arr.sort((a:any, b:any) => {
return Number(a.sortField) - Number(b.sortField);
......
......@@ -278,7 +278,7 @@ import UtilService from '@/utilservice/util-service';
public handleClick(){
const view:any ={
viewname: 'app-portal-design',
title: '面板设计',
title: (this.$t('app.dashBoard.handleClick.title')),
width: 1600,
placement: 'DRAWER_RIGHT'
}
......
......@@ -54,7 +54,7 @@
</i-col>
</a>
</row>
<div v-else class="app-data-empty">暂无数据</div>
<div v-else class="app-data-empty">{{ $t('app.commonWords.noData') }}</div>
</#if>
</div>
</template>
......@@ -410,7 +410,7 @@
*/
public load(opt: any = {}, isReset: boolean = false): void {
if(!this.fetchAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图列表fetchAction参数未配置' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.list.notConfig.fetchAction') as string) });
return;
}
const arg: any = {...opt};
......@@ -434,7 +434,7 @@
post.then((response: any) => {
if (!response || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}
return;
}
......@@ -463,7 +463,7 @@
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '错误', desc: response.errorMessage });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
});
}
......@@ -476,7 +476,7 @@
*/
public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格removeAction参数未配置' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.gridpage.notConfig.removeAction') as string) });
return;
}
let _datas:any[] = [];
......@@ -509,9 +509,9 @@
});
if (_datas.length < 5) {
dataInfo = dataInfo + ' 共' + _datas.length + '条数据';
dataInfo = dataInfo + ' ' + (this.$t('app.dataView.sum') as string) + _datas.length + (this.$t('app.dataView.data') as string);
} else {
dataInfo = dataInfo + '...' + ' 共' + _datas.length + '条数据';
dataInfo = dataInfo + '...' + ' ' + (this.$t('app.dataView.sum') as string) + _datas.length + (this.$t('app.dataView.data') as string);
}
const removeData = () => {
......@@ -525,10 +525,10 @@
return new Promise((resolve: any, reject: any) => {
post.then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: '', desc: '删除数据失败,' + response.info });
this.$Notice.error({ title: '', desc: (this.$t('app.commonWords.delDataFail') as string) + ',' + response.info });
return;
} else {
this.$Notice.success({ title: '', desc: '删除成功!' });
this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.deleteSuccess') as string) });
}
//删除items中已删除的项
_datas.forEach((data: any) => {
......@@ -547,7 +547,7 @@
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
reject(response);
return;
}
......@@ -558,8 +558,8 @@
dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '').replace(/[ ]/g, '');
this.$Modal.confirm({
title: '警告',
content: '确认要删除 ' + dataInfo + ',删除操作将不可恢复?',
title: (this.$t('app.commonWords.warning') as string),
content: (this.$t('app.gridpage.confirmDel') as string) + ' ' + dataInfo + ',' + (this.$t('app.gridpage.notRecoverable') as string),
onOk: () => {
removeData();
},
......@@ -585,7 +585,7 @@
try {
if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图列表createAction参数未配置' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.list.notConfig.createAction') as string) });
}else{
Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
......@@ -593,7 +593,7 @@
}
}else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图列表updateAction参数未配置' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.list.notConfig.updateAction') as string) });
}else{
Object.assign(item,{viewparams:this.viewparams});
<#if de??>
......@@ -613,10 +613,10 @@
this.$emit('save', successItems);
this.refresh();
if(errorItems.length === 0){
this.$Notice.success({ title: '', desc: '保存成功!' });
this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.saveSuccess') as string) });
}else{
errorItems.forEach((item:any,index:number)=>{
this.$Notice.error({ title: '保存失败', desc: item.majorentityname+'保存失败!' });
this.$Notice.error({ title: (this.$t('app.commonWords.saveFailed') as string), desc: item.majorentityname + (this.$t('app.commonWords.saveFailed') as string) + '!' });
console.error(errorMessage[index]);
});
}
......
......@@ -6,7 +6,7 @@
<div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'>
<#if ctrl.isShowTitleBar()>
<div class='calendar-exp-bar-header'>
<div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>日历导航栏<#else>${ctrl.getTitle()}</#if></div>
<div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>{{ $t('app.calendarExpBar.title') }}<#else>${ctrl.getTitle()}</#if></div>
</div>
</#if>
<div class="container-header">
......
......@@ -31,7 +31,7 @@
<context-menu :contextMenuStyle="{width: '100%'}" :data="item" :renderContent="renderContextMenu">
<el-card @click.native="onEventClick(item,true,$event)" :class="item.className">
<h4>{{item.title}}</h4>
<p>从 {{item.start}} 至 {{item.end}}</p>
<p>{{$t('app.calendar.from')}} {{item.start}} {{$t('app.calendar.to')}} {{item.end}}</p>
</el-card>
</context-menu>
</el-timeline-item>
......@@ -405,7 +405,7 @@ FullCalendar,
post.then((response: any) => {
if (!response || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}
return;
}
......@@ -416,7 +416,7 @@ FullCalendar,
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '错误', desc: response.errorMessage });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
});
}
......@@ -606,7 +606,7 @@ FullCalendar,
post.then((response: any) => {
if (!response || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}
return;
}
......@@ -614,7 +614,7 @@ FullCalendar,
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '错误', desc: response.errorMessage });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
});
}
......
......@@ -170,7 +170,7 @@
Object.assign(params,{viewparams:tempViewParams});
this.service.getNodes(tempContext,params).then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: "错误", desc: response.info });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
return;
}
response.data.forEach((item: any) => {
......@@ -192,7 +192,7 @@
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: "错误", desc: response.info });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
});
}
......
......@@ -446,7 +446,7 @@
Object.assign(params,{viewparams:tempViewParams});
this.service.getNodes(tempContext,params).then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: "错误", desc: response.info });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
resolve([]);
return;
}
......@@ -466,7 +466,7 @@
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: "错误", desc: response.info });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
});
}
......@@ -530,7 +530,7 @@
const get: Promise<any> = this.service.getNodes(JSON.parse(JSON.stringify(this.context)),arg);
get.then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: '错误', desc: response.info });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
return;
}
const _items = [...response.data];
......@@ -545,7 +545,7 @@
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '错误', desc: response.info });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
});
}
......
......@@ -6,7 +6,7 @@
<div slot='left'>
<#if ctrl.isShowTitleBar()>
<div class='tree-exp-bar-header'>
<div class="tree-exp-bar-title"><#if ctrl.getTitle() == ''>树视图导航栏<#else>${ctrl.getTitle()}</#if></div>
<div class="tree-exp-bar-title"><#if ctrl.getTitle() == ''>{{ $t('app.treeExpBar.title') }}<#else>${ctrl.getTitle()}</#if></div>
<#if ctrl.getPSControls()??>
<#assign controls = ctrl.getPSControls()/>
<#list controls as singleControl>
......
......@@ -3,7 +3,7 @@
<div slot='left'>
<#if ctrl.isShowTitleBar()>
<div class='workflow-exp-bar-header'>
<div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>流程导航栏<#else>${ctrl.getTitle()}</#if></div>
<div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>{{$t('app.wfExpBar.title')}}<#else>${ctrl.getTitle()}</#if></div>
</div>
</#if>
<#if ctrl.isEnableSearch()>
......
......@@ -63,8 +63,8 @@
</div>
<div class="app-wizard-footer">
<i-button v-if="isVisiable('${form.name}','PREV')" @click="onClickPrev('${form.name}')" ><Icon type="ios-arrow-back"></Icon></i-button>
<i-button v-if="isVisiable('${form.name}','NEXT')" @click="onClickNext('${form.name}')" type="primary" long>下一步</i-button>
<i-button v-if="isVisiable('${form.name}','FINISH')" @click="onClickFinish('${form.name}')" type="primary" long>完成</i-button>
<i-button v-if="isVisiable('${form.name}','NEXT')" @click="onClickNext('${form.name}')" type="primary" long>{{$t('app.wizardPanel.next')}}</i-button>
<i-button v-if="isVisiable('${form.name}','FINISH')" @click="onClickFinish('${form.name}')" type="primary" long>{{$t('app.wizardPanel.complete')}}</i-button>
</div>
</div>
</el-popover>
......@@ -358,7 +358,7 @@
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '错误', desc: response.info });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
});
</#if>
}
......@@ -395,7 +395,7 @@
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '错误', desc: response.info });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
});
</#if>
}
......@@ -543,7 +543,7 @@
this.curState = 'NEXT';
this.wizardState.next({ tag: name, action: 'save', data: this.formParam });
} else {
this.$Notice.error({ title: '错误', desc: '值规则校验异常' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.rulesException') as string) });
}
}
}
......@@ -562,7 +562,7 @@
this.curState = 'FINISH';
this.wizardState.next({ tag: name, action: 'save', data: this.formParam });
} else {
this.$Notice.error({ title: '错误', desc: '值规则校验异常' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.rulesException') as string) });
}
}
}
......
......@@ -257,7 +257,7 @@ GanttElastic,
Object.assign(params,{viewparams:tempViewParams});
this.service.getNodes(tempContext,params).then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: "错误", desc: response.info });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
return;
}
this.tasks = [...this.tasks, ...response.data];
......@@ -271,7 +271,7 @@ GanttElastic,
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: "错误", desc: response.info });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
});
}
......
......@@ -384,7 +384,7 @@ draggable,
*/
public load(opt: any = {}, isReset: boolean = false): void {
if(!this.fetchAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图列表fetchAction参数未配置' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.kanban.notConfig.fetchAction') as string) });
return;
}
const arg: any = {...opt};
......@@ -408,7 +408,7 @@ draggable,
post.then((response: any) => {
if (!response || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}
return;
}
......@@ -438,7 +438,7 @@ draggable,
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '错误', desc: response.errorMessage });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
});
}
......@@ -451,7 +451,7 @@ draggable,
*/
public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格removeAction参数未配置' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.kanban.notConfig.removeAction') as string) });
return;
}
let _datas:any[] = [];
......@@ -500,10 +500,10 @@ draggable,
return new Promise((resolve: any, reject: any) => {
post.then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: '', desc: '删除数据失败,' + response.info });
this.$Notice.error({ title: '', desc: (this.$t('app.commonWords.delDataFail') as string) + ',' + response.info });
return;
} else {
this.$Notice.success({ title: '', desc: '删除成功!' });
this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.deleteSuccess') as string) });
}
//删除items中已删除的项
_datas.forEach((data: any) => {
......@@ -522,7 +522,7 @@ draggable,
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
reject(response);
return;
}
......@@ -533,8 +533,8 @@ draggable,
dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '').replace(/[ ]/g, '');
this.$Modal.confirm({
title: '警告',
content: '确认要删除 ' + dataInfo + ',删除操作将不可恢复?',
title: (this.$t('app.commonWords.warning') as string),
content: (this.$t('app.kanban.delete1') as string) + dataInfo + ',' + (this.$t('app.kanban.delete2') as string),
onOk: () => {
removeData();
},
......@@ -560,7 +560,7 @@ draggable,
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
this.setGroups();
return;
......@@ -571,11 +571,11 @@ draggable,
this.$emit('update', this.items);
}).catch((response: any) => {
if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return;
}
});
......
......@@ -4,7 +4,7 @@
<#if item.render??>
${item.render.code}
<#else>
<app-form-group :manageContainerStatus="detailsModel.${item.name}.manageContainerStatus" :isManageContainer="detailsModel.${item.name}.isManageContainer" @managecontainerclick="manageContainerClick('${item.name}')" layoutType="<#if item.getPSLayout()??>${item.getPSLayout().getLayout()}</#if>" titleStyle="<#if item.getLabelPSSysCss?? && item.getLabelPSSysCss()??>${item.getLabelPSSysCss().getCssName()}</#if>" class='<#if item.getPSSysCss?? && item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' :uiActionGroup="detailsModel.${item.name}.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="<#if langbase??>$t('${langbase}.details.${item.name}')<#else>'${item.getCaption()}'</#if>" :isShowCaption="${item.isShowCaption()?c}" uiStyle="${item.getDetailStyle()}" :titleBarCloseMode="${item.getTitleBarCloseMode()}" :isInfoGroupMode="${item.isInfoGroupMode()?c}" <#if item.getPSSysImage()??>:iconInfo="{<#assign img=item.getPSSysImage()><#if img.getImagePath() == "">'iconclass':'${img.getCssClass()}'<#else>'iconpath':'${img.getImagePath()}'</#if>}"</#if>>
<app-form-group :uiService="appUIService" :data="transformData(data)" :manageContainerStatus="detailsModel.${item.name}.manageContainerStatus" :isManageContainer="detailsModel.${item.name}.isManageContainer" @managecontainerclick="manageContainerClick('${item.name}')" layoutType="<#if item.getPSLayout()??>${item.getPSLayout().getLayout()}</#if>" titleStyle="<#if item.getLabelPSSysCss?? && item.getLabelPSSysCss()??>${item.getLabelPSSysCss().getCssName()}</#if>" class='<#if item.getPSSysCss?? && item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' :uiActionGroup="detailsModel.${item.name}.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="<#if langbase??>$t('${langbase}.details.${item.name}')<#else>'${item.getCaption()}'</#if>" :isShowCaption="${item.isShowCaption()?c}" uiStyle="${item.getDetailStyle()}" :titleBarCloseMode="${item.getTitleBarCloseMode()}" :isInfoGroupMode="${item.isInfoGroupMode()?c}" <#if item.getPSSysImage()??>:iconInfo="{<#assign img=item.getPSSysImage()><#if img.getImagePath() == "">'iconclass':'${img.getCssClass()}'<#else>'iconpath':'${img.getImagePath()}'</#if>}"</#if>>
<#assign content>
<#list item.getPSDEFormDetails() as formmenber>
<#if !(formmenber.isHidden?? && formmenber.isHidden())>
......
<#ibizinclude>
../@MACRO/CONTROL/LANGBASE.vue.ftl
</#ibizinclude>
<#assign detail>caption: '${item.getCaption()}', detailType: '${item.getDetailType()}', name: '${item.getName()}', visible: <#if item.getPSDEFDGroupLogic('PANELVISIBLE')??>false<#else>true</#if>, isShowCaption: ${item.isShowCaption()?c}, form: this, isControlledContent: <#if item.getShowMoreMode() == 1>true<#else>false</#if> </#assign>
<#assign detail>caption: '${item.getCaption()}', detailType: '${item.getDetailType()}', name: '${item.getName()}', visible: <#if item.getPSDEFDGroupLogic('PANELVISIBLE')??>false<#else>true</#if>, isShowCaption: ${item.isShowCaption()?c}, form: this, isControlledContent: <#if item.getShowMoreMode?? && item.getShowMoreMode()?? && item.getShowMoreMode() == 1>true<#else>false</#if> </#assign>
<#if item.getDetailType() == 'BUTTON'>
new FormButtonModel({ ${detail}<#if item.getPSUIAction()??><#assign uiaction=item.getPSUIAction()>, uiaction: { type: '${uiaction.getUIActionType()}',
tag: '${uiaction.getUIActionTag()}'<#if (uiaction.getActionTarget()!="")>, actiontarget: '${uiaction.getActionTarget()}'</#if> }</#if> })
......@@ -14,7 +14,7 @@ new FormPageModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMPART'>
new FormPartModel({ ${detail} })
<#elseif item.getDetailType() == 'GROUPPANEL'>
new FormGroupPanelModel({ ${detail}, uiActionGroup: { caption: '<#if item.getPSUIActionGroup()??>${item.getPSUIActionGroup().getName()}</#if>', langbase: '<#if langbase??>${langbase}</#if>', extractMode: '<#if item.getActionGroupExtractMode?? && item.getActionGroupExtractMode()??>${item.getActionGroupExtractMode()}<#else>ITEM</#if>', details: [<#if item.getPSUIActionGroup()??><#list item.getPSUIActionGroup().getPSUIActionGroupDetails() as uadetails><#if uadetails_index gt 0>, </#if>{ name: '${item.getName()}_${uadetails.getName()}', caption: '${uadetails.getPSUIAction().getCaption()}', uiactiontag: '<#if uadetails.getPSUIAction().getPSAppDataEntity?? && uadetails.getPSUIAction().getPSAppDataEntity()??>${uadetails.getPSUIAction().getPSAppDataEntity().getCodeName()?lower_case}_</#if>${uadetails.getPSUIAction().getUIActionTag()?lower_case}'<#if uadetails.getPSUIAction().getPSSysImage()??>, <#assign viewimg=uadetails.getPSUIAction().getPSSysImage()/><#if viewimg.getCssClass() != ''>icon: '${viewimg.getCssClass()}'<#else>img: '${viewimg.getImagePath()}'</#if></#if>,isShowCaption:${uadetails.isShowCaption()?c},isShowIcon:${uadetails.isShowIcon()?c} }</#list></#if>] }, isManageContainer: <#if item.getShowMoreMode() == 2>true<#else>false</#if>, showMoreModeItems: [<#if item.getPSDEFormDetails()??><#list item.getPSDEFormDetails() as moreItem><#if moreItem.getShowMoreMode() == 1>'${moreItem.getName()}',</#if></#list></#if>] })
new FormGroupPanelModel({ ${detail}, uiActionGroup: { caption: '<#if item.getPSUIActionGroup()??>${item.getPSUIActionGroup().getName()}</#if>', langbase: '<#if langbase??>${langbase}</#if>', extractMode: '<#if item.getActionGroupExtractMode?? && item.getActionGroupExtractMode()??>${item.getActionGroupExtractMode()}<#else>ITEM</#if>', details: [<#if item.getPSUIActionGroup()??><#list item.getPSUIActionGroup().getPSUIActionGroupDetails() as uadetails><#if uadetails_index gt 0>, </#if>{ name: '${item.getName()}_${uadetails.getName()}', caption: '${uadetails.getPSUIAction().getCaption()}',disabled: false, visabled: true, noprivdisplaymode:<#if uadetails.getPSUIAction()?? && uadetails.getPSUIAction().getNoPrivDisplayMode(view)??>${uadetails.getPSUIAction().getNoPrivDisplayMode(view)}</#if>,dataaccaction: '<#if uadetails.getPSUIAction()?? && uadetails.getPSUIAction().getDataAccessAction()??>${uadetails.getPSUIAction().getDataAccessAction()}</#if>',uiactiontag: '<#if uadetails.getPSUIAction().getPSAppDataEntity?? && uadetails.getPSUIAction().getPSAppDataEntity()??>${uadetails.getPSUIAction().getPSAppDataEntity().getCodeName()?lower_case}_</#if>${uadetails.getPSUIAction().getUIActionTag()?lower_case}'<#if uadetails.getPSUIAction().getPSSysImage()??>, <#assign viewimg=uadetails.getPSUIAction().getPSSysImage()/><#if viewimg.getCssClass() != ''>icon: '${viewimg.getCssClass()}'<#else>img: '${viewimg.getImagePath()}'</#if></#if>,isShowCaption:${uadetails.isShowCaption()?c},isShowIcon:${uadetails.isShowIcon()?c} }</#list></#if>] }, isManageContainer: <#if item.getShowMoreMode?? && item.getShowMoreMode()?? && item.getShowMoreMode() == 2>true<#else>false</#if>, showMoreModeItems: [<#if item.getPSDEFormDetails()??><#list item.getPSDEFormDetails() as moreItem><#if moreItem.getShowMoreMode?? && moreItem.getShowMoreMode()?? && moreItem.getShowMoreMode() == 1>'${moreItem.getName()}',</#if></#list></#if>] })
<#elseif item.getDetailType() == 'IFRAME'>
new FormIFrameModel({ ${detail} })
<#elseif item.getDetailType() == 'RAWITEM'>
......
......@@ -75,15 +75,12 @@
<div style="text-align: center;">
<#if item.getPSDEUIActionGroup().getPSDEUIActions()??>
<#list item.getPSDEUIActionGroup().getPSUIActionGroupDetails() as uiactionDetail>
<#if uiactionDetail_index gt 0>
<divider type='vertical'></divider>
</#if>
<#if uiactionDetail.getPSUIAction?? && uiactionDetail.getPSUIAction()??>
<#assign uiaction = uiactionDetail.getPSUIAction() />
<#if !uiactionDetail.isShowCaption()>
<tooltip :transfer="true" :max-width="600">
</#if>
<a @click="uiAction(scope.row, '${uiaction.getUIActionTag()}', $event)">
<a v-show="scope.row.${uiaction.getUIActionTag()}.visabled" :style="{'pointer-events':scope.row.${uiaction.getUIActionTag()}.disabled?'none':'auto'}" @click="uiAction(scope.row, '${uiaction.getUIActionTag()}', $event)">
<#if uiactionDetail.isShowIcon()><i class='<#if uiaction.getIconCls?? && uiaction.getIconCls()??>${uiaction.getIconCls()}</#if>'></i></#if>
<#if uiactionDetail.isShowCaption()>{{<#if langbase??>$t('${langbase}.uiactions.${uiaction.getUIActionTag()?lower_case}')<#else>'${uiaction.getCaption()}'</#if>}}</#if>
</a>
......@@ -91,6 +88,9 @@
<div slot='content'>{{<#if langbase??>$t('${langbase}.uiactions.${uiaction.getUIActionTag()?lower_case}')<#else>'${uiaction.getCaption()}'</#if>}}</div>
</tooltip>
</#if>
<#if uiactionDetail_has_next>
<divider type='vertical' v-show="scope.row.${uiaction.getUIActionTag()}.visabled" ></divider>
</#if>
</#if>
</#list>
</#if>
......
......@@ -88,6 +88,10 @@ ${P.getCtrlCode('searchform', 'MODEL_CONTENT.ts').code}
name:'query',
prop:'query'
},
{
name:'filter',
prop:'filter'
},
{
name:'page',
prop:'page'
......
......@@ -6,7 +6,7 @@
<div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'>
<#if ctrl.isShowTitleBar()>
<div class='grid-exp-bar-header'>
<div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>表格导航栏<#else>${ctrl.getTitle()}</#if></div>
<div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>{{ $t('app.gridBar.title') }}<#else>${ctrl.getTitle()}</#if></div>
</div>
</#if>
<div class="container-header">
......
......@@ -2,6 +2,6 @@
<app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<img class="logout-bg" src="/assets/img/logout_bg.png"/>
<div class="logout-container">
尊敬的客户您好,您已成功退出系统,将在 <a>{{this.countdown}}</a> 秒后跳转至<a @click="gotoLoginView">登录页</a>!
{{ $t('app.viewLayoutPanel.appLogoutView.prompt1') }} <a>{{this.countdown}}</a> {{ $t('app.viewLayoutPanel.appLogoutView.prompt2') }} <a @click="gotoLoginView">{{ $t('app.viewLayoutPanel.appLogoutView.loginpage') }}</a>!
</div>
</div>
\ No newline at end of file
<div class="${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<div>应用流程处理记录视图</div>
<div>{{$t('app.viewLayoutPanel.appWfstepTraceView.title')}}</div>
</div>
\ No newline at end of file
......@@ -5,7 +5,7 @@
../@MACRO/VIEW_CAPTION.vue.ftl
</#ibizinclude>
<div class='content-container'>
应用流程跟踪视图
{{$t('app.viewLayoutPanel.appWfstepDataView.title')}}
</div>
</card>
</div>
\ No newline at end of file
......@@ -5,18 +5,18 @@
<div class="login-title">{{$t(model.srfTitle)}}</div>
<i-form class="login-form">
<form-item>
<i-input type="text" v-model="formData.loginname" placeholder="用户名" clearable>
<i-input type="text" v-model="formData.loginname" :placeholder="$t('app.viewLayoutPanel.appLoginView.username')" clearable>
<icon type="ios-person-outline" slot="prepend"></icon>
</i-input>
</form-item>
<form-item>
<i-input type="password" v-model="formData.password" placeholder="密码" clearable>
<i-input type="password" v-model="formData.password" :placeholder="$t('app.viewLayoutPanel.appLoginView.password')" clearable>
<icon type="ios-lock-outline" slot="prepend"></icon>
</i-input>
</form-item>
</i-form>
<div class="form-submit">
<i-button @click="handleSubmit" long type="primary">登录</i-button>
<i-button @click="handleSubmit" long type="primary">{{ $t('app.viewLayoutPanel.appLoginView.login') }}</i-button>
</div>
</div>
</div>
......@@ -102,6 +102,20 @@
}
}
#move_axis{
position: absolute;
left: 195px;
width: 5px;
height: 100%;
cursor: w-resize;
background-color: rgba(255,255,255,0);
}
.index_sider{
flex: none!important;
max-width: none !important;
transition: none 0s ease 0s;
}
/*** BRGIN:滚动条样式 ***/
::-webkit-scrollbar {
background: transparent;
......
......@@ -9,8 +9,8 @@
<div class="index_view ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<layout :class="themeClasses" :style="themeStyle">
<layout>
<sider :width="collapseChange ? 64 : 200" hide-trigger v-model="collapseChange">
<layout id="movebox">
<sider class="index_sider" :width="collapseChange ? 64 : 200" hide-trigger v-model="collapseChange" id= "left_move">
<div class="sider-top">
<div class="page-logo">
<#if view.getAppIconPath() != "">
......@@ -24,7 +24,8 @@
${P.getCtrlCode('appmenu', 'CONTROL.html').code}
<context-menu-drag v-if="isEnableAppSwitch" :contextMenuDragVisiable="contextMenuDragVisiable"></context-menu-drag>
</sider>
<layout>
<div v-show="!collapseChange" id="move_axis"></div>
<layout id="right_move">
<header class="index_header">
<div class="header-left" >
<div class="page-logo">
......@@ -41,7 +42,7 @@
<app-theme style="width:45px;display: flex;justify-content: center;"></app-theme>
</div>
</header>
<content :class="{'index_content':true,'index_tab_content':Object.is(navModel,'tab')?true:false,'index_route_content':Object.is(navModel,'route')?true:false}" :style="{'width':this.collapseChange ? 'calc(100vw - 64px)' : 'calc(100vw - 200px)' }" @click="contextMenuDragVisiable=false">
<content :class="{'index_content':true,'index_tab_content':Object.is(navModel,'tab')?true:false,'index_route_content':Object.is(navModel,'route')?true:false}" @click="contextMenuDragVisiable=false">
<tab-page-exp v-if="Object.is(navModel,'tab')"></tab-page-exp>
<app-keep-alive :routerList="getRouterList">
<router-view :key="getRouterViewKey"></router-view>
......
......@@ -93,7 +93,7 @@
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<div>无扩展插件</div>
<div>{{$t('app.portlet.noExtensions')}}</div>
</#if>
</div>
<#-- 操作栏 -->
......
<app-rich-text-editor :formState="formState" :value="data.${editor.name}" @change="(val) =>{this.data.${editor.name} =val}" :disabled="detailsModel.${editor.name}.disabled" name="${editor.name}"<#if editor.getEditorHeight() gt 0> height={${editor.getEditorHeight()?c}}</#if> style="${editor.getEditorCssStyle()}"></app-rich-text-editor>
\ No newline at end of file
<app-rich-text-editor :formState="formState" :value="data.${editor.name}" @change="(val) =>{this.data.${editor.name} =val}" :disabled="detailsModel.${editor.name}.disabled" :data="JSON.stringify(this.data)" name="${editor.name}" :uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>' :exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>' <#if editor.getEditorHeight() gt 0> height={${editor.getEditorHeight()?c}}</#if> style="${editor.getEditorCssStyle()}"></app-rich-text-editor>
\ No newline at end of file
......@@ -6,6 +6,7 @@
:viewparams="viewparams"
:localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled"
<#if editor.getPSCodeList()??>
<#assign codelist=editor.getPSCodeList()>
tag='${codelist.codeName}'
......
......@@ -14,6 +14,7 @@ import { Subject,Subscription } from 'rxjs';
<#if view.getPSAppDataEntity?? && view.getPSAppDataEntity()??>
<#assign appde = view.getPSAppDataEntity()/>
import ${srfclassname('${appde.getCodeName()}')}Service from '@/service/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-service';
import ${srfclassname('${appde.getCodeName()}')}AuthService from '@/authservice/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-auth-service';
</#if>
<#if view.getPSAppViewEngines()??>
......@@ -32,15 +33,13 @@ import ${engine.getEngineType()}Engine from '@engine/${engine.getEngineCat()?low
import ${srfclassname('${uiAction.getPSAppWFVer().getCodeName()}')}WFUIService from '@/wfuiservice/${uiAction.getPSAppWF().getCodeName()?lower_case}/${uiAction.getPSAppWFVer().getCodeName()?lower_case}-ui-service';
</#if>
</#if>
<#else>
<#assign curAppEntity = uiAction.getPSAppDataEntity()/>
<#if !P.exists("importService1", curAppEntity.getId(), "")>
import ${srfclassname('${curAppEntity.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(curAppEntity.getCodeName())}/${srffilepath2(curAppEntity.getCodeName())}-ui-service';
</#if>
</#if>
</#if>
</#list>
</#if>
<#if appde??>
import ${srfclassname('${appde.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-ui-service';
</#if>
<#if import_block??>
${import_block}
</#if>
......@@ -60,6 +59,14 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
* @memberof ${srfclassname('${view.name}')}Base
*/
public appEntityService: ${srfclassname('${appde.getCodeName()}')}Service = new ${srfclassname('${appde.getCodeName()}')}Service;
/**
* 实体权限服务对象
*
* @type ${srfclassname('${appde.getCodeName()}')}UIService
* @memberof ${srfclassname('${view.name}')}Base
*/
public appUIService: ${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService(this.$store);
</#if>
<#if view.getPSAppCounterRefs()??>
......
......@@ -10,6 +10,7 @@
this.viewState.next({ tag: 'appmenu', action: 'load', data: {} });
this.$viewTool.setIndexParameters([{ pathName: '${view.getCodeName()?lower_case}', parameterName: '${view.getCodeName()?lower_case}' }]);
this.$viewTool.setIndexViewParam(this.context);
this.mouse_move();
<#-- let loader:any = document.getElementById('app-loader');
loader.parentNode.removeChild(loader); -->
</#assign>
......@@ -213,6 +214,52 @@
return this.$route.fullPath;
}
/**
* 鼠标拖动事件
*
* @param {*} val
* @returns {*}
* @memberof ${srfclassname('${view.name}')}Base
*/
public mouse_move(){
let move_axis:any = document.getElementById("move_axis");
let left_move :any= document.getElementById("left_move");
let right_move :any= document.getElementById("right_move");
let movebox :any= document.getElementById("movebox");
let leftWidth :number = parseInt(left_move.style.width);
move_axis.onmousedown = (e:any) =>{
let startX = e.clientX;
move_axis.left = move_axis.offsetLeft;
document.onmousemove = (e:any) =>{
let endX = e.clientX;
let moveLen = move_axis.left + (endX - startX);
let maxT = movebox.clientWidth - move_axis.offsetWidth;
if (moveLen < 150) moveLen = 150;
if (moveLen > maxT - 150) moveLen = maxT - 150;
move_axis.style.left = moveLen;
left_move.style.width = moveLen + "px";
right_move.style.width = (movebox.clientWidth - moveLen - 5) + "px";
if (moveLen>500) {
left_move.style.width = 500 + 'px';
}
let left_width : number = parseInt(left_move.style.width);
move_axis.style.left = left_width - 5 + 'px';
if (left_width < leftWidth){
move_axis.style.left = leftWidth - 5 + 'px';
}
}
document.onmouseup = (evt) =>{
document.onmousemove = null;
document.onmouseup = null;
move_axis.releaseCapture && move_axis.releaseCapture();
}
move_axis.setCapture && move_axis.setCapture();
return false;
}
}
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
<#ibiztemplate>
TARGET=PSAPPDATAENTITY
</#ibiztemplate>
import AuthService from '../auth-service';
/**
* ${de.getLogicName()}权限服务对象基类
*
* @export
* @class ${srfclassname('${item.getCodeName()}')}AuthServiceBase
* @extends {AuthService}
*/
export default class ${srfclassname('${item.getCodeName()}')}AuthServiceBase extends AuthService {
/**
* Creates an instance of ${srfclassname('${item.getCodeName()}')}AuthServiceBase.
*
* @param {*} [opts={}]
* @memberof ${srfclassname('${item.getCodeName()}')}AuthServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 根据当前数据获取实体操作标识
*
* @param {*} mainSateOPPrivs 传入数据操作标识
* @returns {any}
* @memberof ${srfclassname('${item.getCodeName()}')}AuthServiceBase
*/
public getOPPrivs(mainSateOPPrivs:any):any{
let curDefaultOPPrivs:any = JSON.parse(JSON.stringify(this.defaultOPPrivs));
if(mainSateOPPrivs){
Object.assign(curDefaultOPPrivs,mainSateOPPrivs);
}
return curDefaultOPPrivs;
}
}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPDATAENTITY
</#ibiztemplate>
import ${srfclassname('${item.getCodeName()}')}AuthServiceBase from './${srffilepath2(item.getCodeName())}-auth-service-base';
/**
* ${de.getLogicName()}权限服务对象
*
* @export
* @class ${srfclassname('${item.getCodeName()}')}AuthService
* @extends {${srfclassname('${item.getCodeName()}')}AuthServiceBase}
*/
export default class ${srfclassname('${item.getCodeName()}')}AuthService extends ${srfclassname('${item.getCodeName()}')}AuthServiceBase {
/**
* Creates an instance of ${srfclassname('${item.getCodeName()}')}AuthService.
*
* @param {*} [opts={}]
* @memberof ${srfclassname('${item.getCodeName()}')}AuthService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
/**
* 实体权限服务注册中心
*
* @export
* @class AuthServiceRegister
*/
export class AuthServiceRegister {
/**
* 所有实体权限服务Map
*
* @protected
* @type {*}
* @memberof AuthServiceRegister
*/
protected allAuthService: Map<string, () => Promise<any>> = new Map();
/**
* 已加载实体权限服务Map缓存
*
* @protected
* @type {Map<string, any>}
* @memberof AuthServiceRegister
*/
protected serviceCache: Map<string, any> = new Map();
/**
* Creates an instance of AuthServiceRegister.
* @memberof AuthServiceRegister
*/
constructor() {
this.init();
}
/**
* 初始化
*
* @protected
* @memberof AuthServiceRegister
*/
protected init(): void {
<#if app.getAllPSAppDataEntities()??>
<#list app.getAllPSAppDataEntities() as curAppEntity>
this.allAuthService.set('${curAppEntity.getCodeName()?lower_case}', () => import('@/authservice/${srffilepath2(curAppEntity.getCodeName())}/${srffilepath2(curAppEntity.getCodeName())}-auth-service'));
</#list>
</#if>
}
/**
* 加载实体权限服务
*
* @protected
* @param {string} serviceName
* @returns {Promise<any>}
* @memberof AuthServiceRegister
*/
protected async loadService(serviceName: string): Promise<any> {
const service = this.allAuthService.get(serviceName);
if (service) {
return service();
}
}
/**
* 获取应用实体权限服务
*
* @param {string} name
* @returns {Promise<any>}
* @memberof AuthServiceRegister
*/
public async getService(name: string): Promise<any> {
if (this.serviceCache.has(name)) {
return this.serviceCache.get(name);
}
const authService: any = await this.loadService(name);
if (authService && authService.default) {
const instance: any = new authService.default();
this.serviceCache.set(name, instance);
return instance;
}
}
}
export const authServiceRegister: AuthServiceRegister = new AuthServiceRegister();
\ No newline at end of file
......@@ -18,9 +18,23 @@ export default {
success: "Success",
ok: "OK",
cancel: "Cancel",
save: "Save",
codeNotExist: 'Code list does not exist',
reqException: "Request exception",
sysException: "System abnormality",
warning: "Warning",
wrong: "Error",
rulesException: "Abnormal value check rule",
saveSuccess: "Saved successfully",
saveFailed: "Save failed",
deleteSuccess: "Successfully deleted!",
deleteError: "Failed to delete",
delDataFail: "Failed to delete data",
noData: "No data",
},
local:{
new: "New"
new: "New",
add: "Add",
},
gridpage: {
choicecolumns: "Choice columns",
......@@ -28,6 +42,50 @@ export default {
show: "Show",
records: "records",
totle: "totle",
noData: "No data",
valueVail: "Value cannot be empty",
notConfig: {
fetchAction: "The view table fetchaction parameter is not configured",
removeAction: "The view table removeaction parameter is not configured",
createAction: "The view table createaction parameter is not configured",
updateAction: "The view table updateaction parameter is not configured",
loaddraftAction: "The view table loadtrafaction parameter is not configured",
},
data: "Data",
delDataFail: "Failed to delete data",
delSuccess: "Delete successfully!",
confirmDel: "Are you sure you want to delete",
notRecoverable: "delete will not be recoverable?",
notBatch: "Batch addition not implemented",
grid: "Grid",
exportFail: "Data export failed",
sum: "Total",
formitemFailed: "Form item update failed",
},
list: {
notConfig: {
fetchAction: "View list fetchAction parameter is not configured",
removeAction: "View table removeAction parameter is not configured",
createAction: "View list createAction parameter is not configured",
updateAction: "View list updateAction parameter is not configured",
},
confirmDel: "Are you sure you want to delete",
notRecoverable: "delete will not be recoverable?",
},
listExpBar: {
title: "List navigation bar",
},
wfExpBar: {
title: "Process navigation bar",
},
calendarExpBar:{
title: "Calendar navigation bar",
},
treeExpBar: {
title: "Tree view navigation bar",
},
portlet: {
noExtensions: "No extensions",
},
tabpage: {
sureclosetip: {
......@@ -52,6 +110,8 @@ export default {
list: "list",
dateSelectModalTitle: "select the time you wanted",
gotoDate: "goto",
from: "From",
to: "To",
},
// 非实体视图
views: {
......@@ -81,6 +141,94 @@ export default {
},
</#list>
},
formpage:{
error: "Error",
desc1: "Operation failed, failed to find current form item",
desc2: "Can't continue",
notconfig: {
loadaction: "View form loadAction parameter is not configured",
loaddraftaction: "View form loaddraftAction parameter is not configured",
actionname: "View form actionName parameter is not configured",
removeaction: "View form removeAction parameter is not configured",
},
saveerror: "Error saving data",
savecontent: "The data is inconsistent. The background data may have been modified. Do you want to reload the data?",
valuecheckex: "Value rule check exception",
savesuccess: "Saved successfully!",
deletesuccess: "Successfully deleted!",
workflow: {
starterror: "Workflow started successfully",
startsuccess: "Workflow failed to start",
submiterror: "Workflow submission failed",
submitsuccess: "Workflow submitted successfully",
},
updateerror: "Form item update failed",
},
gridBar: {
title: "Table navigation bar",
},
multiEditView: {
notConfig: {
fetchAction: "View multi-edit view panel fetchAction parameter is not configured",
loaddraftAction: "View multi-edit view panel loaddraftAction parameter is not configured",
},
},
dataViewExpBar: {
title: "Card view navigation bar",
},
kanban: {
notConfig: {
fetchAction: "View list fetchAction parameter is not configured",
removeAction: "View table removeAction parameter is not configured",
},
delete1: "Confirm to delete ",
delete2: "the delete operation will be unrecoverable!",
},
dashBoard: {
handleClick: {
title: "Panel design",
},
},
dataView: {
sum: "total",
data: "data",
},
chart: {
undefined: "Undefined",
quarter: "Quarter",
year: "Year",
},
searchForm: {
notConfig: {
loadAction: "View search form loadAction parameter is not configured",
loaddraftAction: "View search form loaddraftAction parameter is not configured",
},
custom: "Store custom queries",
title: "Name",
},
wizardPanel: {
back: "Back",
next: "Next",
complete: "Complete",
},
viewLayoutPanel: {
appLogoutView: {
prompt1: "Dear customer, you have successfully exited the system, after",
prompt2: "seconds, we will jump to the",
logingPage: "login page",
},
appWfstepTraceView: {
title: "Application process processing record view",
},
appWfstepDataView: {
title: "Application process tracking view",
},
appLoginView: {
username: "Username",
password: "Password",
login: "Login",
},
},
},
entities: {
<#list app.getAllPSAppDataEntities() as dataEntitey>
......
......@@ -18,9 +18,23 @@ export default {
success: "成功",
ok: "确认",
cancel: "取消",
save: "保存",
codeNotExist: "代码表不存在",
reqException: "请求异常",
sysException: "系统异常",
warning: "警告",
wrong: "错误",
rulesException: "值规则校验异常",
saveSuccess: "保存成功",
saveFailed: "保存失败",
deleteSuccess: "删除成功!",
deleteError: "删除失败!",
delDataFail: "删除数据失败",
noData: "暂无数据",
},
local:{
new: "新建"
new: "新建",
add: "增加",
},
gridpage: {
choicecolumns: "选择列",
......@@ -28,6 +42,50 @@ export default {
show: "显示",
records: "条",
totle: "共",
noData: "无数据",
valueVail: "值不能为空",
notConfig: {
fetchAction: "视图表格fetchAction参数未配置",
removeAction: "视图表格removeAction参数未配置",
createAction: "视图表格createAction参数未配置",
updateAction: "视图表格updateAction参数未配置",
loaddraftAction: "视图表格loaddraftAction参数未配置",
},
data: "数据",
delDataFail: "删除数据失败",
delSuccess: "删除成功!",
confirmDel: "确认要删除",
notRecoverable: "删除操作将不可恢复?",
notBatch: "批量添加未实现",
grid: "表",
exportFail: "数据导出失败",
sum: "合计",
formitemFailed: "表单项更新失败",
},
list: {
notConfig: {
fetchAction: "视图列表fetchAction参数未配置",
removeAction: "视图表格removeAction参数未配置",
createAction: "视图列表createAction参数未配置",
updateAction: "视图列表updateAction参数未配置",
},
confirmDel: "确认要删除",
notRecoverable: "删除操作将不可恢复?",
},
listExpBar: {
title: "列表导航栏",
},
wfExpBar: {
title: "流程导航栏",
},
calendarExpBar:{
title: "日历导航栏",
},
treeExpBar: {
title: "树视图导航栏",
},
portlet: {
noExtensions: "无扩展插件",
},
tabpage: {
sureclosetip: {
......@@ -52,6 +110,8 @@ export default {
list: "列",
dateSelectModalTitle: "选择要跳转的时间",
gotoDate: "跳转",
from: "从",
to: "至",
},
// 非实体视图
views: {
......@@ -81,6 +141,93 @@ export default {
},
</#list>
},
formpage:{
desc1: "操作失败,未能找到当前表单项",
desc2: "无法继续操作",
notconfig: {
loadaction: "视图表单loadAction参数未配置",
loaddraftaction: "视图表单loaddraftAction参数未配置",
actionname: "视图表单'+actionName+'参数未配置",
removeaction: "视图表单removeAction参数未配置",
},
saveerror: "保存数据发生错误",
savecontent: "数据不一致,可能后台数据已经被修改,是否要重新加载数据?",
valuecheckex: "值规则校验异常",
savesuccess: "保存成功!",
deletesuccess: "删除成功!",
workflow: {
starterror: "工作流启动失败",
startsuccess: "工作流启动成功",
submiterror: "工作流提交失败",
submitsuccess: "工作流提交成功",
},
updateerror: "表单项更新失败",
},
gridBar: {
title: "表格导航栏",
},
multiEditView: {
notConfig: {
fetchAction: "视图多编辑视图面板fetchAction参数未配置",
loaddraftAction: "视图多编辑视图面板loaddraftAction参数未配置",
},
},
dataViewExpBar: {
title: "卡片视图导航栏",
},
kanban: {
notConfig: {
fetchAction: "视图列表fetchAction参数未配置",
removeAction: "视图表格removeAction参数未配置",
},
delete1: "确认要删除 ",
delete2: "删除操作将不可恢复?",
},
dashBoard: {
handleClick: {
title: "面板设计",
},
},
dataView: {
sum: "共",
data: "条数据",
},
chart: {
undefined: "未定义",
quarter: "季度",
year: "年",
},
searchForm: {
notConfig: {
loadAction: "视图搜索表单loadAction参数未配置",
loaddraftAction: "视图搜索表单loaddraftAction参数未配置",
},
custom: "存储自定义查询",
title: "名称",
},
wizardPanel: {
back: "上一步",
next: "下一步",
complete: "完成",
},
viewLayoutPanel: {
appLogoutView: {
prompt1: "尊敬的客户您好,您已成功退出系统,将在",
prompt2: "秒后跳转至",
logingPage: "登录页",
},
appWfstepTraceView: {
title: "应用流程处理记录视图",
},
appWfstepDataView: {
title: "应用流程跟踪视图",
},
appLoginView: {
username: "用户名",
password: "密码",
login: "登录",
},
},
},
entities: {
<#list app.getAllPSAppDataEntities() as dataEntitey>
......
......@@ -25,7 +25,7 @@ import { Verify } from '@/utils/verify/verify';
<#-- 源参数属性名称 -->
<#if logicparam.getSrcFieldName()??>
<#assign srcFieldParamName = logicparam.getSrcFieldName() />
<#if srcParam.getParamPSAppDataEntity().getPSAppDEField(srcFieldParamName,true)??>
<#if srcParam?? && srcParam.getParamPSAppDataEntity?? && srcParam.getParamPSAppDataEntity()?? && srcParam.getParamPSAppDataEntity().getPSAppDEField(srcFieldParamName,true)??>
<#assign srcFieldParam=srfcaseformat(srcParam.getParamPSAppDataEntity().getPSAppDEField(srcFieldParamName,true).getCodeName()?lower_case,'l_u2lC') />
<#else>
<#assign srcFieldParam= logicparam.getSrcFieldName()?lower_case />
......@@ -35,7 +35,7 @@ import { Verify } from '@/utils/verify/verify';
<#assign dstParam = logicparam.getDstPSDELogicParam() />
<#-- 目标参数属性名称 -->
<#assign dstFieldParamName = logicparam.getDstFieldName() />
<#if dstParam.getParamPSAppDataEntity().getPSAppDEField(dstFieldParamName,true)??>
<#if dstParam?? && dstParam.getParamPSAppDataEntity?? && dstParam.getParamPSAppDataEntity()?? && dstParam.getParamPSAppDataEntity().getPSAppDEField(dstFieldParamName,true)??>
<#assign dstFieldParam=srfcaseformat(dstParam.getParamPSAppDataEntity().getPSAppDEField(dstFieldParamName,true).getCodeName()?lower_case,'l_u2lC') />
<#else>
<#assign dstFieldParam= logicparam.getDstPSDELogicParam()?lower_case />
......
<#ibiztemplate>
TARGET=PSAPPDATAENTITY
</#ibiztemplate>
<#macro getMainStateOPPrivs mainState>
<#compress>
<#if mainState.getPSDEMainStateOPPrivs?? && mainState.getPSDEMainStateOPPrivs()??>
{<#list mainState.getPSDEMainStateOPPrivs() as mainStateOPPriv>'${mainStateOPPriv.getName()}':<#if mainState.isOPPrivAllowMode()>1<#else>0</#if><#if mainStateOPPriv_has_next>,</#if></#list>}
<#else>
{}
</#if>
</#compress>
</#macro>
import { Environment } from '@/environments/environment';
import { UIActionTool,Util } from '@/utils';
import UIService from '../ui-service';
import { Subject } from 'rxjs';
import ${srfclassname('${item.getCodeName()}')}Service from '@/service/${srffilepath2(item.getCodeName())}/${srffilepath2(item.getCodeName())}-service';
import ${srfclassname('${item.getCodeName()}')}AuthService from '@/authservice/${srffilepath2(item.getCodeName())}/${srffilepath2(item.getCodeName())}-auth-service';
<#if item.getAllPSAppDEUIActions()??>
<#list item.getAllPSAppDEUIActions() as appdeUIAction>
<#if appdeUIAction.getPSAppDataEntity()??>
......@@ -85,6 +95,13 @@ export default class ${srfclassname('${item.getCodeName()}')}UIServiceBase exten
*/
public allDeMainStateMap:Map<string,string> = new Map();
/**
* 主状态操作标识Map
*
* @memberof ${srfclassname('${item.getCodeName()}')}UIServiceBase
*/
public allDeMainStateOPPrivsMap:Map<string,any> = new Map();
/**
* Creates an instance of ${srfclassname('${item.getCodeName()}')}UIServiceBase.
*
......@@ -93,8 +110,10 @@ export default class ${srfclassname('${item.getCodeName()}')}UIServiceBase exten
*/
constructor(opts: any = {}) {
super(opts);
this.authService = new ${srfclassname('${item.getCodeName()}')}AuthService(opts);
this.initViewMap();
this.initDeMainStateMap();
this.initDeMainStateOPPrivsMap();
}
/**
......@@ -121,9 +140,21 @@ export default class ${srfclassname('${item.getCodeName()}')}UIServiceBase exten
<#if demState.getMSTag()??>
this.allDeMainStateMap.set('${demState.getMSTag()}','${demState.getMSTag()}');
</#if>
<#-- <#if demState.getId()?? && demState.getMSTag()??>
this.allDeMainStateMap.set('${demState.getId()}','${demState.getMSTag()}');
</#if> -->
</#list>
</#if>
}
/**
* 初始化主状态操作标识
*
* @memberof ${srfclassname('${item.getCodeName()}')}UIServiceBase
*/
public initDeMainStateOPPrivsMap(){
<#if item.getPSDataEntity?? && item.getPSDataEntity()?? && item.getPSDataEntity().getAllPSDEMainStates()??>
<#list item.getPSDataEntity().getAllPSDEMainStates() as demState>
<#if demState.getMSTag()??>
this.allDeMainStateOPPrivsMap.set('${demState.getMSTag()}',<@getMainStateOPPrivs mainState=demState />);
</#if>
</#list>
</#if>
}
......@@ -218,12 +249,12 @@ ${P.getLogicCode(appdeUIAction, "LOGIC.vue").code}
}
if(!Environment.isAppMode){
if(this.getDEMainStateTag(curData)){
<#noparse>return `MOBEDITVIEW:MSTAG:${ await this.getDEMainStateTag(curData)}`;</#noparse>
<#noparse>return `MOBEDITVIEW:MSTAG:${ this.getDEMainStateTag(curData)}`;</#noparse>
}
return 'MOBEDITVIEW:';
}
if(this.getDEMainStateTag(curData)){
<#noparse>return `EDITVIEW:MSTAG:${ await this.getDEMainStateTag(curData)}`;</#noparse>
<#noparse>return `EDITVIEW:MSTAG:${ this.getDEMainStateTag(curData)}`;</#noparse>
}
return 'EDITVIEW:';
}
......@@ -302,7 +333,7 @@ ${P.getLogicCode(appdeUIAction, "LOGIC.vue").code}
* @param curData 当前数据
* @memberof ${srfclassname('${item.getCodeName()}')}UIServiceBase
*/
public async getDEMainStateTag(curData:any){
public getDEMainStateTag(curData:any){
if(this.mainStateFields.length === 0) return null;
this.mainStateFields.forEach((singleMainField:any) =>{
......@@ -310,8 +341,6 @@ ${P.getLogicCode(appdeUIAction, "LOGIC.vue").code}
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
}
})
let strTag:String = "";
for (let i = 0; i <= 1; i++) {
let strTag:string = (curData[this.mainStateFields[0]])?(i == 0) ? curData[this.mainStateFields[0]] : "":"";
if (this.mainStateFields.length >= 2) {
......@@ -334,4 +363,28 @@ ${P.getLogicCode(appdeUIAction, "LOGIC.vue").code}
return null;
}
/**
* 获取数据对象当前操作标识
*
* @param data 当前数据
* @memberof ${srfclassname('${item.getCodeName()}')}UIServiceBase
*/
public getDEMainStateOPPrivs(data:any){
if(this.getDEMainStateTag(data)){
return this.allDeMainStateOPPrivsMap.get((this.getDEMainStateTag(data) as string));
}else{
return null;
}
}
/**
* 获取数据对象所有的操作标识
*
* @param data 当前数据
* @memberof ${srfclassname('${item.getCodeName()}')}UIServiceBase
*/
public getAllOPPrivs(data:any){
return this.authService.getOPPrivs(this.getDEMainStateOPPrivs(data));
}
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册