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

Merge branch 'dev'

...@@ -102,7 +102,7 @@ export default class ${srfclassname('${ctrl.codeName}')}Base extends Vue impleme ...@@ -102,7 +102,7 @@ export default class ${srfclassname('${ctrl.codeName}')}Base extends Vue impleme
<#list ctrl.getPSAppCounterRefs() as singleCounterRef> <#list ctrl.getPSAppCounterRefs() as singleCounterRef>
<#if singleCounterRef.getPSAppCounter()??> <#if singleCounterRef.getPSAppCounter()??>
<#assign appCounter = singleCounterRef.getPSAppCounter()/> <#assign appCounter = singleCounterRef.getPSAppCounter()/>
<#assign counterRefs>${counterRefs}this.${srfclassname('${appCounter.getCodeName()}')}counterservice<#if singleCounterRef_has_next>,</#if></#assign> <#assign counterRefs>${counterRefs}this.${appCounter.getCodeName()?lower_case}counterservice<#if singleCounterRef_has_next>,</#if></#assign>
/** /**
* ${srfclassname('${appCounter.getCodeName()}')}CounterService计数器服务对象 * ${srfclassname('${appCounter.getCodeName()}')}CounterService计数器服务对象
...@@ -110,7 +110,7 @@ export default class ${srfclassname('${ctrl.codeName}')}Base extends Vue impleme ...@@ -110,7 +110,7 @@ export default class ${srfclassname('${ctrl.codeName}')}Base extends Vue impleme
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService} * @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public ${srfclassname('${appCounter.getCodeName()}')}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService(); public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({$store: this.$store,context:this.context,viewparams:this.viewparams});
</#if> </#if>
</#list> </#list>
......
...@@ -102,7 +102,7 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get ...@@ -102,7 +102,7 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get
<#list ctrl.getPSAppCounterRefs() as singleCounterRef> <#list ctrl.getPSAppCounterRefs() as singleCounterRef>
<#if singleCounterRef.getPSAppCounter()??> <#if singleCounterRef.getPSAppCounter()??>
<#assign appCounter = singleCounterRef.getPSAppCounter()/> <#assign appCounter = singleCounterRef.getPSAppCounter()/>
<#assign counterRefs>${counterRefs}this.${srfclassname('${appCounter.getCodeName()}')}counterservice<#if singleCounterRef_has_next>,</#if></#assign> <#assign counterRefs>${counterRefs}this.${appCounter.getCodeName()?lower_case}counterservice<#if singleCounterRef_has_next>,</#if></#assign>
/** /**
* ${srfclassname('${appCounter.getCodeName()}')}CounterService计数器服务对象 * ${srfclassname('${appCounter.getCodeName()}')}CounterService计数器服务对象
...@@ -110,7 +110,7 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get ...@@ -110,7 +110,7 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService} * @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public ${srfclassname('${appCounter.getCodeName()}')}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService(); public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({$store: this.$store,context:this.context,viewparams:this.viewparams});
</#if> </#if>
</#list> </#list>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<#if item.getPSUIAction?? && item.getPSUIAction()?? && item.getPSUIAction().getPSAppCounter?? && item.getPSUIAction().getPSAppCounter()??> <#if item.getPSUIAction?? && item.getPSUIAction()?? && item.getPSUIAction().getPSAppCounter?? && item.getPSUIAction().getPSAppCounter()??>
<#assign uiaction = item.getPSUIAction() /> <#assign uiaction = item.getPSUIAction() />
<#assign counter = uiaction.getPSAppCounter() /> <#assign counter = uiaction.getPSAppCounter() />
<Badge type="primary" :count="${srfclassname('${counter.getCodeName()}')}counterservice.counterData.<#if uiaction.getCounterId()??>${uiaction.getCounterId()}</#if>"> <Badge type="primary" :count="${counter.getCodeName()?lower_case}counterservice.counterData.<#if uiaction.getCounterId()??>${uiaction.getCounterId()}</#if>">
<#nested> <#nested>
</Badge> </Badge>
<#else> <#else>
......
<dropdown-item name="${item.name}"> <dropdown-item name='${item.name}' v-show={this.copyActionModel['${item.name}'].visabled} disabled={this.copyActionModel['${item.name}'].disabled}>
<#if item.isShowIcon()><#if item.getPSSysImage()??><#assign img=item.getPSSysImage()><i class='<#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if>'></i></#if></#if> <#if item.isShowIcon()><#if item.getPSSysImage()??><#assign img=item.getPSSysImage()><i class='<#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if>'></i></#if></#if>
<#if item.isShowCaption()>${item.getCaption()}</#if> <#if item.isShowCaption()>${item.getCaption()}</#if>
</dropdown-item> </dropdown-item>
\ No newline at end of file
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
h('span', '${tabviewpanel.getCaption()}'), h('span', '${tabviewpanel.getCaption()}'),
h('Badge', { h('Badge', {
props: { props: {
count: <#if tabviewpanel.getPSSysCounterRef?? && tabviewpanel.getPSSysCounterRef()?? && tabviewpanel.getPSSysCounterRef().getPSAppCounter()??><#assign appCounter = tabviewpanel.getPSSysCounterRef().getPSAppCounter()/>${srfclassname('${appCounter.getCodeName()}')}counterservice.counterData.<#if tabviewpanel.getCounterId()??>${tabviewpanel.getCounterId()}</#if><#else>undefined</#if>, count: <#if tabviewpanel.getPSSysCounterRef?? && tabviewpanel.getPSSysCounterRef()?? && tabviewpanel.getPSSysCounterRef().getPSAppCounter()??><#assign appCounter = tabviewpanel.getPSSysCounterRef().getPSAppCounter()/>${appCounter.getCodeName()?lower_case}counterservice.counterData.<#if tabviewpanel.getCounterId()??>${tabviewpanel.getCounterId()}</#if><#else>undefined</#if>,
type: 'primary' type: 'primary'
} }
}) })
...@@ -143,7 +143,7 @@ import { Environment } from '@/environments/environment'; ...@@ -143,7 +143,7 @@ import { Environment } from '@/environments/environment';
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public computedActiviedPanel(){ public computedActiviedPanel(){
if(Environment.enablePermissionValid){ if(this.$store.getters['authresource/getEnablePermissionValid']){
if(Object.keys(this.authResourceObject).length >0){ if(Object.keys(this.authResourceObject).length >0){
let targetResult:Array<any> = []; let targetResult:Array<any> = [];
Object.keys(this.authResourceObject).forEach((item:any) =>{ Object.keys(this.authResourceObject).forEach((item:any) =>{
...@@ -165,7 +165,7 @@ import { Environment } from '@/environments/environment'; ...@@ -165,7 +165,7 @@ import { Environment } from '@/environments/environment';
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public computedAuthorizedPanel(name:string){ public computedAuthorizedPanel(name:string){
if(!Environment.enablePermissionValid) if(!this.$store.getters['authresource/getEnablePermissionValid'])
return true; return true;
if(!this.authResourceObject[name]) if(!this.authResourceObject[name])
return true; return true;
......
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
*/ */
public initNavParam(){ public initNavParam(){
if(!Object.is(this.navfilter,"")){ if(!Object.is(this.navfilter,"")){
Object.assign(this.viewparams,{[this.navfilter]:this.context['majorentity']}) Object.assign(this.viewparams,{[this.navfilter]:this.context['<#if ctrl.getPSAppDataEntity()?? && ctrl.getPSAppDataEntity().getCodeName()??>${ctrl.getPSAppDataEntity().getCodeName()?lower_case}</#if>']})
} }
if(this.localContext && Object.keys(this.localContext).length >0){ if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext); let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
......
<template> <template>
<div :class="['app-list',<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()>'${singleCss.getCssName()}',</#if>this.items.length > 0 ? '' : 'app-list-empty' ]"> <div :class="['app-list',<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()>'${singleCss.getCssName()}',</#if>this.items.length > 0 ? '' : 'app-list-empty' ]">
<div v-if="items.length > 0" style="height:100%;"> <div v-if="items.length > 0">
<#if ctrl.render??> <#if ctrl.render??>
${ctrl.render.code} ${ctrl.render.code}
<#else> <#elseif ctrl.isEnableGroup?? && !ctrl.isEnableGroup()>
<div v-for = "item in items" :key="item.srfkey" :class="['app-list-item', {'isSelect': item.isselected === true ? true : false}]" @click="handleClick(item)" @dblclick="handleDblClick(item)"> <div v-for = "item in items" :key="item.srfkey" :class="['app-list-item', {'isSelect': item.isselected === true ? true : false}]" @click="handleClick(item)" @dblclick="handleDblClick(item)">
<#if ctrl.getItemPSLayoutPanel()??> <#if ctrl.getItemPSLayoutPanel()??>
<#assign panel = ctrl.getItemPSLayoutPanel()> <#assign panel = ctrl.getItemPSLayoutPanel()>
...@@ -16,13 +16,46 @@ ...@@ -16,13 +16,46 @@
{{item.srfmajortext}} {{item.srfmajortext}}
</#if> </#if>
</div> </div>
<#elseif ctrl.isEnableGroup?? && ctrl.isEnableGroup()>
<el-collapse>
<el-collapse-item v-for="(group,index) in groupData" :key="index">
<template slot="title">
<div style="margin: 0 0 0 12px;"><b>{{group.group}}</b></div>
</template>
<div v-if="group.children.length > 0" style="margin: 0 0 0 32px;">
<div v-for="item in group.children" :key="item.srfkey" :class="['app-list-item', {'isSelect': item.isselected === true ? true : false}]" @click="handleClick(item)" @dblclick="handleDblClick(item)">
<#if ctrl.getItemPSLayoutPanel()??>
<#assign panel = ctrl.getItemPSLayoutPanel()>
<@ibizindent blank=16>
${P.getCtrlCode(panel, 'CONTROL.html').code}
</@ibizindent>
<#elseif ctrl.itemRender??>
${ctrl.itemRender.code}
<#else>
{{item.srfmajortext}}
</#if>
</div>
</div>
<div v-else style="text-align: center;">
{{ $t('app.commonWords.noData') }}
</div>
</el-collapse-item>
</el-collapse>
</#if> </#if>
<template v-if="isScrollBar">
<div v-if="totalRecord>items.length" class="loadmore">{{ this.$t('app.commonWords.loadmore') }}</div>
<div v-else class="loadmore">{{ this.$t('app.commonWords.nomore') }}</div>
</template>
</div> </div>
<div v-else> <div v-else>
{{ $t('app.commonWords.noData') }} {{ $t('app.commonWords.noData') }}
</div> </div>
<el-backtop target=".content-container .app-list"></el-backtop>
</div> </div>
</template> </template>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
...@@ -126,6 +159,149 @@ ...@@ -126,6 +159,149 @@
*/ */
public thisRef: any = this; public thisRef: any = this;
<#if ctrl.isEnableGroup?? && ctrl.isEnableGroup()>
/**
* 分组属性
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public groupField: string = "<#if ctrl.getGroupPSDEField?? && ctrl.getGroupPSDEField()??>${ctrl.getGroupPSDEField().getCodeName()?lower_case}</#if>";
/**
* 分组数据
*
* @type {Array<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public groupData: Array<any> = [];
/**
* 分组模式
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public groupMode: string = "<#if ctrl.getGroupMode?? && ctrl.getGroupMode()??>${ctrl.getGroupMode()}</#if>";
/**
* 分组方法
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public group(){
let _this:any = this;
if(_this.drawGroup && _this.drawGroup instanceof Function && Object.is(_this.groupMode,"AUTO")){
_this.drawGroup();
}else if(_this.drawCodelistGroup && _this.drawCodelistGroup instanceof Function && Object.is(_this.groupMode,"CODELIST")){
_this.drawCodelistGroup();
}
}
</#if>
<#if ctrl.getGroupMode?? && ctrl.getGroupMode() == 'CODELIST'>
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
/**
* 分组代码表标识
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public tag: string = "<#if ctrl.getGroupPSCodeList?? && ctrl.getGroupPSCodeList()??>${ctrl.getGroupPSCodeList().getCodeName()}</#if>";
/**
* 分组代码表类型
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public codelistType: string = "<#if ctrl.getGroupPSCodeList?? && ctrl.getGroupPSCodeList()??>${ctrl.getGroupPSCodeList().getCodeListType()}</#if>";
/**
* 根据分组代码表绘制分组列表
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public async drawCodelistGroup(){
let groups: Array<any> = [];
let groupTree:Array<any> = [];
let data:Array<any> = [...this.items];
// 动态代码表
if (Object.is(this.codelistType, "DYNAMIC")) {
groups = await this.codeListService.getItems(this.tag);
// 静态代码表
} else if(Object.is(this.codelistType, "STATIC")){
groups = this.$store.getters.getCodeListItems(this.tag);
}
groups.forEach((group: any,i: number)=>{
let children:Array<any> = [];
data.forEach((item: any,j: number)=>{
if(Object.is(group.label,item[this.groupField])){
children.push(item);
}
});
const tree: any ={
group: group.label,
children: children
}
groupTree.push(tree);
});
let child:Array<any> = [];
data.forEach((item: any)=>{
let i = groups.findIndex((group: any)=>Object.is(group,item[this.groupField]));
if(i < 0){
child.push(item);
}
})
const Tree: any = {
group: this.$t('app.commonWords.other'),
children: child
}
groupTree.push(Tree);
this.groupData = [...groupTree];
}
</#if>
<#if ctrl.getGroupMode?? && ctrl.getGroupMode() == 'AUTO'>
/**
* 绘制分组列表
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public drawGroup(){
let data:Array<any> = [...this.items];
let groups:Array<any> = [];
data.forEach((item: any)=>{
if(item.hasOwnProperty(this.groupField)){
groups.push(item[this.groupField]);
}
});
groups = [...new Set(groups)];
let groupTree:Array<any> = [];
groups.forEach((group: any,i: number)=>{
let children:Array<any> = [];
data.forEach((item: any,j: number)=>{
if(Object.is(group,item[this.groupField])){
children.push(item);
}
});
const tree: any ={
group: group,
children: children
}
groupTree.push(tree);
});
this.groupData = [...groupTree];
}
</#if>
/** /**
* 当前页 * 当前页
* *
...@@ -174,6 +350,14 @@ ...@@ -174,6 +350,14 @@
*/ */
public isAddBehind:boolean = false; public isAddBehind:boolean = false;
/**
* 是否有滚动条
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public isScrollBar: boolean = false;
/** /**
* 排序方向 * 排序方向
* *
...@@ -222,6 +406,11 @@ ...@@ -222,6 +406,11 @@
*/ */
public afterMounted () { public afterMounted () {
this.$el.addEventListener('scroll', ()=> { this.$el.addEventListener('scroll', ()=> {
if(this.$el.scrollHeight > this.$el.clientHeight) {
this.isScrollBar = true;
} else {
this.isScrollBar = false;
}
if( this.$el.scrollTop + this.$el.clientHeight >= this.$el.scrollHeight) { if( this.$el.scrollTop + this.$el.clientHeight >= this.$el.scrollHeight) {
this.loadMore(); this.loadMore();
} }
...@@ -373,6 +562,9 @@ ...@@ -373,6 +562,9 @@
if(this.isSelectFirstDefault){ if(this.isSelectFirstDefault){
this.handleClick(this.items[0]); this.handleClick(this.items[0]);
} }
<#if ctrl.isEnableGroup?? && ctrl.isEnableGroup()>
this.group();
</#if>
}, (response: any) => { }, (response: any) => {
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
...@@ -433,9 +625,12 @@ ...@@ -433,9 +625,12 @@
} }
//删除items中已删除的项 //删除items中已删除的项
datas.forEach((data: any) => { datas.forEach((data: any) => {
this.items.some((item:any,index:number)=>{ this.items.some((item:any,index:number)=>{
if(Object.is(item.srfkey,data.srfkey)){ if(Object.is(item.srfkey,data.srfkey)){
this.items.splice(index,1); this.items.splice(index,1);
<#if ctrl.isEnableGroup?? && ctrl.isEnableGroup()>
this.group();
</#if>
return true; return true;
} }
}); });
......
...@@ -6,15 +6,34 @@ ...@@ -6,15 +6,34 @@
height:100%; height:100%;
flex-grow: 1; flex-grow: 1;
overflow-y: auto; overflow-y: auto;
.el-collapse-item__header.is-active{
color: #409eff;
background-color: #ecf5ff;
}
.app-list-item { .app-list-item {
line-height: 34px; line-height: 34px;
border-radius:5px;
padding: 6px;
margin: 6px;
box-shadow: 0px 0px 2px 1px rgb(209, 208, 208);
background: #f7f7fa;
min-height: 24px;
} }
.app-list-item.isSelect { .app-list-item.isSelect {
background: #ecf5ff; background: #ecf5ff;
border-left: 5px solid #2d8cf0;
box-shadow: 0px 0px 3px 1px #82bff7;
} }
.app-list-item:hover { .app-list-item:hover {
background: #ecf5ff; background: #ecf5ff;
} }
.loadmore {
text-align: center;
padding: 10px;
text-decoration: underline;
color: #82bff7;
cursor: default;
}
} }
.app-list-empty { .app-list-empty {
height:100%; height:100%;
......
...@@ -10,6 +10,14 @@ ...@@ -10,6 +10,14 @@
</div> </div>
</#if> </#if>
<div class="container-header"> <div class="container-header">
<#if view.isEnableQuickGroup()>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
</#if>
<div class="quick-group-container">
<app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${appCounter.getCodeName()?lower_case}counterservice"</#if> @valuechange="quickGroupValueChange"></app-quick-group>
</div>
</#if>
<#if ctrl.isEnableSearch()> <#if ctrl.isEnableSearch()>
<div class='search-container'> <div class='search-container'>
<i-input :search="true" <i-input :search="true"
...@@ -52,6 +60,13 @@ ...@@ -52,6 +60,13 @@
</#if> </#if>
</template> </template>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter';
</#if>
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
...@@ -101,6 +116,17 @@ ...@@ -101,6 +116,17 @@
*/ */
public isSingleSelect:boolean = true; public isSingleSelect:boolean = true;
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
/**
* ${srfclassname('${appCounter.getCodeName()}')}CounterService计数器服务对象
*
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store,context:this.context,viewparams:this.viewparams });
</#if>
/** /**
* 呈现模式,可选值:horizontal或者vertical * 呈现模式,可选值:horizontal或者vertical
* *
...@@ -194,6 +220,116 @@ ...@@ -194,6 +220,116 @@
*/ */
public navigateParams:any = <#if xDataControl.getPSNavigateParams?? && xDataControl.getPSNavigateParams()??><@getNavigateParams xDataControl /><#else>null</#if>; public navigateParams:any = <#if xDataControl.getPSNavigateParams?? && xDataControl.getPSNavigateParams()??><@getNavigateParams xDataControl /><#else>null</#if>;
</#if> </#if>
<#if view.isEnableQuickGroup()>
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
/**
* 快速分组数据对象
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public quickGroupData:any;
/**
* 快速分组是否有抛值
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public isEmitQuickGroupValue:boolean = false;
/**
* 快速分组模型
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public quickGroupModel:Array<any> = [];
/**
* 加载快速分组模型
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public loadQuickGroupModel(){
<#if view.getQuickGroupPSCodeList()??>
<#assign codelist=view.getQuickGroupPSCodeList() />
let quickGroupCodeList:any = {tag:'${codelist.codeName}',codelistType:'${codelist.getCodeListType()}'};
if(quickGroupCodeList.tag && Object.is(quickGroupCodeList.codelistType,"STATIC")){
const codelist = this.$store.getters.getCodeList(quickGroupCodeList.tag);
if (codelist) {
this.quickGroupModel = [...this.handleDynamicData(JSON.parse(JSON.stringify(codelist.items)))];
} else {
<#noparse>console.log(`----${quickGroupCodeList.tag}----代码表不存在`);</#noparse>
}
}else if(quickGroupCodeList.tag && Object.is(quickGroupCodeList.codelistType,"DYNAMIC")){
this.codeListService.getItems(quickGroupCodeList.tag,{},{}).then((res:any) => {
this.quickGroupModel = res;
}).catch((error:any) => {
<#noparse>console.log(`----${quickGroupCodeList.tag}----代码表不存在`);</#noparse>
});
}
</#if>
}
/**
* 处理快速分组模型动态数据部分(%xxx%)
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public handleDynamicData(inputArray:Array<any>){
if(inputArray.length >0){
inputArray.forEach((item:any) =>{
if(item.data && Object.keys(item.data).length >0){
Object.keys(item.data).forEach((name:any) =>{
let value: any = item.data[name];
if (value && typeof(value)=='string' && value.startsWith('%') && value.endsWith('%')) {
const key = (value.substring(1, value.length - 1)).toLowerCase();
if (this.context[key]) {
value = this.context[key];
} else if(this.viewparams[key]){
value = this.viewparams[key];
}
}
item.data[name] = value;
})
}
})
}
return inputArray;
}
/**
* 快速分组值变化
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public quickGroupValueChange($event:any){
if($event && $event.data){
if(this.quickGroupData) {
for(let key in this.quickGroupData) {
delete this.viewparams[key];
}
}
this.quickGroupData = $event.data;
Object.assign(this.viewparams, $event.data);
}else{
if(this.quickGroupData) {
for(let key in this.quickGroupData) {
delete this.viewparams[key];
}
}
}
if(this.isEmitQuickGroupValue){
this.onSearch($event);
}
this.isEmitQuickGroupValue = true;
}
</#if>
/** /**
* 显示处理提示 * 显示处理提示
...@@ -267,6 +403,9 @@ ...@@ -267,6 +403,9 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public afterCreated(){ public afterCreated(){
<#if view.isEnableQuickGroup()>
this.loadQuickGroupModel();
</#if>
if (this.viewState) { if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => { this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) { if (!Object.is(tag, this.name)) {
......
...@@ -23,8 +23,9 @@ ...@@ -23,8 +23,9 @@
} }
.container-header{ .container-header{
display: flex; display: flex;
justify-content: space-between; justify-content: flex-start;
align-items: center; align-items: center;
flex-wrap: wrap;
.search-container { .search-container {
width: 30%; width: 30%;
height: 48px; height: 48px;
...@@ -38,6 +39,10 @@ ...@@ -38,6 +39,10 @@
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
} }
.quick-group-container {
padding-top: 8px;
padding-right: 20px;
}
} }
.list-exp-bar-content { .list-exp-bar-content {
<#-- 计算高度 --> <#-- 计算高度 -->
......
...@@ -10,6 +10,14 @@ ...@@ -10,6 +10,14 @@
</div> </div>
</#if> </#if>
<div class="container-header"> <div class="container-header">
<#if view.isEnableQuickGroup()>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
</#if>
<div class="quick-group-container">
<app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${appCounter.getCodeName()?lower_case}counterservice"</#if> @valuechange="quickGroupValueChange"></app-quick-group>
</div>
</#if>
<#if ctrl.isEnableSearch()> <#if ctrl.isEnableSearch()>
<div class='search-container'> <div class='search-container'>
<i-input :search="true" <i-input :search="true"
...@@ -52,6 +60,14 @@ ...@@ -52,6 +60,14 @@
</#if> </#if>
</template> </template>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter';
</#if>
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
...@@ -100,6 +116,17 @@ ...@@ -100,6 +116,17 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public isSingleSelect:boolean = true; public isSingleSelect:boolean = true;
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
/**
* ${srfclassname('${appCounter.getCodeName()}')}CounterService计数器服务对象
*
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store,context:this.context,viewparams:this.viewparams });
</#if>
/** /**
* 呈现模式,可选值:horizontal或者vertical * 呈现模式,可选值:horizontal或者vertical
...@@ -194,6 +221,116 @@ ...@@ -194,6 +221,116 @@
*/ */
public navigateParams:any = <#if xDataControl.getPSNavigateParams?? && xDataControl.getPSNavigateParams()??><@getNavigateParams xDataControl /><#else>null</#if>; public navigateParams:any = <#if xDataControl.getPSNavigateParams?? && xDataControl.getPSNavigateParams()??><@getNavigateParams xDataControl /><#else>null</#if>;
</#if> </#if>
<#if view.isEnableQuickGroup()>
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
/**
* 快速分组数据对象
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public quickGroupData:any;
/**
* 快速分组是否有抛值
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public isEmitQuickGroupValue:boolean = false;
/**
* 快速分组模型
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public quickGroupModel:Array<any> = [];
/**
* 加载快速分组模型
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public loadQuickGroupModel(){
<#if view.getQuickGroupPSCodeList()??>
<#assign codelist=view.getQuickGroupPSCodeList() />
let quickGroupCodeList:any = {tag:'${codelist.codeName}',codelistType:'${codelist.getCodeListType()}'};
if(quickGroupCodeList.tag && Object.is(quickGroupCodeList.codelistType,"STATIC")){
const codelist = this.$store.getters.getCodeList(quickGroupCodeList.tag);
if (codelist) {
this.quickGroupModel = [...this.handleDynamicData(JSON.parse(JSON.stringify(codelist.items)))];
} else {
<#noparse>console.log(`----${quickGroupCodeList.tag}----代码表不存在`);</#noparse>
}
}else if(quickGroupCodeList.tag && Object.is(quickGroupCodeList.codelistType,"DYNAMIC")){
this.codeListService.getItems(quickGroupCodeList.tag,{},{}).then((res:any) => {
this.quickGroupModel = res;
}).catch((error:any) => {
<#noparse>console.log(`----${quickGroupCodeList.tag}----代码表不存在`);</#noparse>
});
}
</#if>
}
/**
* 处理快速分组模型动态数据部分(%xxx%)
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public handleDynamicData(inputArray:Array<any>){
if(inputArray.length >0){
inputArray.forEach((item:any) =>{
if(item.data && Object.keys(item.data).length >0){
Object.keys(item.data).forEach((name:any) =>{
let value: any = item.data[name];
if (value && typeof(value)=='string' && value.startsWith('%') && value.endsWith('%')) {
const key = (value.substring(1, value.length - 1)).toLowerCase();
if (this.context[key]) {
value = this.context[key];
} else if(this.viewparams[key]){
value = this.viewparams[key];
}
}
item.data[name] = value;
})
}
})
}
return inputArray;
}
/**
* 快速分组值变化
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public quickGroupValueChange($event:any){
if($event && $event.data){
if(this.quickGroupData) {
for(let key in this.quickGroupData) {
delete this.viewparams[key];
}
}
this.quickGroupData = $event.data;
Object.assign(this.viewparams, $event.data);
}else{
if(this.quickGroupData) {
for(let key in this.quickGroupData) {
delete this.viewparams[key];
}
}
}
if(this.isEmitQuickGroupValue){
this.onSearch();
}
this.isEmitQuickGroupValue = true;
}
</#if>
/** /**
* 显示处理提示 * 显示处理提示
...@@ -267,6 +404,9 @@ ...@@ -267,6 +404,9 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public afterCreated(){ public afterCreated(){
<#if view.isEnableQuickGroup()>
this.loadQuickGroupModel();
</#if>
if (this.viewState) { if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => { this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) { if (!Object.is(tag, this.name)) {
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
} }
.container-header{ .container-header{
display: flex; display: flex;
justify-content: space-between; justify-content: flex-start;
align-items: center; align-items: center;
.search-container { .search-container {
width: 30%; width: 30%;
...@@ -99,6 +99,9 @@ ...@@ -99,6 +99,9 @@
.toolbar-container{ .toolbar-container{
padding: 4px; padding: 4px;
} }
.quick-group-container{
padding-right: 20px;
}
} }
.dataview-exp-bar-content { .dataview-exp-bar-content {
<#-- 计算高度 --> <#-- 计算高度 -->
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<#if item.getPSUIAction?? && item.getPSUIAction()?? && item.getPSUIAction().getPSAppCounter?? && item.getPSUIAction().getPSAppCounter()??> <#if item.getPSUIAction?? && item.getPSUIAction()?? && item.getPSUIAction().getPSAppCounter?? && item.getPSUIAction().getPSAppCounter()??>
<#assign uiaction = item.getPSUIAction() /> <#assign uiaction = item.getPSUIAction() />
<#assign counter = uiaction.getPSAppCounter() /> <#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>"> <Badge type="primary" v-show="${ModelsName}.${item.name}.visabled" :count="${counter.getCodeName()?lower_case}counterservice.counterData.<#if uiaction.getCounterId()??>${uiaction.getCounterId()}</#if>">
</#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)"> <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.isShowIcon()><i class='<#if item.getPSSysImage()??><#assign img=item.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i></#if>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<#if item.getPSUIAction?? && item.getPSUIAction()?? && item.getPSUIAction().getPSAppCounter?? && item.getPSUIAction().getPSAppCounter()??> <#if item.getPSUIAction?? && item.getPSUIAction()?? && item.getPSUIAction().getPSAppCounter?? && item.getPSUIAction().getPSAppCounter()??>
<#assign uiaction = item.getPSUIAction() /> <#assign uiaction = item.getPSUIAction() />
<#assign counter = uiaction.getPSAppCounter() /> <#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>"> <Badge type="primary" v-show="${ModelsName}.${item.name}.visabled" :count="${counter.getCodeName()?lower_case}counterservice.counterData.<#if uiaction.getCounterId()??>${uiaction.getCounterId()}</#if>">
</#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)"> <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.isShowIcon()><i class='<#if item.getPSSysImage()??><#assign img=item.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i></#if>
......
...@@ -530,7 +530,7 @@ ${P.getLogicCode(singleFuncs,"LOGIC.vue").code} ...@@ -530,7 +530,7 @@ ${P.getLogicCode(singleFuncs,"LOGIC.vue").code}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public handleMenusResource(inputMenus:Array<any>){ public handleMenusResource(inputMenus:Array<any>){
if(Environment.enablePermissionValid){ if(this.$store.getters['authresource/getEnablePermissionValid']){
this.computedEffectiveMenus(inputMenus); this.computedEffectiveMenus(inputMenus);
this.computeParentMenus(inputMenus); this.computeParentMenus(inputMenus);
} }
......
<#assign quick_menus> <#assign quick_menus>
<div class="app-app-menu<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if>"> <div class="app-quick-menus<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if>">
<row> <row>
<template v-for="(item,index) in menus" > <template v-for="(item,index) in menus" >
<card :bordered="false" dis-hover :key = "index"> <card :bordered="false" dis-hover :key = "index">
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
../@MACRO/CSS/DEFAULT.less.ftl ../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude> </#ibizinclude>
/*** BEGIN:potal菜单 ***/ /*** BEGIN:potal菜单 ***/
.app-app-menu{ .app-quick-menus{
>.ivu-row{ >.ivu-row{
.ivu-card{ .ivu-card{
.ivu-card-body{ .ivu-card-body{
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
</div> </div>
</#if> </#if>
<row class="data-view-container" v-if="items.length > 0" :gutter="20" type="flex" justify="start" style="margin:0px;"> <row class="data-view-container" v-if="items.length > 0" :gutter="20" type="flex" justify="start" style="margin:0px;">
<#if ctrl.isEnableGroup?? && !ctrl.isEnableGroup()>
<a v-for="(item,index) in items" :key="index" :href = "item.starturl"> <a v-for="(item,index) in items" :key="index" :href = "item.starturl">
<i-col <#if ctrl.getCardColLG() gt 0> :lg="${ctrl.getCardColLG()?c}"</#if><#if ctrl.getCardColMD() gt 0> :md="${ctrl.getCardColMD()?c}"</#if><#if ctrl.getCardColSM() gt 0> :sm="${ctrl.getCardColSM()?c}"</#if><#if ctrl.getCardColXS() gt 0> :xs="${ctrl.getCardColXS()?c}"</#if> style="<#if ctrl.getCardHeight() gt 0>height: ${ctrl.getCardHeight()?c}<#else>min-height: 170</#if>px;<#if ctrl.getCardWidth() gt 0> width: ${ctrl.getCardWidth()?c}px;</#if>margin-bottom: 10px;"> <i-col <#if ctrl.getCardColLG() gt 0> :lg="${ctrl.getCardColLG()?c}"</#if><#if ctrl.getCardColMD() gt 0> :md="${ctrl.getCardColMD()?c}"</#if><#if ctrl.getCardColSM() gt 0> :sm="${ctrl.getCardColSM()?c}"</#if><#if ctrl.getCardColXS() gt 0> :xs="${ctrl.getCardColXS()?c}"</#if> style="<#if ctrl.getCardHeight() gt 0>height: ${ctrl.getCardHeight()?c}<#else>min-height: 170</#if>px;<#if ctrl.getCardWidth() gt 0> width: ${ctrl.getCardWidth()?c}px;</#if>margin-bottom: 10px;">
<el-card shadow="always" :class="[ item.isselected === true ? 'isselected' : false, 'single-card-data' ]" @click.native="handleClick(item)" @dblclick.native="handleDblClick(item)"> <el-card shadow="always" :class="[ item.isselected === true ? 'isselected' : false, 'single-card-data' ]" @click.native="handleClick(item)" @dblclick.native="handleDblClick(item)">
...@@ -53,12 +54,51 @@ ...@@ -53,12 +54,51 @@
</el-card> </el-card>
</i-col> </i-col>
</a> </a>
<#elseif ctrl.isEnableGroup?? && ctrl.isEnableGroup()>
<el-collapse>
<el-collapse-item v-for="(group,index) in groupData" :key="index">
<template slot="title">
<div style="margin: 0 0 0 12px;"><b>{{group.group}}</b></div>
</template>
<div v-if="group.children.length > 0">
<a v-for="(item,i) in group.children" :key="i" :href="item.starturl">
<i-col style="min-height: 170px;margin-bottom: 10px;">
<el-card shadow="always" :class="[ item.isselected === true ? 'isselected' : false, 'single-card-data' ]" @click.native="handleClick(item)" @dblclick.native="handleDblClick(item)">
<#if ctrl.getItemPSLayoutPanel()??>
<#assign panel = ctrl.getItemPSLayoutPanel()>
<@ibizindent blank=24>
${P.getCtrlCode(panel, 'CONTROL.html').code}
</@ibizindent>
<#elseif ctrl.itemRender??>
${ctrl.itemRender.code}
<#else>
<img v-if="item.srficonpath" :src="item.srficonpath" class="single-card-img" />
<img v-else src="/assets/img/noimage.png" class="single-card-img" />
<div class="single-card-default">
<Tooltip :content="item.srfmajortext">
{{item.srfmajortext}}
</Tooltip>
</div>
</#if>
</el-card>
</i-col>
</a>
</div>
<div v-else style="text-align: center;">
{{ $t('app.commonWords.noData') }}
</div>
</el-collapse-item>
</el-collapse>
</#if>
</row> </row>
<div v-else class="app-data-empty">{{ $t('app.commonWords.noData') }}</div> <div v-else class="app-data-empty">{{ $t('app.commonWords.noData') }}</div>
<el-backtop target=".content-container .app-data-view"></el-backtop>
</div> </div>
</#if> </#if>
</template> </template>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
...@@ -161,6 +201,148 @@ ...@@ -161,6 +201,148 @@
*/ */
public thisRef: any = this; public thisRef: any = this;
<#if ctrl.isEnableGroup?? && ctrl.isEnableGroup()>
/**
* 分组属性
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public groupField: string = "<#if ctrl.getGroupPSDEField?? && ctrl.getGroupPSDEField()??>${ctrl.getGroupPSDEField().getCodeName()?lower_case}</#if>";
/**
* 分组数据
*
* @type {Array<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public groupData: Array<any> = [];
/**
* 分组模式
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public groupMode: string = "<#if ctrl.getGroupMode?? && ctrl.getGroupMode()??>${ctrl.getGroupMode()}</#if>";
/**
* 分组方法
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public group(){
let _this:any = this;
if(_this.drawGroup && _this.drawGroup instanceof Function && Object.is(_this.groupMode,"AUTO")){
_this.drawGroup();
}else if(_this.drawCodelistGroup && _this.drawCodelistGroup instanceof Function && Object.is(_this.groupMode,"CODELIST")){
_this.drawCodelistGroup();
}
}
</#if>
<#if ctrl.getGroupMode?? && ctrl.getGroupMode() == 'CODELIST'>
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
/**
* 分组代码表标识
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public tag: string = "<#if ctrl.getGroupPSCodeList?? && ctrl.getGroupPSCodeList()??>${ctrl.getGroupPSCodeList().getCodeName()}</#if>";
/**
* 分组代码表类型
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public codelistType: string = "<#if ctrl.getGroupPSCodeList?? && ctrl.getGroupPSCodeList()??>${ctrl.getGroupPSCodeList().getCodeListType()}</#if>";
/**
* 根据分组代码表绘制分组列表
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public async drawCodelistGroup(){
let groups: Array<any> = [];
let groupTree:Array<any> = [];
let data:Array<any> = [...this.items];
// 动态代码表
if (Object.is(this.codelistType, "DYNAMIC")) {
groups = await this.codeListService.getItems(this.tag);
// 静态代码表
} else if(Object.is(this.codelistType, "STATIC")){
groups = this.$store.getters.getCodeListItems(this.tag);
}
groups.forEach((group: any,i: number)=>{
let children:Array<any> = [];
data.forEach((item: any,j: number)=>{
if(Object.is(group.label,item[this.groupField])){
children.push(item);
}
});
const tree: any ={
group: group.label,
children: children
}
groupTree.push(tree);
});
let child:Array<any> = [];
data.forEach((item: any)=>{
let i = groups.findIndex((group: any)=>Object.is(group,item[this.groupField]));
if(i < 0){
child.push(item);
}
})
const Tree: any = {
group: this.$t('app.commonWords.other'),
children: child
}
groupTree.push(Tree);
this.groupData = [...groupTree];
}
</#if>
<#if ctrl.getGroupMode?? && ctrl.getGroupMode() == 'AUTO'>
/**
* 绘制分组列表
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public drawGroup(){
let data:Array<any> = [...this.items];
let groups:Array<any> = [];
data.forEach((item: any)=>{
if(item.hasOwnProperty(this.groupField)){
groups.push(item[this.groupField]);
}
});
groups = [...new Set(groups)];
let groupTree:Array<any> = [];
groups.forEach((group: any,i: number)=>{
let children:Array<any> = [];
data.forEach((item: any,j: number)=>{
if(Object.is(group,item[this.groupField])){
children.push(item);
}
});
const tree: any ={
group: group,
children: children
}
groupTree.push(tree);
});
this.groupData = [...groupTree];
}
</#if>
/** /**
* 是否单选 * 是否单选
* *
...@@ -300,7 +482,7 @@ ...@@ -300,7 +482,7 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public afterMounted(){ public afterMounted(){
<#if !ctrl.isEnablePagingBar()> <#if ctrl.isEnablePagingBar()>
this.$el.addEventListener('scroll', ()=> { this.$el.addEventListener('scroll', ()=> {
if( this.$el.scrollTop + this.$el.clientHeight >= this.$el.scrollHeight) { if( this.$el.scrollTop + this.$el.clientHeight >= this.$el.scrollHeight) {
this.loadMore(); this.loadMore();
...@@ -459,6 +641,9 @@ ...@@ -459,6 +641,9 @@
if(this.isSelectFirstDefault){ if(this.isSelectFirstDefault){
this.handleClick(this.items[0]); this.handleClick(this.items[0]);
} }
<#if ctrl.isEnableGroup?? && ctrl.isEnableGroup()>
this.group();
</#if>
}, (response: any) => { }, (response: any) => {
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
...@@ -533,8 +718,11 @@ ...@@ -533,8 +718,11 @@
//删除items中已删除的项 //删除items中已删除的项
_datas.forEach((data: any) => { _datas.forEach((data: any) => {
this.items.some((item:any,index:number)=>{ this.items.some((item:any,index:number)=>{
if(Object.is(item.srfkey,data.srfkey)){ if(Object.is(item.srfkey,data.srfkey)){
this.items.splice(index,1); this.items.splice(index,1);
<#if ctrl.isEnableGroup?? && ctrl.isEnableGroup()>
this.group();
</#if>
return true; return true;
} }
}); });
......
...@@ -72,6 +72,16 @@ ...@@ -72,6 +72,16 @@
height: 100%; height: 100%;
</#if> </#if>
align-content: start; align-content: start;
.el-collapse{
width: 100%;
.el-collapse-item__content{
display: flex;
}
}
.el-collapse-item__header.is-active{
color: #409eff;
background-color: #ecf5ff;
}
.ivu-col{ .ivu-col{
padding: 10px; padding: 10px;
.el-card__body{ .el-card__body{
...@@ -136,6 +146,9 @@ ...@@ -136,6 +146,9 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.el-backtop {
position: absolute;
}
} }
<#ibizinclude> <#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl ../@MACRO/CSS/DEFAULT.less.ftl
......
...@@ -96,8 +96,9 @@ import FullCalendar from '@fullcalendar/vue' ...@@ -96,8 +96,9 @@ import FullCalendar from '@fullcalendar/vue'
import dayGridPlugin from '@fullcalendar/daygrid' import dayGridPlugin from '@fullcalendar/daygrid'
import timeGridPlugin from '@fullcalendar/timegrid'; import timeGridPlugin from '@fullcalendar/timegrid';
import listPlugin from '@fullcalendar/list'; import listPlugin from '@fullcalendar/list';
import interactionPlugin from '@fullcalendar/interaction' import interactionPlugin from '@fullcalendar/interaction';
import ContextMenu from '@components/context-menu/context-menu' import ContextMenu from '@components/context-menu/context-menu';
import UIService from '@/uiservice/ui-service';
</#assign> </#assign>
<#assign component_block> <#assign component_block>
...@@ -333,6 +334,34 @@ FullCalendar, ...@@ -333,6 +334,34 @@ FullCalendar,
*/ */
public events: any[] = []; public events: any[] = [];
/**
* 日历项上下文菜单集合
*
* @type {string[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public actionModel: any = {
<#if ctrl.getPSControls()??>
<#list ctrl.getPSControls() as childCtrl>
<#if childCtrl.getControlType() == "CONTEXTMENU">
<#if childCtrl.getPSDEToolbarItems()??>
<#list childCtrl.getPSDEToolbarItems() as item>
${childCtrl.getOwner().getItemType()}_${item.name}: {name:'${item.name}',nodeOwner:'${childCtrl.getOwner().getItemType()}',<#if item.getPSUIAction()??><#assign uiaction=item.getPSUIAction()>type: '${uiaction.getUIActionType()}', tag: '${uiaction.getUIActionTag()}'<#if (uiaction.getActionTarget()!="")>, actiontarget: '${uiaction.getActionTarget()}'</#if><#if uiaction.getNoPrivDisplayMode(view)??>, noprivdisplaymode:${uiaction.getNoPrivDisplayMode(view)}</#if><#if uiaction.getDataAccessAction()??>, dataaccaction:'${uiaction.getDataAccessAction()}'</#if>, visabled: true, disabled: false</#if>},
</#list>
</#if>
</#if>
</#list>
</#if>
}
/**
* 备份日历项上下文菜单
*
* @type {string[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public copyActionModel: any;
/** /**
* 日历样式类型 * 日历样式类型
* *
...@@ -800,7 +829,32 @@ FullCalendar, ...@@ -800,7 +829,32 @@ FullCalendar,
<#assign batchToolbar = ctrl.getBatchPSDEToolbar()/> <#assign batchToolbar = ctrl.getBatchPSDEToolbar()/>
${P.getCtrlCode(batchToolbar, 'CONTROL.vue').code} ${P.getCtrlCode(batchToolbar, 'CONTROL.vue').code}
</#if> </#if>
/**
* 计算节点右键权限
*
* @param {*} data 日历项数据
* @param {*} appEntityName 应用实体名称
* @returns
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public async computeNodeState(data:any,appEntityName:string) {
let service:any = await this.appEntityService.getService(appEntityName);
if(this.copyActionModel && Object.keys(this.copyActionModel).length > 0) {
if(service['Get'] && service['Get'] instanceof Function){
let tempContext:any = Util.deepCopy(this.context);
tempContext[appEntityName] = data[appEntityName];
let targetData = await service.Get(tempContext,{}, false);
let uiservice:any = await new UIService().getService(appEntityName);
let result: any[] = ViewTool.calcActionItemAuthState(targetData.data,this.copyActionModel,uiservice);
return this.copyActionModel;
}else{
console.warn("获取数据异常");
return this.copyActionModel;
}
}
}
/** /**
* 事件绘制回调 * 事件绘制回调
* *
...@@ -810,17 +864,36 @@ FullCalendar, ...@@ -810,17 +864,36 @@ FullCalendar,
public eventRender(info?:any,) { public eventRender(info?:any,) {
let data = Object.assign({title: info.event.title, start: info.event.start, end: info.event.end}, info.event.extendedProps); let data = Object.assign({title: info.event.title, start: info.event.start, end: info.event.end}, info.event.extendedProps);
info.el.addEventListener('contextmenu', (event: MouseEvent) => { info.el.addEventListener('contextmenu', (event: MouseEvent) => {
event.preventDefault(); this.copyActionModel = {};
let props = { data: data, renderContent: this.renderContextMenu }; Object.values(this.actionModel).forEach((item:any) =>{
let component = ContextMenu; if(Object.is(item.nodeOwner,data.itemType)){
const vm:any = new Vue({ this.copyActionModel[item.name] = item;
render(h) {
return h(component, { props });
} }
}).$mount(); })
document.body.appendChild(vm.$el); if(Object.keys(this.copyActionModel).length === 0){
const comp: any = vm.$children[0]; return;
comp.showContextMenu(event.clientX, event.clientY); }
let dataMapping:any ={<#if ctrl.getPSSysCalendarItems()??><#list ctrl.getPSSysCalendarItems() as calendarItem>'${calendarItem.getItemType()}':'${calendarItem.getPSAppDataEntity().getCodeName()?lower_case}'<#if calendarItem_has_next>,</#if></#list></#if>};
this.computeNodeState(data,dataMapping[data.itemType]).then((result:any) => {
let flag:boolean = false;
if(Object.values(result).length>0){
flag =Object.values(result).some((item:any) =>{
return item.visabled === true;
})
}
if(flag){
let props = { data: data, renderContent: this.renderContextMenu };
let component = ContextMenu;
const vm:any = new Vue({
render(h) {
return h(component, { props });
}
}).$mount();
document.body.appendChild(vm.$el);
const comp: any = vm.$children[0];
comp.showContextMenu(event.clientX, event.clientY);
}
});
}); });
} }
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
:filter-node-method="filterNode" :filter-node-method="filterNode"
> >
<template slot-scope="{ node, data }"> <template slot-scope="{ node, data }">
<context-menu :contextMenuStyle="{width: '100%'}" :data="node" :renderContent="renderContextMenu"> <context-menu :ref='data.id' :isBlocked="true" :contextMenuStyle="{width: '100%'}" :data="node" :renderContent="renderContextMenu" @showContext="showContext(data,$event)">
<tooltip transfer style="width: 100%;" max-width="2000" placement="right"> <tooltip transfer style="width: 100%;" max-width="2000" placement="right">
<div class="tree-node" @dblclick="doDefaultAction(node)"> <div class="tree-node" @dblclick="doDefaultAction(node)">
<span class="icon"> <span class="icon">
...@@ -51,6 +51,10 @@ ...@@ -51,6 +51,10 @@
</div> </div>
</#if> </#if>
</template> </template>
<#assign import_block>
import { Environment } from '@/environments/environment';
import UIService from '@/uiservice/ui-service';
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
...@@ -253,6 +257,35 @@ ...@@ -253,6 +257,35 @@
*/ */
public appStateEvent: Subscription | undefined; public appStateEvent: Subscription | undefined;
/**
* 树节点上下文菜单集合
*
* @type {string[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public actionModel: any = {
<#if ctrl.getPSControls()??>
<#list ctrl.getPSControls() as childCtrl>
<#if childCtrl.getControlType() == "CONTEXTMENU">
<#if childCtrl.getPSDEToolbarItems()??>
<#list childCtrl.getPSDEToolbarItems() as item>
${childCtrl.getOwner().getNodeType()}_${item.name}: {name:'${item.name}',nodeOwner:'${childCtrl.getOwner().getNodeType()}',<#if item.getPSUIAction()??><#assign uiaction=item.getPSUIAction()>type: '${uiaction.getUIActionType()}', tag: '${uiaction.getUIActionTag()}'<#if (uiaction.getActionTarget()!="")>, actiontarget: '${uiaction.getActionTarget()}'</#if><#if uiaction.getNoPrivDisplayMode(view)??>, noprivdisplaymode:${uiaction.getNoPrivDisplayMode(view)}</#if><#if uiaction.getDataAccessAction()??>, dataaccaction:'${uiaction.getDataAccessAction()}'</#if>, visabled: true, disabled: false</#if>},
</#list>
</#if>
</#if>
</#list>
</#if>
}
/**
* 备份树节点上下文菜单
*
* @type any
* @memberof MainTreeBase
*/
public copyActionModel:any;
/** /**
* 选中数据变更事件 * 选中数据变更事件
* *
...@@ -330,6 +363,9 @@ ...@@ -330,6 +363,9 @@
if (Object.is('refresh_parent', action)) { if (Object.is('refresh_parent', action)) {
this.refresh_parent(); this.refresh_parent();
} }
if (Object.is('refresh_current', action)) {
this.refresh_current();
}
}); });
} }
if(AppCenterService && AppCenterService.getMessageCenter()){ if(AppCenterService && AppCenterService.getMessageCenter()){
...@@ -392,6 +428,33 @@ ...@@ -392,6 +428,33 @@
}); });
} }
/**
* 刷新当前节点
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public refresh_current(): void {
if (Object.keys(this.currentselectedNode).length === 0) {
return;
}
const tree: any = this.$refs.${ctrl.name};
const node: any = tree.getNode(this.currentselectedNode.id);
if (!node || !node.parent) {
return;
}
let curNode:any = {};
curNode = Util.deepObjectMerge(curNode,node);
let tempContext:any = {};
if(curNode.data && curNode.data.srfappctx){
Object.assign(tempContext,curNode.data.srfappctx);
}else{
Object.assign(tempContext,this.context);
}
const id: string = node.key ? node.key : '#';
const param: any = { srfnodeid: id };
this.refresh_node(tempContext,param, false);
}
/** /**
* 刷新父节点 * 刷新父节点
* *
...@@ -544,6 +607,7 @@ ...@@ -544,6 +607,7 @@
if (parentnode) { if (parentnode) {
this.currentselectedNode = {}; this.currentselectedNode = {};
} }
this.$forceUpdate();
this.setDefaultSelection(_items); this.setDefaultSelection(_items);
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status === 401) { if (response && response.status === 401) {
...@@ -649,10 +713,12 @@ ...@@ -649,10 +713,12 @@
*/ */
public renderContextMenu(node: any) { public renderContextMenu(node: any) {
let content; let content;
if (node && node.data) { if (node && node.data) {
const data: any = JSON.parse(JSON.stringify(node.data)); const data: any = JSON.parse(JSON.stringify(node.data));
this.currentselectedNode = { ...data }; this.currentselectedNode = { ...data };
const tags: string[] = data.id.split(';'); const tags: string[] = data.id.split(';');
let copyActionModel:any =Util.deepCopy(this.actionModel);
<#if ctrl.getPSControls()??> <#if ctrl.getPSControls()??>
<#list ctrl.getPSControls() as childCtrl> <#list ctrl.getPSControls() as childCtrl>
<#if childCtrl.getControlType() == "CONTEXTMENU"> <#if childCtrl.getControlType() == "CONTEXTMENU">
...@@ -672,7 +738,6 @@ ...@@ -672,7 +738,6 @@
/** /**
* 绘制${childCtrl.getOwner().getNodeType()}类型右键菜单 * 绘制${childCtrl.getOwner().getNodeType()}类型右键菜单
* *
* @param {*} node
* @returns * @returns
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
...@@ -687,6 +752,67 @@ ${P.getCtrlCode(childCtrl, 'CONTROL.html').code} ...@@ -687,6 +752,67 @@ ${P.getCtrlCode(childCtrl, 'CONTROL.html').code}
</#list> </#list>
</#if> </#if>
/**
* 显示上下文菜单
*
* @param data 节点数据
* @param event 事件源
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public showContext(data:any,event:any){
let _this:any = this;
this.copyActionModel = {};
const tags: string[] = data.id.split(';');
Object.values(this.actionModel).forEach((item:any) =>{
if(Object.is(item.nodeOwner,tags[0])){
this.copyActionModel[item.name] = item;
}
})
if(Object.keys(this.copyActionModel).length === 0){
return;
}
this.computeNodeState(data,data.nodeType,data.appEntityName).then((result:any) => {
let flag:boolean = false;
if(Object.values(result).length>0){
flag =Object.values(result).some((item:any) =>{
return item.visabled === true;
})
}
if(flag){
(_this.$refs[data.id] as any).showContextMenu(event.clientX, event.clientY);
}
});
}
/**
* 计算节点右键权限
*
* @param {*} node 节点数据
* @param {*} nodeType 节点类型
* @param {*} appEntityName 应用实体名称
* @returns
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public async computeNodeState(node:any,nodeType:string,appEntityName:string) {
if(Object.is(nodeType,"STATIC")){
return this.copyActionModel;
}
let service:any = await this.appEntityService.getService(appEntityName);
if(this.copyActionModel && Object.keys(this.copyActionModel).length > 0) {
if(service['Get'] && service['Get'] instanceof Function){
let tempContext:any = Util.deepCopy(this.context);
tempContext[appEntityName] = node.srfkey;
let targetData = await service.Get(tempContext,{}, false);
let uiservice:any = await new UIService().getService(appEntityName);
let result: any[] = ViewTool.calcActionItemAuthState(targetData.data,this.copyActionModel,uiservice);
return this.copyActionModel;
}else{
console.warn("获取数据异常");
return this.copyActionModel;
}
}
}
/** /**
* 设置选中高亮 * 设置选中高亮
* *
......
...@@ -293,6 +293,8 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -293,6 +293,8 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#-- 补充nodeid和nodeid2 --> <#-- 补充nodeid和nodeid2 -->
Object.assign(treeNode, { nodeid: treeNode.srfkey }); Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId }); Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
<#-- 补充节点类型 -->
Object.assign(treeNode, { nodeType: "${node.getTreeNodeType()}" });
list.push(treeNode); list.push(treeNode);
resolve(list); resolve(list);
}); });
...@@ -362,6 +364,12 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -362,6 +364,12 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#-- 补充nodeid和nodeid2 --> <#-- 补充nodeid和nodeid2 -->
Object.assign(item, { nodeid: item.srfkey }); Object.assign(item, { nodeid: item.srfkey });
Object.assign(item, { nodeid2: item.pvalue }); Object.assign(item, { nodeid2: item.pvalue });
<#-- 补充节点类型 -->
<#if node.getPSCodeList().getCodeListType() == 'STATIC'>
Object.assign(item, { nodeType: 'STATIC' });
<#else>
Object.assign(item, { nodeType: "${node.getTreeNodeType()}",appEntityName:"${node.getPSAppDataEntity().getCodeName()?lower_case}" });
</#if>
} }
codeListIems = this.handleDataSet(JSON.parse(JSON.stringify(codeListIems)),context,handleChildData); codeListIems = this.handleDataSet(JSON.parse(JSON.stringify(codeListIems)),context,handleChildData);
codeListIems.forEach((item:any) => { codeListIems.forEach((item:any) => {
...@@ -434,6 +442,12 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -434,6 +442,12 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#-- 补充nodeid和nodeid2 --> <#-- 补充nodeid和nodeid2 -->
Object.assign(treeNode, { nodeid: treeNode.srfkey }); Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId }); Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
<#-- 补充节点类型 -->
<#if node.getPSCodeList().getCodeListType() == 'STATIC'>
Object.assign(treeNode, { nodeType: 'STATIC' });
<#else>
Object.assign(treeNode, { nodeType: "${node.getTreeNodeType()}",appEntityName:"${node.getPSAppDataEntity().getCodeName()?lower_case}" });
</#if>
list.push(treeNode); list.push(treeNode);
resolve(list); resolve(list);
}) })
...@@ -563,6 +577,8 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -563,6 +577,8 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#-- 补充nodeid和nodeid2 --> <#-- 补充nodeid和nodeid2 -->
Object.assign(treeNode, { nodeid: treeNode.srfkey }); Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId }); Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
<#-- 补充节点类型 -->
Object.assign(treeNode, { nodeType: "${node.getTreeNodeType()}",appEntityName:"${node.getPSAppDataEntity().getCodeName()?lower_case}" });
list.push(treeNode); list.push(treeNode);
resolve(list); resolve(list);
bFirst = false; bFirst = false;
......
...@@ -43,6 +43,8 @@ ...@@ -43,6 +43,8 @@
:viewdata="JSON.stringify(selection.context)" :viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)" :viewparam="JSON.stringify(selection.viewparam)"
@viewdataschange="onViewDatasChange" @viewdataschange="onViewDatasChange"
@drdatasaved="onDrViewDatasChange"
@drdatasremove="onDrViewDatasChange"
@viewdatasactivated="viewDatasActivated" @viewdatasactivated="viewDatasActivated"
@viewload="onViewLoad"> @viewload="onViewLoad">
</component> </component>
...@@ -379,6 +381,19 @@ ...@@ -379,6 +381,19 @@
this.$emit('selectionchange', $event); this.$emit('selectionchange', $event);
} }
/**
* 视图数据变化
*
* @param {*} $event
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onDrViewDatasChange($event: any): void {
<#if ctrl.getPSDETree()??>
<#assign tree = ctrl.getPSDETree()/>
this.viewState.next({ tag: '${tree.name}', action: 'refresh_current' });
</#if>
}
/** /**
* 视图数据被激活 * 视图数据被激活
* *
......
...@@ -243,7 +243,7 @@ import { Environment } from '@/environments/environment'; ...@@ -243,7 +243,7 @@ import { Environment } from '@/environments/environment';
public saveState:any ; public saveState:any ;
/** /**
* 属性值规则 * 值规则
* *
* @type {*} * @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
...@@ -739,20 +739,18 @@ import { Environment } from '@/environments/environment'; ...@@ -739,20 +739,18 @@ import { Environment } from '@/environments/environment';
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public computeButtonState(data:any){ public computeButtonState(data:any){
if(Environment.enablePermissionValid){ let targetData:any = this.transformData(data);
let targetData:any = this.transformData(data); if(this.detailsModel && Object.keys(this.detailsModel).length >0){
if(this.detailsModel && Object.keys(this.detailsModel).length >0){ Object.keys(this.detailsModel).forEach((name:any) =>{
Object.keys(this.detailsModel).forEach((name:any) =>{ if(this.detailsModel[name] && this.detailsModel[name].uiaction && this.detailsModel[name].uiaction.dataaccaction && Object.is(this.detailsModel[name].detailType,"BUTTON")){
if(this.detailsModel[name] && this.detailsModel[name].uiaction && this.detailsModel[name].uiaction.dataaccaction && Object.is(this.detailsModel[name].detailType,"BUTTON")){ this.detailsModel[name].isPower = true;
this.detailsModel[name].isPower = true; let tempUIAction:any = JSON.parse(JSON.stringify(this.detailsModel[name].uiaction));
let tempUIAction:any = JSON.parse(JSON.stringify(this.detailsModel[name].uiaction)); let result: any[] = ViewTool.calcActionItemAuthState(targetData,[tempUIAction],this.appUIService);
let result: any[] = ViewTool.calcActionItemAuthState(targetData,[tempUIAction],this.appUIService); this.detailsModel[name].visible = tempUIAction.visabled;
this.detailsModel[name].visible = tempUIAction.visabled; this.detailsModel[name].disabled = tempUIAction.disabled;
this.detailsModel[name].disabled = tempUIAction.disabled; this.detailsModel[name].isPower = result[0] === 1 ? true : false;
this.detailsModel[name].isPower = result[0] === 1 ? true : false; }
} })
})
}
} }
} }
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
<span>${item.render.code}</span> <span>${item.render.code}</span>
<#-- END:列绘制 --> <#-- END:列绘制 -->
<#else> <#else>
<template v-if="actualIsOpenEdit"> <template v-if="actualIsOpenEdit && !row.children">
<app-form-item :error="gridItemsModel[$index][column.property].error"> <app-form-item :error="gridItemsModel[$index][column.property].error">
${P.getEditorCode(item, "GRIDEIDTOR.vue").code} ${P.getEditorCode(item, "GRIDEIDTOR.vue").code}
</app-form-item> </app-form-item>
......
...@@ -21,6 +21,11 @@ ${ctrl.render.code} ...@@ -21,6 +21,11 @@ ${ctrl.render.code}
:highlight-current-row ="isSingleSelect" :highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName" :row-class-name="getRowClassName"
:cell-class-name="getCellClassName" :cell-class-name="getCellClassName"
<#if ctrl.isEnableGroup()>
:span-method="arraySpanMethod"
:tree-props="{children: 'children', hasChildren: 'children.length>0'}"
row-key="groupById"
</#if>
<#if ctrl.isEnablePagingBar()> <#if ctrl.isEnablePagingBar()>
max-height="items.length > 0 ? 'calc(100%-50px)' : '100%'" max-height="items.length > 0 ? 'calc(100%-50px)' : '100%'"
<#else> <#else>
...@@ -28,7 +33,7 @@ ${ctrl.render.code} ...@@ -28,7 +33,7 @@ ${ctrl.render.code}
</#if> </#if>
@row-click="rowClick($event)" @row-click="rowClick($event)"
@select-all="selectAll($event)" @select-all="selectAll($event)"
@select="select($event)" @select="select"
@row-class-name="onRowClassName($event)" @row-class-name="onRowClassName($event)"
@row-dblclick="rowDBLClick($event)" @row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader"> ref='multipleTable' :data="items" :show-header="!isHideHeader">
...@@ -46,6 +51,15 @@ ${ctrl.render.code} ...@@ -46,6 +51,15 @@ ${ctrl.render.code}
<template v-if="!isSingleSelect"> <template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column> <el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template> </template>
<#if ctrl.isEnableGroup()>
<template>
<el-table-column show-overflow-tooltip prop="group" :label="$t('app.gridpage.group')" :min-width="80">
<template v-slot="{row,column,$index}">
<span>{{ row.group }}</span>
</template>
</el-table-column>
</template>
</#if>
<#assign adaptationColu = true/> <#assign adaptationColu = true/>
<#list ctrl.getPSDEGridColumns() as column> <#list ctrl.getPSDEGridColumns() as column>
<@ibizindent blank=12> <@ibizindent blank=12>
...@@ -540,6 +554,30 @@ import { Environment } from '@/environments/environment'; ...@@ -540,6 +554,30 @@ import { Environment } from '@/environments/environment';
*/ */
public gridItemsModel: any[] = []; public gridItemsModel: any[] = [];
/**
* 是否启用分组
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public isEnableGroup:boolean = ${ctrl.isEnableGroup()?c};
/**
* 分组属性
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public groupAppField:string ="<#if ctrl.getGroupPSDEField()??>${ctrl.getGroupPSDEField().getCodeName()?lower_case}</#if>";
/**
* 分组模式
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public groupMode:string ="<#if ctrl.getGroupMode()??>${ctrl.getGroupMode()}</#if>";
/** /**
* 获取界面行为权限状态 * 获取界面行为权限状态
* *
...@@ -547,10 +585,8 @@ import { Environment } from '@/environments/environment'; ...@@ -547,10 +585,8 @@ import { Environment } from '@/environments/environment';
*/ */
public getActionState(data:any){ public getActionState(data:any){
let tempActionModel:any = JSON.parse(JSON.stringify(this.ActionModel)); let tempActionModel:any = JSON.parse(JSON.stringify(this.ActionModel));
if(Environment.enablePermissionValid){ let targetData:any = this.transformData(data);
let targetData:any = this.transformData(data); ViewTool.calcActionItemAuthState(targetData,tempActionModel,this.appUIService);
ViewTool.calcActionItemAuthState(targetData,tempActionModel,this.appUIService);
}
return tempActionModel; return tempActionModel;
} }
...@@ -747,6 +783,9 @@ import { Environment } from '@/environments/environment'; ...@@ -747,6 +783,9 @@ import { Environment } from '@/environments/environment';
<#if ctrl.getAggMode() == "ALL"> <#if ctrl.getAggMode() == "ALL">
this.getAggData(); this.getAggData();
</#if> </#if>
<#if ctrl.isEnableGroup()>
this.drawGroup();
</#if>
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
...@@ -1264,6 +1303,10 @@ import { Environment } from '@/environments/environment'; ...@@ -1264,6 +1303,10 @@ import { Environment } from '@/environments/environment';
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public rowDBLClick($event: any): void { public rowDBLClick($event: any): void {
// 分组行跳过
if($event && $event.children && $event.children.length >0){
return;
}
if (!$event || this.actualIsOpenEdit || Object.is(this.gridRowActiveMode,0)) { if (!$event || this.actualIsOpenEdit || Object.is(this.gridRowActiveMode,0)) {
return; return;
} }
...@@ -1281,33 +1324,209 @@ import { Environment } from '@/environments/environment'; ...@@ -1281,33 +1324,209 @@ import { Environment } from '@/environments/environment';
} }
/** /**
* 复选框数据选中 * 合并分组行
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public arraySpanMethod({row, column, rowIndex, columnIndex} : any) {
let allColumns:Array<any> = [<#if ctrl.getPSDEGridColumns()??><#list ctrl.getPSDEGridColumns() as singleColumn>'${singleColumn.getCodeName()}'<#if singleColumn_has_next>,</#if></#list></#if>];
if(row && row.children && row.children.length>0) {
if(columnIndex == (this.isSingleSelect ? 0:1)) {
return [1, allColumns.length+1];
} else if(columnIndex > (this.isSingleSelect ? 0:1)) {
return [0,0];
}
}
}
/**
* 绘制分组
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public drawGroup(){
if(!this.isEnableGroup) return;
// 分组
let allGroup: Array<any> = [];
this.items.forEach((item: any)=>{
if(item.hasOwnProperty(this.groupAppField)){
allGroup.push(item[this.groupAppField]);
}
});
let groupTree:Array<any> = [];
allGroup = [...new Set(allGroup)];
if(allGroup.length == 0){
console.warn("分组数据无效");
}
// 组装数据
allGroup.forEach((group: any, groupIndex: number)=>{
let children:Array<any> = [];
this.items.forEach((item: any,itemIndex: number)=>{
if(Object.is(group,item[this.groupAppField])){
item.groupById = Number((groupIndex+1) * 10 + (itemIndex+1) * 1);
item.group = '';
children.push(item);
}
});
group = group ? group : this.$t('app.gridpage.other');
const tree: any ={
groupById: Number((groupIndex+1)*10),
group: group,
<#if ctrl.getPSDEGridColumns()??>
<#list ctrl.getPSDEGridColumns() as singleColumn>
<#if singleColumn.getColumnType()?? && singleColumn.getColumnType() == "UAGRIDCOLUMN">
<#if singleColumn.getPSDEUIActionGroup()?? && singleColumn.getPSDEUIActionGroup().getPSUIActions()??>
<#list singleColumn.getPSDEUIActionGroup().getPSUIActions() as singleUIAction>
${singleUIAction.getCodeName()}:{
visabled: false
},
</#list>
</#if>
<#else>
${singleColumn.getCodeName()}:'',
</#if>
</#list>
</#if>
children: children,
}
groupTree.push(tree);
});
this.items = groupTree;
if(this.actualIsOpenEdit) {
for(let i = 0; i < this.items.length; i++) {
this.gridItemsModel.push(this.getGridRowModel());
}
}
}
/**
* 单个复选框选中
* *
* @param {*} $event * @param {*} selection 所有选中行数据
* @returns {void} * @param {*} row 当前选中行数据
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public select($event: any): void { public select(selection: any, row: any): void {
if (!$event) { if(this.groupAppField) {
return; let isContain:boolean = selection.some((item:any) =>{
return item == row;
})
// 是否选中当前行,选中为true,否则为false
if(isContain) {
// 当前行为分组行
if(row.children && row.children.length > 0) {
this.toggleSelection(row.children, true);
row.children.forEach((children: any) => {
this.selections.push(children);
});
} else {
this.selections.push(row);
}
} else {
if(row.children && row.children.length > 0) {
this.toggleSelection(row.children, false);
this.selections = this.computeCheckedData(this.selections, row.children);
} else {
this.selections = this.computeCheckedData(this.selections, row);
}
}
this.selections = [...new Set(this.selections)]
} else {
if(!selection) {
return;
}
this.selections = [...JSON.parse(JSON.stringify(selection))];
} }
this.selections = [];
this.selections = [...JSON.parse(JSON.stringify($event))];
this.$emit('selectionchange', this.selections); this.$emit('selectionchange', this.selections);
} }
/**
* 计算当前选中数据
*
* @param {*} selectionArray 所有选中行数据
* @param {*} cancelData 被取消选中行数据,分组行为数组,非分组行为对象
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public computeCheckedData(selectionArray: any[], cancelData: Array<any> | any) {
let targetArray: Array<any> = [];
// 分组行
if(Array.isArray(cancelData)) {
if(selectionArray && selectionArray.length > 0) {
selectionArray.forEach((selection:any) =>{
let tempFlag:boolean = true;
cancelData.forEach((child:any) =>{
if(selection.groupById===child.groupById){
tempFlag = false;
}
})
if(tempFlag) targetArray.push(selection);
})
}
} else {
// 非分组行
if(selectionArray && selectionArray.length > 0) {
selectionArray.forEach((selection:any) =>{
let tempFlag:boolean = true;
if(selection.groupById===cancelData.groupById){
tempFlag = false;
}
if(tempFlag) targetArray.push(selection);
})
}
}
return targetArray;
}
/**
* 设置非分组行checkbox选中状态
*
* @param {*} rows 选中数据数组
* @param {boolean} flag 是否选中
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public toggleSelection(rows?: any, flag?: boolean) {
if(rows) {
rows.forEach((row:any) => {
(this.$refs.multipleTable as any).toggleRowSelection(row, flag);
});
} else {
(this.$refs.multipleTable as any).clearSelection();
}
}
/** /**
* 复选框数据全部选中 * 复选框数据全部选中
* *
* @param {*} $event * @param {*} $event
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public selectAll($event: any): void { public selectAll(selection: any): void {
if (!$event) { this.selections = [];
return; if(this.groupAppField) {
let flag: boolean = true;
if(selection && selection.length === this.items.length) {
selection.forEach((element: any) => {
if(element.children && element.children.length > 0) {
this.toggleSelection(element.children, flag);
element.children.forEach((children: any) => {
this.selections.push(children);
});
} else {
flag = false;
}
});
} else {
flag = false;
}
if(!flag) {
this.toggleSelection();
}
} else {
if(!selection) {
return;
}
this.selections = [...JSON.parse(JSON.stringify(selection))];
} }
this.selections = [];
this.selections = [...JSON.parse(JSON.stringify($event))];
this.$emit('selectionchange', this.selections); this.$emit('selectionchange', this.selections);
} }
...@@ -1320,6 +1539,10 @@ import { Environment } from '@/environments/environment'; ...@@ -1320,6 +1539,10 @@ import { Environment } from '@/environments/environment';
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public rowClick($event: any, ifAlways: boolean = false): void { public rowClick($event: any, ifAlways: boolean = false): void {
// 分组行跳过
if($event && $event.children && $event.children.length >0){
return;
}
if (!ifAlways && (!$event || this.actualIsOpenEdit)) { if (!ifAlways && (!$event || this.actualIsOpenEdit)) {
return; return;
} }
...@@ -1754,7 +1977,9 @@ import { Environment } from '@/environments/environment'; ...@@ -1754,7 +1977,9 @@ import { Environment } from '@/environments/environment';
const data = response.data; const data = response.data;
this.createDefault(data); this.createDefault(data);
data.rowDataState = "create"; data.rowDataState = "create";
_this.items.push(data); let tempItems: any[] = [];
tempItems.push(data);
_this.items = tempItems.concat(_this.items);
_this.gridItemsModel.push(_this.getGridRowModel()); _this.gridItemsModel.push(_this.getGridRowModel());
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status === 401) { if (response && response.status === 401) {
...@@ -1876,24 +2101,59 @@ import { Environment } from '@/environments/environment'; ...@@ -1876,24 +2101,59 @@ import { Environment } from '@/environments/environment';
} }
/** /**
* 获取对应class * 获取对应单元格class
* *
* @param {*} $args row 行数据,column 列数据,rowIndex 行索引,列索引 * @param {*} $args row 行数据,column 列数据,rowIndex 行索引,columnIndex 列索引
* @returns {void} * @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public getCellClassName(args:{row: any, column: any, rowIndex: number, columnIndex:number}){ public getCellClassName(args:{row: any, column: any, rowIndex: number, columnIndex:number}){
let className: string = '';
if(args.column.property){ if(args.column.property){
let col = this.allColumns.find((item:any)=>{ let col = this.allColumns.find((item:any)=>{
return Object.is(args.column.property,item.name); return Object.is(args.column.property,item.name);
}) })
if(col !== undefined){ if(col !== undefined){
if(col.isEnableRowEdit && this.actualIsOpenEdit ){ if(col.isEnableRowEdit && this.actualIsOpenEdit ){
return 'edit-cell'; className += 'edit-cell ';
} }
} else {
className += 'info-cell';
} }
} }
return 'info-cell'; if(this.groupAppField && args.columnIndex === 0 && !this.isSingleSelect) {
if(args.row.children && args.row.children.length > 0) {
className += this.computeGroupRow(args.row.children, args.row);
}
}
return className;
}
/**
* 计算分组行checkbox选中样式
*
* @param {*} rows 当前分组行下的所有数据
* @returns {*} currentRow 当前分组行
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public computeGroupRow(rows: any[], currentRow: any) {
let count: number = 0;
this.selections.forEach((select: any) => {
rows.forEach((row: any) => {
if(row.groupById === select.groupById) {
count++;
}
})
})
if(count === rows.length) {
(this.$refs.multipleTable as any).toggleRowSelection(currentRow, true);
return 'cell-select-all ';
} else if(count !== 0 && count < rows.length) {
return 'cell-indeterminate '
} else if(count === 0) {
(this.$refs.multipleTable as any).toggleRowSelection(currentRow, false);
return '';
}
} }
/** /**
......
...@@ -116,8 +116,62 @@ ...@@ -116,8 +116,62 @@
} }
} }
} }
.cell-indeterminate {
>div>label {
>span {
.el-checkbox__inner {
background-color: #409eff;
border-color: #409eff;
}
.el-checkbox__inner:before {
content: "";
position: absolute;
display: block;
background-color: #fff;
height: 2px;
transform: scale(.5);
left: 0;
right: 0;
top: 5px;
}
}
>span.is-checked {
.el-checkbox__inner {
background-color: #409eff;
border-color: #409eff;
}
.el-checkbox__inner:after {
border: 0px;
}
}
}
}
.cell-select-all {
>div>label {
>span {
.el-checkbox__inner {
background-color: #409eff;
border-color: #409eff;
}
.el-checkbox__inner:after {
box-sizing: content-box;
content: "";
border: 1px solid #fff;
border-left: 0;
border-top: 0;
height: 7px;
left: 4px;
position: absolute;
top: 1px;
transform: rotate(45deg) scaleY(1);
width: 3px;
transition: transform .15s ease-in .05s;
transform-origin: center;
}
}
}
}
<#ibizinclude> <#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl ../@MACRO/CSS/DEFAULT.less.ftl
......
...@@ -10,6 +10,14 @@ ...@@ -10,6 +10,14 @@
</div> </div>
</#if> </#if>
<div class="container-header"> <div class="container-header">
<#if view.isEnableQuickGroup()>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
</#if>
<div class="quick-group-container">
<app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${appCounter.getCodeName()?lower_case}counterservice"</#if> @valuechange="quickGroupValueChange"></app-quick-group>
</div>
</#if>
<#if ctrl.isEnableSearch()> <#if ctrl.isEnableSearch()>
<div class='search-container'> <div class='search-container'>
<i-input :search="true" <i-input :search="true"
...@@ -52,6 +60,13 @@ ...@@ -52,6 +60,13 @@
</#if> </#if>
</template> </template>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter';
</#if>
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
...@@ -101,6 +116,17 @@ ...@@ -101,6 +116,17 @@
*/ */
public isSingleSelect:boolean = true; public isSingleSelect:boolean = true;
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
/**
* ${srfclassname('${appCounter.getCodeName()}')}CounterService计数器服务对象
*
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store,context:this.context,viewparams:this.viewparams });
</#if>
/** /**
* 呈现模式,可选值:horizontal或者vertical * 呈现模式,可选值:horizontal或者vertical
* *
...@@ -194,6 +220,116 @@ ...@@ -194,6 +220,116 @@
*/ */
public navigateParams:any = <#if xDataControl.getPSNavigateParams?? && xDataControl.getPSNavigateParams()??><@getNavigateParams xDataControl /><#else>null</#if>; public navigateParams:any = <#if xDataControl.getPSNavigateParams?? && xDataControl.getPSNavigateParams()??><@getNavigateParams xDataControl /><#else>null</#if>;
</#if> </#if>
<#if view.isEnableQuickGroup()>
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
/**
* 快速分组数据对象
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public quickGroupData:any;
/**
* 快速分组是否有抛值
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public isEmitQuickGroupValue:boolean = false;
/**
* 快速分组模型
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public quickGroupModel:Array<any> = [];
/**
* 加载快速分组模型
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public loadQuickGroupModel(){
<#if view.getQuickGroupPSCodeList()??>
<#assign codelist=view.getQuickGroupPSCodeList() />
let quickGroupCodeList:any = {tag:'${codelist.codeName}',codelistType:'${codelist.getCodeListType()}'};
if(quickGroupCodeList.tag && Object.is(quickGroupCodeList.codelistType,"STATIC")){
const codelist = this.$store.getters.getCodeList(quickGroupCodeList.tag);
if (codelist) {
this.quickGroupModel = [...this.handleDynamicData(JSON.parse(JSON.stringify(codelist.items)))];
} else {
<#noparse>console.log(`----${quickGroupCodeList.tag}----代码表不存在`);</#noparse>
}
}else if(quickGroupCodeList.tag && Object.is(quickGroupCodeList.codelistType,"DYNAMIC")){
this.codeListService.getItems(quickGroupCodeList.tag,{},{}).then((res:any) => {
this.quickGroupModel = res;
}).catch((error:any) => {
<#noparse>console.log(`----${quickGroupCodeList.tag}----代码表不存在`);</#noparse>
});
}
</#if>
}
/**
* 处理快速分组模型动态数据部分(%xxx%)
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public handleDynamicData(inputArray:Array<any>){
if(inputArray.length >0){
inputArray.forEach((item:any) =>{
if(item.data && Object.keys(item.data).length >0){
Object.keys(item.data).forEach((name:any) =>{
let value: any = item.data[name];
if (value && typeof(value)=='string' && value.startsWith('%') && value.endsWith('%')) {
const key = (value.substring(1, value.length - 1)).toLowerCase();
if (this.context[key]) {
value = this.context[key];
} else if(this.viewparams[key]){
value = this.viewparams[key];
}
}
item.data[name] = value;
})
}
})
}
return inputArray;
}
/**
* 快速分组值变化
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public quickGroupValueChange($event:any){
if($event && $event.data){
if(this.quickGroupData) {
for(let key in this.quickGroupData) {
delete this.viewparams[key];
}
}
this.quickGroupData = $event.data;
Object.assign(this.viewparams, $event.data);
}else{
if(this.quickGroupData) {
for(let key in this.quickGroupData) {
delete this.viewparams[key];
}
}
}
if(this.isEmitQuickGroupValue){
this.onSearch($event);
}
this.isEmitQuickGroupValue = true;
}
</#if>
/** /**
* 显示处理提示 * 显示处理提示
...@@ -259,6 +395,9 @@ ...@@ -259,6 +395,9 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public afterCreated(){ public afterCreated(){
<#if view.isEnableQuickGroup()>
this.loadQuickGroupModel();
</#if>
if (this.viewState) { if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => { this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) { if (!Object.is(tag, this.name)) {
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
} }
.container-header{ .container-header{
display: flex; display: flex;
justify-content: space-between; justify-content: flex-start;
align-items: center; align-items: center;
.search-container { .search-container {
width: 30%; width: 30%;
...@@ -108,6 +108,9 @@ ...@@ -108,6 +108,9 @@
.toolbar-container{ .toolbar-container{
padding: 4px; padding: 4px;
} }
.quick-group-container {
padding-right: 20px;
}
} }
.grid-exp-bar-content { .grid-exp-bar-content {
<#-- 计算高度 --> <#-- 计算高度 -->
......
...@@ -19,7 +19,7 @@ ${P.getCtrlCode('grid', 'CONTROL.html').code} ...@@ -19,7 +19,7 @@ ${P.getCtrlCode('grid', 'CONTROL.html').code}
<div style='margin-bottom: 6px;'> <div style='margin-bottom: 6px;'>
<#if view.isEnableQuickGroup()> <#if view.isEnableQuickGroup()>
<div class="quick-group-container"> <div class="quick-group-container">
<app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${srfclassname('${appCounter.getCodeName()}')}counterservice"</#if> @valuechange="quickGroupValueChange"></app-quick-group> <app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${appCounter.getCodeName()?lower_case}counterservice"</#if> @valuechange="quickGroupValueChange"></app-quick-group>
</div> </div>
</#if> </#if>
<#if view.getQuickPSDESearchForm()??> <#if view.getQuickPSDESearchForm()??>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<div style="margin-bottom:6px;"> <div style="margin-bottom:6px;">
<#if view.isEnableQuickGroup()> <#if view.isEnableQuickGroup()>
<div class="quick-group-container"> <div class="quick-group-container">
<app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${srfclassname('${appCounter.getCodeName()}')}counterservice"</#if> @valuechange="quickGroupValueChange"></app-quick-group> <app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${appCounter.getCodeName()?lower_case}counterservice"</#if> @valuechange="quickGroupValueChange"></app-quick-group>
</div> </div>
</#if> </#if>
<#if view.getQuickPSDESearchForm()??> <#if view.getQuickPSDESearchForm()??>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<div style="margin-bottom:6px;"> <div style="margin-bottom:6px;">
<#if view.isEnableQuickGroup()> <#if view.isEnableQuickGroup()>
<div class="quick-group-container"> <div class="quick-group-container">
<app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${srfclassname('${appCounter.getCodeName()}')}counterservice"</#if> @valuechange="quickGroupValueChange"></app-quick-group> <app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${appCounter.getCodeName()?lower_case}counterservice"</#if> @valuechange="quickGroupValueChange"></app-quick-group>
</div> </div>
</#if> </#if>
<#if view.getQuickPSDESearchForm()??> <#if view.getQuickPSDESearchForm()??>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<div style="margin-bottom:6px;"> <div style="margin-bottom:6px;">
<#if view.isEnableQuickGroup()> <#if view.isEnableQuickGroup()>
<div class="quick-group-container"> <div class="quick-group-container">
<app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${srfclassname('${appCounter.getCodeName()}')}counterservice"</#if> @valuechange="quickGroupValueChange"></app-quick-group> <app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${appCounter.getCodeName()?lower_case}counterservice"</#if> @valuechange="quickGroupValueChange"></app-quick-group>
</div> </div>
</#if> </#if>
<#if view.getQuickPSDESearchForm()??> <#if view.getQuickPSDESearchForm()??>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<div style="margin-bottom:6px;"> <div style="margin-bottom:6px;">
<#if view.isEnableQuickGroup()> <#if view.isEnableQuickGroup()>
<div class="quick-group-container"> <div class="quick-group-container">
<app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${srfclassname('${appCounter.getCodeName()}')}counterservice"</#if> @valuechange="quickGroupValueChange"></app-quick-group> <app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${appCounter.getCodeName()?lower_case}counterservice"</#if> @valuechange="quickGroupValueChange"></app-quick-group>
</div> </div>
</#if> </#if>
<#if view.getQuickPSDESearchForm()??> <#if view.getQuickPSDESearchForm()??>
......
...@@ -136,7 +136,7 @@ import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.code ...@@ -136,7 +136,7 @@ import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.code
public onViewDatasChange($event: any): void { public onViewDatasChange($event: any): void {
if($event.length>0){ if($event.length>0){
$event.forEach((item:any,index:any) => { $event.forEach((item:any,index:any) => {
let srfmajortext = item['${ctrl.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}']; let srfmajortext = item.srfmajortext?item.srfmajortext:item['${ctrl.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'];
if(srfmajortext){ if(srfmajortext){
Object.assign($event[index],{srfmajortext: srfmajortext}); Object.assign($event[index],{srfmajortext: srfmajortext});
} }
......
...@@ -206,7 +206,7 @@ import { Environment } from '@/environments/environment'; ...@@ -206,7 +206,7 @@ import { Environment } from '@/environments/environment';
icon:"<#if uiaction.getIconCls?? && uiaction.getIconCls()??>${uiaction.getIconCls()}</#if>", icon:"<#if uiaction.getIconCls?? && uiaction.getIconCls()??>${uiaction.getIconCls()}</#if>",
<#if uiaction.getPSAppCounter?? && uiaction.getPSAppCounter()??> <#if uiaction.getPSAppCounter?? && uiaction.getPSAppCounter()??>
<#assign counter = uiaction.getPSAppCounter() /> <#assign counter = uiaction.getPSAppCounter() />
counterService:this.${srfclassname('${counter.getCodeName()}')}counterservice, counterService:this.${counter.getCodeName()?lower_case}counterservice,
<#if uiaction.getCounterId()??>counterId:"${uiaction.getCounterId()}",</#if> <#if uiaction.getCounterId()??>counterId:"${uiaction.getCounterId()}",</#if>
noprivdisplaymode:<#if uiaction.getNoPrivDisplayMode(view)??>${uiaction.getNoPrivDisplayMode(view)}<#else>''</#if>, noprivdisplaymode:<#if uiaction.getNoPrivDisplayMode(view)??>${uiaction.getNoPrivDisplayMode(view)}<#else>''</#if>,
dataaccaction:'<#if uiaction.getDataAccessAction()??>${uiaction.getDataAccessAction()}</#if>', dataaccaction:'<#if uiaction.getDataAccessAction()??>${uiaction.getDataAccessAction()}</#if>',
......
<#assign selfContent> <#assign selfContent>
<i-button type="primary" long <#if item.getPSUIAction?? && item.getPSUIAction()??>@click="uiAction(null, '${item.getPSUIAction().getUIActionTag()}', $event)"</#if> <#if item.getHeight() gt 0> style="height: ${item.getHeight()?c}px;"</#if>> <#if item.render??>
<#if item.getPSSysImage()??> ${item.render.code}
<#assign image = item.getPSSysImage()> <#else>
<i class="${image.getCssClass()}"></i> <app-panel-item
</#if> caption="<#if item.getCaption?? && item.getCaption()??>${item.getCaption()}</#if>"
<#if item.isShowCaption()> icon="<#if item.getPSSysImage?? && item.getPSSysImage()??>${item.getPSSysImage().getCssClass()}</#if>"
<span<#if item.getLabelPSSysCss()??> class="${item.getLabelPSSysCss().getCssName()}"</#if><#if item.getLabelPSSysCss()??> style="${item.getLabelPSSysCss().getRawCssStyle()}"</#if>>${item.getCaption()}</span> itemType="BUTTON"
</#if> :showCaption="<#if item.isShowCaption?? && item.isShowCaption()??>${item.isShowCaption()?c}<#else>true</#if>"
</i-button> <#if item.getLabelPSSysCss?? && item.getLabelPSSysCss()??>lableStyle='${item.getLabelPSSysCss().getCssName()}'</#if>
<#if item.getPSUIAction?? && item.getPSUIAction()??>@onClick="($event)=>{uiAction(null, '${item.getPSUIAction().getUIActionTag()}', $event)}"</#if>>
</app-panel-item>
</#if>
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
./@MACRO/PLAYOUT.vue.ftl ./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude> </#ibizinclude>
<#if item.getParentLayoutMode()=='FLEX'> <#if item.getParentLayoutMode()=='FLEX'>
<div v-show="detailsModel.${item.name}.visible" style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-button<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <div v-show="detailsModel.${item.name}.visible" style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-button<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
${content} ${content}
</div> </div>
<#else> <#else>
<i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-button<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} style="<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-button<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
${content} ${content}
</i-col> </i-col>
</#if> </#if>
\ No newline at end of file
...@@ -3,18 +3,11 @@ ...@@ -3,18 +3,11 @@
./@MACRO/PLAYOUT.vue.ftl ./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude> </#ibizinclude>
<#if layout.getLayout()=='FLEX'> <#if layout.getLayout()=='FLEX'>
<div v-show="detailsModel.${item.name}.visible" class="app-layoutpanel-container<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if>"> <i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} class="app-layoutpanel-container<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" style="${flexAttr}width:<#if item.getWidth() gt 0>${item.getWidth()?c}px</#if>;height:<#if item.getHeight() gt 0>${item.getHeight()?c}px<#else>100%</#if>;">
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
<#-- <#if item.isShowCaption()> <div style="height:100%;display: flex;<#if layout.getDir()!="">flex-direction: ${layout.getDir()};</#if><#if layout.getAlign()!="">justify-content: ${layout.getAlign()};</#if><#if layout.getVAlign()!="">align-items: ${layout.getVAlign()};</#if>">
<#if item.getLabelPSSysCss()??>
<div class="${item.getLabelPSSysCss().getCssName()}" style="height: 50px;${item.getLabelPSSysCss().getRawCssStyle()}">${item.getCaption()}</div>
<#else>
<div style="height: 50px;">${item.getCaption()}</div>
</#if>
</#if> -->
<div style="height:100%;display: flex;<#if layout.getDir()!="">flex-direction: ${layout.getDir()};</#if><#if layout.getAlign()!="">justify-content: ${layout.getAlign()};</#if><#if layout.getVAlign()!="">align-items: ${layout.getVAlign()};</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>">
<@ibizindent blank=8> <@ibizindent blank=8>
<#if item.getPSPanelItems()??> <#if item.getPSPanelItems()??>
<#list item.getPSPanelItems() as panelItem> <#list item.getPSPanelItems() as panelItem>
...@@ -24,20 +17,13 @@ ...@@ -24,20 +17,13 @@
</@ibizindent> </@ibizindent>
</div> </div>
</#if> </#if>
</div> </i-col>
<#else> <#else>
<i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if>" class="app-layoutpanel-container<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} class="app-layoutpanel-container<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" style="${flexAttr}width:<#if item.getWidth() gt 0>${item.getWidth()?c}px</#if>;height:<#if item.getHeight() gt 0>${item.getHeight()?c}px<#else>100%</#if>;">
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
<#-- <#if item.isShowCaption()> <row style="height:100%;">
<#if item.getLabelPSSysCss()??>
<div class="${item.getLabelPSSysCss().getCssName()}" style="height: 50px;${item.getLabelPSSysCss().getRawCssStyle()}">${item.getCaption()}</div>
<#else>
<div style="height: 50px;">${item.getCaption()}</div>
</#if>
</#if> -->
<row style="height:100%;<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>">
<@ibizindent blank=8> <@ibizindent blank=8>
<#if item.getPSPanelItems()??> <#if item.getPSPanelItems()??>
<#list item.getPSPanelItems() as panelItem> <#list item.getPSPanelItems() as panelItem>
......
...@@ -6,11 +6,11 @@ ${P.getCtrlCode(item.getPSControl(), 'CONTROL.html').code} ...@@ -6,11 +6,11 @@ ${P.getCtrlCode(item.getPSControl(), 'CONTROL.html').code}
./@MACRO/PLAYOUT.vue.ftl ./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude> </#ibizinclude>
<#if item.getParentLayoutMode()=='FLEX'> <#if item.getParentLayoutMode()=='FLEX'>
<div v-show="detailsModel.${item.name}.visible" style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-ctrlpos<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <div v-show="detailsModel.${item.name}.visible" style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-conctrl<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
${content} ${content}
</div> </div>
<#else> <#else>
<i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-ctrlpos<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} style="<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-conctrl<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
${content} ${content}
</i-col> </i-col>
</#if> </#if>
\ No newline at end of file
...@@ -14,7 +14,7 @@ ${P.getCtrlCode('${item.name}', 'CONTROL.html').code} ...@@ -14,7 +14,7 @@ ${P.getCtrlCode('${item.name}', 'CONTROL.html').code}
${content} ${content}
</div> </div>
<#else> <#else>
<i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} style="${flexAttr}<#if item.getWidth() != -1>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-ctrlpos<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} style="<#if item.getWidth() != -1>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-ctrlpos<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
${content} ${content}
</i-col> </i-col>
</#if> </#if>
\ No newline at end of file
<#if !item.isHidden()> <#if !item.isHidden()>
<#assign selfContent> <#assign selfContent>
<div class="item-field"> <div class="item-field">
<#if item.isShowCaption()><span class="item-field-label <#if item.getLabelPSSysCss()??> ${item.getLabelPSSysCss().getCssName()}</#if>"<#if item.getLabelPSSysCss()??> style="${item.getLabelPSSysCss().getRawCssStyle()}"</#if>>${item.getCaption()}</span></#if> <#if item.render??>
<div class="item-field-content"> ${item.render.code}
<#else>
<app-panel-field
name='${item.name}'
labelPos='<#if item.getLabelPos?? && item.getLabelPos()??>${item.getLabelPos()}<#else>LEFT</#if>'
caption="<#if item.getCaption?? && item.getCaption()??>${item.getCaption()}</#if>"
:isEmptyCaption="<#if item.isEmptyCaption?? && item.isEmptyCaption()??>${item.isEmptyCaption()?c}<#else>false</#if>"
:error='detailsModel.${item.name}.error'
:data='data'
:value='data.${item.name}'
:itemRules="rules.${item.name}">
${P.getEditorCode(item, "PANELEDITOR.vue").code} ${P.getEditorCode(item, "PANELEDITOR.vue").code}
</div> </app-panel-field>
</#if>
</div> </div>
</#assign> </#assign>
......
<#assign detail>caption: '${item.getCaption()}', itemType: '${item.getItemType()}', name: '${item.getName()}', panel: this</#assign> <#assign detail>caption: '${item.getCaption()}', itemType: '${item.getItemType()}',visible: <#if item.getPSPanelItemGroupLogic('PANELVISIBLE')??>false<#else>true</#if>, disabled: false, name: '${item.getName()}', panel: this</#assign>
<#if item.getItemType() == 'CONTAINER'> <#if item.getItemType() == 'CONTAINER'>
new PanelContainerModel({ ${detail} }) new PanelContainerModel({ ${detail} })
<#elseif item.getItemType() == 'RAWITEM'> <#elseif item.getItemType() == 'RAWITEM'>
...@@ -8,7 +8,11 @@ new PanelFieldModel({ ${detail} }) ...@@ -8,7 +8,11 @@ new PanelFieldModel({ ${detail} })
<#elseif item.getItemType() == 'CONTROL'> <#elseif item.getItemType() == 'CONTROL'>
new PanelControlModel({ ${detail} }) new PanelControlModel({ ${detail} })
<#elseif item.getItemType() == 'BUTTON'> <#elseif item.getItemType() == 'BUTTON'>
new PanelButtonModel({ ${detail} }) new PanelButtonModel({ ${detail}<#if item.getPSUIAction()??><#assign uiaction=item.getPSUIAction()>, uiaction: { type: '${uiaction.getUIActionType()}', tag: '${uiaction.getUIActionTag()}'<#if (uiaction.getActionTarget()!="")>,actiontarget: '${uiaction.getActionTarget()}'</#if><#if uiaction.getNoPrivDisplayMode(view)??>,noprivdisplaymode:${uiaction.getNoPrivDisplayMode(view)}</#if><#if uiaction.getDataAccessAction()??>,dataaccaction:'${uiaction.getDataAccessAction()}'</#if>,visabled: true,disabled: false}</#if> })
<#elseif item.getItemType() == 'USERCONTROL'> <#elseif item.getItemType() == 'USERCONTROL'>
new PanelUserControlModel({ ${detail} }) new PanelUserControlModel({ ${detail} })
<#elseif item.getItemType() == 'TABPANEL'>
new PanelTabPanelModel({ ${detail}<#if item.getPSPanelTabPages()??>,tabPages:[<#list item.getPSPanelTabPages() as tabpage>{name:'${tabpage.getName()}'}<#if tabpage_has_next>,</#if></#list>]</#if> })
<#elseif item.getItemType() == 'TABPAGE'>
new PanelTabPageModel({ ${detail} })
</#if> </#if>
\ No newline at end of file
<#assign selfContent> <#assign selfContent>
${item.getHtmlContent()} <#if item.render??>
${item.render.code}
<#else>
<app-panel-item
caption="<#if item.getCaption?? && item.getCaption()??>${item.getCaption()}</#if>"
icon="<#if item.getPSSysImage?? && item.getPSSysImage()??>${item.getPSSysImage().getCssClass()}</#if>"
itemType="RAWITEM"
<#if item.getPSSysCss?? && item.getPSSysCss()??>contentStyle='${item.getPSSysCss().getCssName()}'</#if>>
${item.getHtmlContent()}
</app-panel-item>
</#if>
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
./@MACRO/PLAYOUT.vue.ftl ./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude> </#ibizinclude>
<#if item.getParentLayoutMode()=='FLEX'> <#if item.getParentLayoutMode()=='FLEX'>
<div v-show="detailsModel.${item.name}.visible" style="${flexAttr}<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-rowitem<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <div v-show="detailsModel.${item.name}.visible" style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if>" class="app-layoutpanel-rowitem">
${content} ${content}
</div> </div>
<#else> <#else>
<i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} style="${flexAttr}<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-rowitem<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} style="<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if>" class="app-layoutpanel-rowitem">
${content} ${content}
</i-col> </i-col>
</#if> </#if>
......
<#assign layout = item.getPSLayout()/>
<#ibizinclude>
./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude>
<#if layout.getLayout()=='FLEX'>
<el-tab-pane v-show="detailsModel.${item.name}.visible" label="<#if item.getCaption()??>${item.getCaption()}<#else>分页</#if>" name="${item.getName()}" class="app-layoutpanel-tabpage<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<#if item.render??>
${item.render.code}
<#else>
<div style="display: flex;<#if layout.getDir()!="">flex-direction: ${layout.getDir()};</#if><#if layout.getAlign()!="">justify-content: ${layout.getAlign()};</#if><#if layout.getVAlign()!="">align-items: ${layout.getVAlign()};</#if>width:<#if item.getWidth() gt 0>${item.getWidth()?c}px<#else>100%</#if>;height:<#if item.getHeight() gt 0>${item.getHeight()?c}px<#else>100%</#if>;">
<@ibizindent blank=8>
<#if item.getPSPanelItems()??>
<#list item.getPSPanelItems() as panelItem>
${P.getPartCode(panelItem).code}
</#list>
</#if>
</@ibizindent>
</div>
</#if>
</el-tab-pane>
<#else>
<el-tab-pane v-show="detailsModel.${item.name}.visible" label="<#if item.getCaption()??>${item.getCaption()}<#else>分页</#if>" name="${item.getName()}" class="app-layoutpanel-tabpage<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<#if item.render??>
${item.render.code}
<#else>
<row style="width:<#if item.getWidth() gt 0>${item.getWidth()?c}px<#else>100%</#if>;height:<#if item.getHeight() gt 0>${item.getHeight()?c}px<#else>100%</#if>;">
<@ibizindent blank=8>
<#if item.getPSPanelItems()??>
<#list item.getPSPanelItems() as panelItem>
${P.getPartCode(panelItem).code}
</#list>
</#if>
</@ibizindent>
</row>
</#if>
</el-tab-pane>
</#if>
\ No newline at end of file
<#ibizinclude> <#ibizinclude>
./@MACRO/PLAYOUT.vue.ftl ./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude> </#ibizinclude>
<div v-show="detailsModel.${item.name}.visible" class="app-layoutpanel-tabpanel<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" ${tableAttr} style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if>"> <i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} class="app-layoutpanel-tabpanel<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" style="${flexAttr}width:<#if item.getWidth() gt 0>${item.getWidth()?c}px<#else>100%</#if>;height:<#if item.getHeight() gt 0>${item.getHeight()?c}px<#else>100%</#if>;">
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
<@ibizindent blank=8> <@ibizindent blank=8>
获取面板分页面板代码 <el-tabs<#compress>v-model="detailsModel.${item.name}.activiedPage"</#compress><#compress>@tab-click="handleTabPanelClick('${item.name}',$event)"</#compress>>
<#if item.getPSPanelTabPages?? && item.getPSPanelTabPages()??>
<#list item.getPSPanelTabPages() as tabPage>
${P.getPartCode(tabPage).code}
</#list>
</#if>
</el-tabs>
</@ibizindent> </@ibizindent>
</#if> </#if>
</div> </i-col>
\ No newline at end of file \ No newline at end of file
<#assign selfContent>
<#if item.render??>
${item.render.code}
<#else>
面板自定义插件没有定义插件
</#if>
</#assign>
<#ibizinclude> <#ibizinclude>
./@MACRO/PLAYOUT.vue.ftl ./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude> </#ibizinclude>
<#if item.getParentLayoutMode()=='FLEX'> <#if item.getParentLayoutMode()=='FLEX'>
<div v-show="detailsModel.${item.name}.visible" style="${flexAttr}<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-usercontrol<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <div v-show="detailsModel.${item.name}.visible" style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-usercontrol<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
${content} ${content}
</div> </div>
<#else> <#else>
<i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} style="${flexAttr}<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-usercontrol<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-usercontrol<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
${content} ${content}
</i-col> </i-col>
</#if> </#if>
\ No newline at end of file
<#if ctrl.render??> <#if ctrl.render??>
${ctrl.render.code} ${ctrl.render.code}
<#else> <#else>
<div class='panel-container<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>' style="<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()?c}px;</#if><#if ctrl.getHeight() gt 0>height: ${ctrl.getHeight()?c}px;</#if>">
<#if ctrl.getLayoutMode()=='FLEX'> <#if ctrl.getLayoutMode()=='FLEX'>
<div class="app-layoutpanel" style="height:100%;display: flex;"> <row class="app-layoutpanel <#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>" style="width:<#if ctrl.getWidth() gt 0>${ctrl.getWidth()?c}px<#else>100%</#if>;height:<#if ctrl.getHeight() gt 0>${ctrl.getHeight()?c}px;<#else>100%;</#if>display: flex;">
<@ibizindent blank=8> <@ibizindent blank=8>
<#if ctrl.getRootPSPanelItems()??> <#if ctrl.getRootPSPanelItems()??>
<#list ctrl.getRootPSPanelItems() as item> <#list ctrl.getRootPSPanelItems() as item>
...@@ -11,9 +10,9 @@ ${P.getPartCode(item).code} ...@@ -11,9 +10,9 @@ ${P.getPartCode(item).code}
</#list> </#list>
</#if> </#if>
</@ibizindent> </@ibizindent>
</div> </row>
<#else> <#else>
<row class="app-layoutpanel" style="height:100%;"> <row class="app-layoutpanel <#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>" style="width:<#if ctrl.getWidth() gt 0>${ctrl.getWidth()?c}px<#else>100%</#if>;height:<#if ctrl.getHeight() gt 0>${ctrl.getHeight()?c}px<#else>100%</#if>;">
<@ibizindent blank=8> <@ibizindent blank=8>
<#if ctrl.getRootPSPanelItems()??> <#if ctrl.getRootPSPanelItems()??>
<#list ctrl.getRootPSPanelItems() as item> <#list ctrl.getRootPSPanelItems() as item>
...@@ -23,5 +22,4 @@ ${P.getPartCode(item).code} ...@@ -23,5 +22,4 @@ ${P.getPartCode(item).code}
</@ibizindent> </@ibizindent>
</row> </row>
</#if> </#if>
</div>
</#if> </#if>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
${P.getPartCode(item,'PANEL').code} ${P.getPartCode(item,'PANEL').code}
</template> </template>
<#assign import_block> <#assign import_block>
import { FormItemModel } from '@/model/form-detail'; import { PanelDetailModel,PanelRawitemModel,PanelTabPanelModel,PanelTabPageModel,PanelFieldModel,PanelContainerModel,PanelControlModel,PanelUserControlModel,PanelButtonModel } from '@/model/panel-detail';
import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-model'; import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-model';
import CodeListService from "@service/app/codelist-service"; import CodeListService from "@service/app/codelist-service";
</#assign> </#assign>
...@@ -30,7 +30,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -30,7 +30,7 @@ import CodeListService from "@service/app/codelist-service";
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
getData() { getData() {
return this.data; return this.panelData;
} }
/** /**
...@@ -50,61 +50,77 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -50,61 +50,77 @@ import CodeListService from "@service/app/codelist-service";
@Prop() public inputData?: any; @Prop() public inputData?: any;
/** /**
* 代码表服务对象 * UI数据对象
* *
* @type {CodeListService} * @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public codeListService:CodeListService = new CodeListService({ $store:this.$store }); public data:any = {};
/** /**
* 详情模型集合 * 面板数据对象
* *
* @type {*} * @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public detailsModel: any = { public panelData:any = null;
<#list ctrl.getAllPSPanelItems() as panelItems>
${panelItems.name}: new FormItemModel({ visible: <#if panelItems.getPSPanelItemGroupLogic('PANELVISIBLE')??>false<#else>true</#if>, disabled: false, enableCond: 3 }),
</#list>
};
/** /**
* 面板逻辑 * 数据模型对象
* *
* @public * @type {${srfclassname('${ctrl.codeName}')}Model}
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public panelLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void { public dataModel:${srfclassname('${ctrl.codeName}')}Model = new ${srfclassname('${ctrl.codeName}')}Model();
<#if P.getPartCode(item,'PANEL_LOGIC').code?length gt 0>
${P.getPartCode(item,'PANEL_LOGIC').code}
</#if>
}
/** /**
* 数据模型对象 * 代码表服务对象
* *
* @type {${srfclassname('${ctrl.codeName}')}Model} * @type {CodeListService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public dataModel:${srfclassname('${ctrl.codeName}')}Model = new ${srfclassname('${ctrl.codeName}')}Model(); public codeListService:CodeListService = new CodeListService({ $store:this.$store });
<#if appde??>
/** /**
* UI数据对象 * 界面UI服务对象
*
* @type {${srfclassname('${appde.getCodeName()}')}UIService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService(this.$store);
</#if>
/**
* 详情模型集合
* *
* @type {*} * @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public data:any = {}; public detailsModel: any = {
<#list ctrl.getAllPSPanelItems() as panelItem>
${panelItem.name}: ${P.getPartCode(panelItem, 'ITEM_MODEL').code},
</#list>
};
/** /**
* 面板数据对象 * 值规则对象
* *
* @type {*} * @type {*}
* @memberof Mob * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public panelData:any = null; public rules:any={
<#if ctrl.getAllPSPanelItems()??>
<#list ctrl.getAllPSPanelItems() as panelItem>
<#if panelItem.getItemType() == "FIELD">
${panelItem.getName()}:[
{ required: <#if panelItem.isAllowEmpty()>false<#else>true</#if>, type: 'string', message: '${panelItem.getCaption()} 值不能为空'},
{ required: <#if panelItem.isAllowEmpty()>false<#else>true</#if>, type: 'string', message: '${panelItem.getCaption()} 值不能为空'}
],
</#if>
</#list>
</#if>
};
/** /**
* 监听数据对象 * 监听数据对象
...@@ -115,6 +131,8 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -115,6 +131,8 @@ import CodeListService from "@service/app/codelist-service";
public onInputDataChange(newVal: any, oldVal: any){ public onInputDataChange(newVal: any, oldVal: any){
if(newVal){ if(newVal){
this.computedUIData(newVal); this.computedUIData(newVal);
this.panelData = Util.deepCopy(newVal);
this.computeButtonState(newVal);
this.panelLogic({ name: '', newVal: null, oldVal: null }); this.panelLogic({ name: '', newVal: null, oldVal: null });
this.$forceUpdate(); this.$forceUpdate();
} }
...@@ -135,18 +153,28 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -135,18 +153,28 @@ import CodeListService from "@service/app/codelist-service";
} }
/** /**
* 计算面板数据 * 计算面板按钮权限状态
* *
* @memberof Mob * @param {*} [data] 传入数据
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public computeOutputData(){ public computeButtonState(data:any){
let panelData:any = {}; // 若为项布局面板,存在parentRef
if((this.dataModel.getDataItems instanceof Function) && this.dataModel.getDataItems().length >0){ if(this.parentRef){
this.dataModel.getDataItems().forEach((item:any) =>{ let targetData:any = this.parentRef.transformData(data);
panelData[item.prop] = this.data[item.name]; if(this.detailsModel && Object.keys(this.detailsModel).length >0){
}) Object.keys(this.detailsModel).forEach((name:any) =>{
if(this.detailsModel[name] && this.detailsModel[name].uiaction && this.detailsModel[name].uiaction.dataaccaction && Object.is(this.detailsModel[name].itemType,"BUTTON")){
this.detailsModel[name].isPower = true;
let tempUIAction:any = JSON.parse(JSON.stringify(this.detailsModel[name].uiaction));
let result: any[] = ViewTool.calcActionItemAuthState(targetData,[tempUIAction],this.appUIService?this.appUIService:null);
this.detailsModel[name].visible = tempUIAction.visabled;
this.detailsModel[name].disabled = tempUIAction.disabled;
this.detailsModel[name].isPower = result[0] === 1 ? true : false;
}
})
}
} }
this.panelData = Object.assign(JSON.parse(JSON.stringify(this.inputData)),panelData);
} }
/** /**
...@@ -157,8 +185,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -157,8 +185,7 @@ import CodeListService from "@service/app/codelist-service";
* @param {*} $event * @param {*} $event
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public async uiAction(row: any, tag: any, $event: any) { public uiAction(row: any, tag: any, $event: any) {
await this.computeOutputData();
<#if ctrl.getPSAppViewLogics()??> <#if ctrl.getPSAppViewLogics()??>
<#list ctrl.getPSAppViewLogics() as logic> <#list ctrl.getPSAppViewLogics() as logic>
<#if logic.getPSAppViewUIAction().getPSUIAction()??> <#if logic.getPSAppViewUIAction().getPSUIAction()??>
...@@ -212,7 +239,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -212,7 +239,7 @@ import CodeListService from "@service/app/codelist-service";
* 刷新 * 刷新
* *
* @param {*} [opt={}] * @param {*} [opt={}]
* @memberof Main * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public refresh(opt: any = {}) { public refresh(opt: any = {}) {
if (this.parentRef.refresh && this.parentRef.refresh instanceof Function) { if (this.parentRef.refresh && this.parentRef.refresh instanceof Function) {
...@@ -220,7 +247,6 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -220,7 +247,6 @@ import CodeListService from "@service/app/codelist-service";
} }
} }
/** /**
* 设置变更面板编辑项的值 * 设置变更面板编辑项的值
* *
...@@ -263,6 +289,28 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -263,6 +289,28 @@ import CodeListService from "@service/app/codelist-service";
} }
/**
* 分页切换事件
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public handleTabPanelClick(name:string,$event:any){
this.detailsModel[name].clickPage($event.name);
}
/**
* 面板逻辑
*
* @public
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public panelLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
<#if P.getPartCode(item,'PANEL_LOGIC').code?length gt 0>
${P.getPartCode(item,'PANEL_LOGIC').code}
</#if>
}
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
......
<#ibizinclude> <#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl ../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude> </#ibizinclude>
.app-layoutpanel { .app-layoutpanel {
height: 100%; height: 100%;
> .app-layoutpanel-container { .app-layoutpanel-container {
height: 100%; padding: 6px;
}
.app-layoutpanel-tabpanel{
>.el-tabs {
>.el-.el-tabs__header{
margin: 0 0 10px;
}
.app-layoutpanel-tabpage{
padding: 6px;
}
}
}
.app-layoutpanel-button,.app-layoutpanel-conctrl,.app-layoutpanel-ctrlpos,.app-layoutpanel-field,.app-layoutpanel-rowitem,.app-layoutpanel-usercontrol{
padding: 6px;
} }
.item-field{ .item-field{
padding: 0 4px; padding: 0 4px;
......
...@@ -2,12 +2,10 @@ ...@@ -2,12 +2,10 @@
${item.render.code} ${item.render.code}
<#else> <#else>
<input-box <input-box
<#if item.getEnableCond??>
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
v-model="data.${editor.getName()?lower_case}" v-model="data.${editor.getName()?lower_case}"
style="${item.getEditorCssStyle()}" style="${item.getEditorCssStyle()}"
type="text" type="text"
:disabled="detailsModel.${item.getCodeName()}.disabled"
<#if item.getUnitName?? && item.getUnitName()??>unit="${item.getUnitName()}"</#if> <#if item.getUnitName?? && item.getUnitName()??>unit="${item.getUnitName()}"</#if>
<#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if>
@change="($event)=>{panelEditItemChange(data, '${editor.getName()?lower_case}', $event)}"> @change="($event)=>{panelEditItemChange(data, '${editor.getName()?lower_case}', $event)}">
......
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
<app-rich-text-editor :formState="formState" :value="data.${editor.name}" @change="(val) =>{this.data.${editor.name} =val;panelEditItemChange(data, '${editor.name?lower_case}', 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> <app-rich-text-editor :formState="formState" :value="data.${editor.name}" @change="(val) =>{this.data.${editor.name} =val;panelEditItemChange(data, '${editor.name?lower_case}', val)}" :disabled="detailsModel.${item.getCodeName()}.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>
</#if> </#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<dropdown-list <dropdown-list
v-model="data.${editor.name?lower_case}" v-model="data.${editor.name?lower_case}"
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:data="data" :data="data"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
......
...@@ -4,9 +4,7 @@ ...@@ -4,9 +4,7 @@
<#else> <#else>
<dropdown-list <dropdown-list
v-model="data.${editor.name?lower_case}" v-model="data.${editor.name?lower_case}"
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:data="data" :data="data"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
......
...@@ -4,9 +4,7 @@ ...@@ -4,9 +4,7 @@
<#else> <#else>
<dropdown-list <dropdown-list
v-model="data.${editor.name?lower_case}" v-model="data.${editor.name?lower_case}"
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:data="data" :data="data"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
......
...@@ -9,9 +9,7 @@ ...@@ -9,9 +9,7 @@
:viewparams="viewparams" :viewparams="viewparams"
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
<#if item.getPSCodeList()??> <#if item.getPSCodeList()??>
<#assign codelist=editor.getPSCodeList()> <#assign codelist=editor.getPSCodeList()>
tag='${codelist.codeName}' tag='${codelist.codeName}'
......
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<app-department-personnel
name="${editor.name}"
:value='data.${editor.name}'
valueitem="${editor.getValueItemName()}"
url="<#if editor.getEditorParam("url", "") != "">${editor.getEditorParam("url", "")}</#if>"
<#if editor.getEditorParam("treeurl", "") != "">treeurl="${editor.getEditorParam("treeurl", "")}"</#if>
:multiple="<#if editor.getEditorParam("multiple", "") != "">${editor.getEditorParam("multiple", "")}<#else>false</#if>"
filter="<#if editor.getEditorParam("filter", "") != "">${editor.getEditorParam("filter", "")}<#else>srfpdept</#if>"
:fillmap=<#if editor.getEditorParam("fillMap", "") != "">"${editor.getEditorParam("fillMap", "")}"<#else>"{'id':'${editor.getValueItemName()}','label':'${editor.name}'}"</#if>
:disabled="detailsModel.${editor.name}.disabled"
:data="data"
:context="context"
<#if editor.getPSEditorContainer().getPSCodeList()??><#assign codelist=editor.getPSEditorContainer().getPSCodeList() /> tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if>
@formitemvaluechange="onFormItemValueChange">
</app-department-personnel>
EDITORTYPE=PICKER#DEPTPERSONSELECT
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<app-department-personnel
name="${editor.name}"
:value='data.${editor.name}'
valueitem="${editor.getValueItemName()}"
url="<#if editor.getEditorParam("url", "") != "">${editor.getEditorParam("url", "")}</#if>"
<#if editor.getEditorParam("treeurl", "") != "">treeurl="${editor.getEditorParam("treeurl", "")}"</#if>
:multiple="<#if editor.getEditorParam("multiple", "") != "">${editor.getEditorParam("multiple", "")}<#else>true</#if>"
filter="<#if editor.getEditorParam("filter", "") != "">${editor.getEditorParam("filter", "")}<#else>srfpdept</#if>"
:fillmap=<#if editor.getEditorParam("fillMap", "") != "">"${editor.getEditorParam("fillMap", "")}"<#else>"{'id':'${editor.getValueItemName()}','label':'${editor.name}'}"</#if>
:disabled="detailsModel.${editor.name}.disabled"
:data="data"
:context="context"
<#if editor.getPSEditorContainer().getPSCodeList()??><#assign codelist=editor.getPSEditorContainer().getPSCodeList() /> tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if>
@formitemvaluechange="onFormItemValueChange">
</app-department-personnel>
EDITORTYPE=PICKER#DEPTPERSONMULTIPLE
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<app-department-personnel
name="${editor.name}"
:value='data.${editor.name}'
valueitem="${editor.getValueItemName()}"
url="<#if editor.getEditorParam("url", "") != "">${editor.getEditorParam("url", "")}</#if>"
<#if editor.getEditorParam("treeurl", "") != "">treeurl="${editor.getEditorParam("treeurl", "")}"</#if>
:multiple="<#if editor.getEditorParam("multiple", "") != "">${editor.getEditorParam("multiple", "")}<#else>false</#if>"
filter="<#if editor.getEditorParam("filter", "") != "">${editor.getEditorParam("filter", "")}<#else>srfpdept</#if>"
:fillmap=<#if editor.getEditorParam("fillMap", "") != "">"${editor.getEditorParam("fillMap", "")}"<#else>"{'id':'${editor.getValueItemName()}','label':'${editor.name}'}"</#if>
:disabled="detailsModel.${editor.name}.disabled"
:data="data"
:context="context"
<#if editor.getPSEditorContainer().getPSCodeList()??><#assign codelist=editor.getPSEditorContainer().getPSCodeList() /> tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if>
@formitemvaluechange="onFormItemValueChange">
</app-department-personnel>
EDITORTYPE=PICKER#ALLDEPTPERSONSELECT
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<app-department-personnel
name="${editor.name}"
:value='data.${editor.name}'
valueitem="${editor.getValueItemName()}"
url="<#if editor.getEditorParam("url", "") != "">${editor.getEditorParam("url", "")}</#if>"
<#if editor.getEditorParam("treeurl", "") != "">treeurl="${editor.getEditorParam("treeurl", "")}"</#if>
:multiple="<#if editor.getEditorParam("multiple", "") != "">${editor.getEditorParam("multiple", "")}<#else>true</#if>"
filter="<#if editor.getEditorParam("filter", "") != "">${editor.getEditorParam("filter", "")}<#else>srfpdept</#if>"
:fillmap=<#if editor.getEditorParam("fillMap", "") != "">"${editor.getEditorParam("fillMap", "")}"<#else>"{'id':'${editor.getValueItemName()}','label':'${editor.name}'}"</#if>
:disabled="detailsModel.${editor.name}.disabled"
:data="data"
:context="context"
<#if editor.getPSEditorContainer().getPSCodeList()??><#assign codelist=editor.getPSEditorContainer().getPSCodeList() /> tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if>
@formitemvaluechange="onFormItemValueChange">
</app-department-personnel>
EDITORTYPE=PICKER#ALLDEPTPERSONMULTIPLE
\ No newline at end of file
...@@ -4,9 +4,7 @@ ...@@ -4,9 +4,7 @@
<#else> <#else>
<app-radio-group <app-radio-group
v-model="data.${editor.name?lower_case}" v-model="data.${editor.name?lower_case}"
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
name="${editor.name?lower_case}" name="${editor.name?lower_case}"
:data="data" :data="data"
:context="context" :context="context"
......
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
:data="JSON.stringify(data)" :data="JSON.stringify(data)"
name='${editor.name?lower_case}' name='${editor.name?lower_case}'
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:rowPreview="true" :rowPreview="true"
:imageOnly="true" :imageOnly="true"
:uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>' :uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>'
......
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
:data="JSON.stringify(data)" :data="JSON.stringify(data)"
name='${editor.name?lower_case}' name='${editor.name?lower_case}'
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:rowPreview="true" :rowPreview="true"
:imageOnly="true" :imageOnly="true"
:uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>' :exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>' :uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>' :exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>'
......
<disk-image-upload
:data="data"
formItemName="${item.name}"
:value="data.${item.name}"
:formState="formState"
folder=<#if item.getEditorParam("folder",'') != ''>"'${item.getEditorParam("folder",'')}'"<#else>"${ctrl.getPSDataEntity().getCodeName()?lower_case}"</#if>
ownertype=<#if item.getEditorParam("ownerType",'') != ''>"'${item.getEditorParam("ownerType",'')}'"<#else>"${item.name}"</#if>
:ownerid=<#if item.getEditorParam("ownerid",'') != ''>"'${item.getEditorParam("ownerid",'')}'"<#else>"data.srfkey"</#if>
:show-ocrview=<#if item.getEditorParam("showOcrview",'') != ''>"${item.getEditorParam("showOcrview",'')}"<#else>"false"</#if>
:show-preview=<#if item.getEditorParam("showPreview",'') != ''>"${item.getEditorParam("showPreview",'')}"<#else>"false"</#if>
:persistence=<#if item.getEditorParam("persistence",'') != ''>"${item.getEditorParam("persistence",'')}"<#else>"false"</#if>
@formitemvaluechange="onFormItemValueChange">
</disk-image-upload>
\ No newline at end of file
// 表格行编辑暂不支持
\ No newline at end of file
// 面板暂不支持
\ No newline at end of file
EDITORTYPE=PICTURE#DISKPIC
\ No newline at end of file
...@@ -4,9 +4,7 @@ ...@@ -4,9 +4,7 @@
<div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type"> <div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type">
<textarea <textarea
class="ivu-input" class="ivu-input"
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
v-model="data.${editor.name?lower_case}" v-model="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}" style="${item.getEditorCssStyle()}"
<#if item.getPlaceHolder?? && item.getPlaceHolder()??> <#if item.getPlaceHolder?? && item.getPlaceHolder()??>
......
...@@ -4,9 +4,7 @@ ...@@ -4,9 +4,7 @@
<div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type"> <div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type">
<textarea <textarea
class="ivu-input" class="ivu-input"
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
rows="10" rows="10"
v-model="data.${editor.name?lower_case}" v-model="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}" style="${item.getEditorCssStyle()}"
......
...@@ -3,9 +3,7 @@ ...@@ -3,9 +3,7 @@
<#else> <#else>
<input-box <input-box
type="password" type="password"
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
v-model="data.${editor.name?lower_case}" v-model="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}" style="${item.getEditorCssStyle()}"
@change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}"> @change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}">
......
...@@ -5,9 +5,7 @@ ...@@ -5,9 +5,7 @@
name='${editor.name?lower_case}' name='${editor.name?lower_case}'
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
@change="($event)=>{data.${editor.name?lower_case} = $event;panelEditItemChange(data, '${editor.name?lower_case}', $event)} " @change="($event)=>{data.${editor.name?lower_case} = $event;panelEditItemChange(data, '${editor.name?lower_case}', $event)} "
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
style="${item.getEditorCssStyle()}"> style="${item.getEditorCssStyle()}">
</app-switch> </app-switch>
</#if> </#if>
\ No newline at end of file
...@@ -3,9 +3,7 @@ ...@@ -3,9 +3,7 @@
<#else> <#else>
<input-box <input-box
type="number" type="number"
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
<#if item.getUnitName?? && item.getUnitName()??>unit="${item.getUnitName()}"</#if> <#if item.getUnitName?? && item.getUnitName()??>unit="${item.getUnitName()}"</#if>
:precision="2" :precision="2"
v-model="data.${editor.name?lower_case}" v-model="data.${editor.name?lower_case}"
......
...@@ -13,10 +13,18 @@ ...@@ -13,10 +13,18 @@
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
name='${editor.name}' name='${editor.name}'
<#-- 自填模式文本属性、值属性start -->
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#assign appDeAcMode = editor.getPSAppDEACMode() />
deMajorField='${appDeAcMode.getTextPSAppDEField().getCodeName()?lower_case}'
deKeyField='<#if appDeAcMode.getValuePSAppDEField().getCodeName() == editor.getPSAppDataEntity().getKeyPSAppDEField().getCodeName()>${editor.getPSAppDataEntity().getCodeName()?lower_case}<#else>${appDeAcMode.getValuePSAppDEField().getCodeName()?lower_case}</#if>'
<#else>
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}' deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if> </#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
:service="service" :service="service"
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??> <#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#if editor.getPSAppDEACMode().getMinorSortPSDEF?? && editor.getPSAppDEACMode().getMinorSortPSDEF()?? && editor.getPSAppDEACMode().getMinorSortDir?? && editor.getPSAppDEACMode().getMinorSortDir()??> <#if editor.getPSAppDEACMode().getMinorSortPSDEF?? && editor.getPSAppDEACMode().getMinorSortPSDEF()?? && editor.getPSAppDEACMode().getMinorSortDir?? && editor.getPSAppDEACMode().getMinorSortDir()??>
......
...@@ -13,10 +13,18 @@ ...@@ -13,10 +13,18 @@
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
name='${editor.name}' name='${editor.name}'
<#-- 自填模式文本属性、值属性start -->
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#assign appDeAcMode = editor.getPSAppDEACMode() />
deMajorField='${appDeAcMode.getTextPSAppDEField().getCodeName()?lower_case}'
deKeyField='<#if appDeAcMode.getValuePSAppDEField().getCodeName() == editor.getPSAppDataEntity().getKeyPSAppDEField().getCodeName()>${editor.getPSAppDataEntity().getCodeName()?lower_case}<#else>${appDeAcMode.getValuePSAppDEField().getCodeName()?lower_case}</#if>'
<#else>
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}' deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if> </#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
:service="service" :service="service"
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??> <#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#if editor.getPSAppDEACMode().getMinorSortPSDEF?? && editor.getPSAppDEACMode().getMinorSortPSDEF()?? && editor.getPSAppDEACMode().getMinorSortDir?? && editor.getPSAppDEACMode().getMinorSortDir()??> <#if editor.getPSAppDEACMode().getMinorSortPSDEF?? && editor.getPSAppDEACMode().getMinorSortPSDEF()?? && editor.getPSAppDEACMode().getMinorSortDir?? && editor.getPSAppDEACMode().getMinorSortDir()??>
......
...@@ -11,12 +11,20 @@ ...@@ -11,12 +11,20 @@
:viewparams="viewparams" :viewparams="viewparams"
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="detailsModel.${item.getCodeName()}.disabled"
name='${editor.name}' name='${editor.name}'
<#-- 自填模式文本属性、值属性start -->
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#assign appDeAcMode = editor.getPSAppDEACMode() />
deMajorField='${appDeAcMode.getTextPSAppDEField().getCodeName()?lower_case}'
deKeyField='<#if appDeAcMode.getValuePSAppDEField().getCodeName() == editor.getPSAppDataEntity().getKeyPSAppDEField().getCodeName()>${editor.getPSAppDataEntity().getCodeName()?lower_case}<#else>${appDeAcMode.getValuePSAppDEField().getCodeName()?lower_case}</#if>'
<#else>
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}' deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if> </#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
:service="service" :service="service"
:acParams=<@getAcParams editor /> :acParams=<@getAcParams editor />
valueitem='${editor.getValueItemName()}' valueitem='${editor.getValueItemName()}'
......
...@@ -36,10 +36,18 @@ ...@@ -36,10 +36,18 @@
</#if> </#if>
<#-- 自填模式界面行为组end --> <#-- 自填模式界面行为组end -->
</#if> </#if>
<#-- 自填模式文本属性、值属性start -->
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#assign appDeAcMode = editor.getPSAppDEACMode() />
deMajorField='${appDeAcMode.getTextPSAppDEField().getCodeName()?lower_case}'
deKeyField='<#if appDeAcMode.getValuePSAppDEField().getCodeName() == editor.getPSAppDataEntity().getKeyPSAppDEField().getCodeName()>${editor.getPSAppDataEntity().getCodeName()?lower_case}<#else>${appDeAcMode.getValuePSAppDEField().getCodeName()?lower_case}</#if>'
<#else>
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}' deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if> </#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
:service="service" :service="service"
:acParams=<@getAcParams editor /> :acParams=<@getAcParams editor />
valueitem='${editor.getValueItemName()}' valueitem='${editor.getValueItemName()}'
......
...@@ -34,10 +34,18 @@ ...@@ -34,10 +34,18 @@
</#if> </#if>
<#-- 自填模式界面行为组end --> <#-- 自填模式界面行为组end -->
</#if> </#if>
<#-- 自填模式文本属性、值属性start -->
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#assign appDeAcMode = editor.getPSAppDEACMode() />
deMajorField='${appDeAcMode.getTextPSAppDEField().getCodeName()?lower_case}'
deKeyField='<#if appDeAcMode.getValuePSAppDEField().getCodeName() == editor.getPSAppDataEntity().getKeyPSAppDEField().getCodeName()>${editor.getPSAppDataEntity().getCodeName()?lower_case}<#else>${appDeAcMode.getValuePSAppDEField().getCodeName()?lower_case}</#if>'
<#else>
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}' deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if> </#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
:service="service" :service="service"
:acParams=<@getAcParams editor /> :acParams=<@getAcParams editor />
valueitem='${item.getValueItemName()}' valueitem='${item.getValueItemName()}'
......
...@@ -11,10 +11,18 @@ ...@@ -11,10 +11,18 @@
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
name='${editor.name}' name='${editor.name}'
<#-- 自填模式文本属性、值属性start -->
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#assign appDeAcMode = editor.getPSAppDEACMode() />
deMajorField='${appDeAcMode.getTextPSAppDEField().getCodeName()?lower_case}'
deKeyField='<#if appDeAcMode.getValuePSAppDEField().getCodeName() == editor.getPSAppDataEntity().getKeyPSAppDEField().getCodeName()>${editor.getPSAppDataEntity().getCodeName()?lower_case}<#else>${appDeAcMode.getValuePSAppDEField().getCodeName()?lower_case}</#if>'
<#else>
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}' deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if> </#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
:service="service" :service="service"
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??> <#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#if editor.getPSAppDEACMode().getMinorSortPSDEF?? && editor.getPSAppDEACMode().getMinorSortPSDEF()?? && editor.getPSAppDEACMode().getMinorSortDir?? && editor.getPSAppDEACMode().getMinorSortDir()??> <#if editor.getPSAppDEACMode().getMinorSortPSDEF?? && editor.getPSAppDEACMode().getMinorSortPSDEF()?? && editor.getPSAppDEACMode().getMinorSortDir?? && editor.getPSAppDEACMode().getMinorSortDir()??>
......
...@@ -36,10 +36,18 @@ ...@@ -36,10 +36,18 @@
</#if> </#if>
<#-- 自填模式界面行为组end --> <#-- 自填模式界面行为组end -->
</#if> </#if>
<#-- 自填模式文本属性、值属性start -->
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#assign appDeAcMode = editor.getPSAppDEACMode() />
deMajorField='${appDeAcMode.getTextPSAppDEField().getCodeName()?lower_case}'
deKeyField='<#if appDeAcMode.getValuePSAppDEField().getCodeName() == editor.getPSAppDataEntity().getKeyPSAppDEField().getCodeName()>${editor.getPSAppDataEntity().getCodeName()?lower_case}<#else>${appDeAcMode.getValuePSAppDEField().getCodeName()?lower_case}</#if>'
<#else>
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}' deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if> </#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
:service="service" :service="service"
:acParams=<@getAcParams editor /> :acParams=<@getAcParams editor />
valueitem='${editor.getValueItemName()}' valueitem='${editor.getValueItemName()}'
......
...@@ -13,10 +13,18 @@ ...@@ -13,10 +13,18 @@
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
name='${editor.name}' name='${editor.name}'
<#-- 自填模式文本属性、值属性start -->
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#assign appDeAcMode = editor.getPSAppDEACMode() />
deMajorField='${appDeAcMode.getTextPSAppDEField().getCodeName()?lower_case}'
deKeyField='<#if appDeAcMode.getValuePSAppDEField().getCodeName() == editor.getPSAppDataEntity().getKeyPSAppDEField().getCodeName()>${editor.getPSAppDataEntity().getCodeName()?lower_case}<#else>${appDeAcMode.getValuePSAppDEField().getCodeName()?lower_case}</#if>'
<#else>
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}' deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if> </#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
:service="service" :service="service"
:acParams=<@getAcParams editor /> :acParams=<@getAcParams editor />
valueitem='${editor.getValueItemName()}' valueitem='${editor.getValueItemName()}'
......
...@@ -13,10 +13,18 @@ ...@@ -13,10 +13,18 @@
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
name='${editor.name}' name='${editor.name}'
<#-- 自填模式文本属性、值属性start -->
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#assign appDeAcMode = editor.getPSAppDEACMode() />
deMajorField='${appDeAcMode.getTextPSAppDEField().getCodeName()?lower_case}'
deKeyField='<#if appDeAcMode.getValuePSAppDEField().getCodeName() == editor.getPSAppDataEntity().getKeyPSAppDEField().getCodeName()>${editor.getPSAppDataEntity().getCodeName()?lower_case}<#else>${appDeAcMode.getValuePSAppDEField().getCodeName()?lower_case}</#if>'
<#else>
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}' deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if> </#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
valueitem='${editor.getValueItemName()}' valueitem='${editor.getValueItemName()}'
:value="data.${editor.name}" :value="data.${editor.name}"
editortype="pickup-no-ac" editortype="pickup-no-ac"
......
...@@ -13,10 +13,18 @@ ...@@ -13,10 +13,18 @@
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
name='${editor.name}' name='${editor.name}'
<#-- 自填模式文本属性、值属性start -->
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#assign appDeAcMode = editor.getPSAppDEACMode() />
deMajorField='${appDeAcMode.getTextPSAppDEField().getCodeName()?lower_case}'
deKeyField='<#if appDeAcMode.getValuePSAppDEField().getCodeName() == editor.getPSAppDataEntity().getKeyPSAppDEField().getCodeName()>${editor.getPSAppDataEntity().getCodeName()?lower_case}<#else>${appDeAcMode.getValuePSAppDEField().getCodeName()?lower_case}</#if>'
<#else>
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}' deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if> </#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
valueitem='${editor.getValueItemName()}' valueitem='${editor.getValueItemName()}'
:value="row[column.property]" :value="row[column.property]"
editortype="pickup-no-ac" editortype="pickup-no-ac"
......
...@@ -13,10 +13,18 @@ ...@@ -13,10 +13,18 @@
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
name='${editor.name}' name='${editor.name}'
<#-- 自填模式文本属性、值属性start -->
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#assign appDeAcMode = editor.getPSAppDEACMode() />
deMajorField='${appDeAcMode.getTextPSAppDEField().getCodeName()?lower_case}'
deKeyField='<#if appDeAcMode.getValuePSAppDEField().getCodeName() == editor.getPSAppDataEntity().getKeyPSAppDEField().getCodeName()>${editor.getPSAppDataEntity().getCodeName()?lower_case}<#else>${appDeAcMode.getValuePSAppDEField().getCodeName()?lower_case}</#if>'
<#else>
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}' deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if> </#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
valueitem='${editor.getValueItemName()}' valueitem='${editor.getValueItemName()}'
:value="data.${editor.name}" :value="data.${editor.name}"
editortype="pickup-no-ac" editortype="pickup-no-ac"
......
...@@ -13,10 +13,18 @@ ...@@ -13,10 +13,18 @@
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
name='${editor.name}' name='${editor.name}'
<#-- 自填模式文本属性、值属性start -->
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#assign appDeAcMode = editor.getPSAppDEACMode() />
deMajorField='${appDeAcMode.getTextPSAppDEField().getCodeName()?lower_case}'
deKeyField='<#if appDeAcMode.getValuePSAppDEField().getCodeName() == editor.getPSAppDataEntity().getKeyPSAppDEField().getCodeName()>${editor.getPSAppDataEntity().getCodeName()?lower_case}<#else>${appDeAcMode.getValuePSAppDEField().getCodeName()?lower_case}</#if>'
<#else>
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}' deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if> </#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
valueitem='${editor.getValueItemName()}' valueitem='${editor.getValueItemName()}'
:value="row[column.property]" :value="row[column.property]"
editortype="pickup-no-ac" editortype="pickup-no-ac"
......
...@@ -14,10 +14,18 @@ ...@@ -14,10 +14,18 @@
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
:showButton="false" :showButton="false"
name='${editor.name}' name='${editor.name}'
<#-- 自填模式文本属性、值属性start -->
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#assign appDeAcMode = editor.getPSAppDEACMode() />
deMajorField='${appDeAcMode.getTextPSAppDEField().getCodeName()?lower_case}'
deKeyField='<#if appDeAcMode.getValuePSAppDEField().getCodeName() == editor.getPSAppDataEntity().getKeyPSAppDEField().getCodeName()>${editor.getPSAppDataEntity().getCodeName()?lower_case}<#else>${appDeAcMode.getValuePSAppDEField().getCodeName()?lower_case}</#if>'
<#else>
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}' deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if> </#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
:service="service" :service="service"
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??> <#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#if editor.getPSAppDEACMode().getMinorSortPSDEF?? && editor.getPSAppDEACMode().getMinorSortPSDEF()?? && editor.getPSAppDEACMode().getMinorSortDir?? && editor.getPSAppDEACMode().getMinorSortDir()??> <#if editor.getPSAppDEACMode().getMinorSortPSDEF?? && editor.getPSAppDEACMode().getMinorSortPSDEF()?? && editor.getPSAppDEACMode().getMinorSortDir?? && editor.getPSAppDEACMode().getMinorSortDir()??>
......
<disk-file-upload
:data="data"
formItemName="${item.name}"
:value="data.${item.name}"
:formState="formState"
folder="<#if item.getEditorParam("folder",'') != ''>${item.getEditorParam("ownerType",'')}<#else>${ctrl.getPSDataEntity().getCodeName()?lower_case}</#if>"
ownertype="<#if item.getEditorParam("ownerType",'') != ''>${item.getEditorParam("ownerType",'')}<#else>${item.name}</#if>"
:ownerid="<#if item.getEditorParam("ownerid",'') != ''>'${item.getEditorParam("ownerid",'')}'<#else>data.srfkey</#if>"
:show-ocrview=<#if item.getEditorParam("showOcrview",'') != ''>"${item.getEditorParam("showOcrview",'')}"<#else>"false"</#if>
:show-preview=<#if item.getEditorParam("showPreview",'') != ''>"${item.getEditorParam("showPreview",'')}"<#else>"false"</#if>
:show-edit=<#if item.getEditorParam("showEdit",'') != ''>"${item.getEditorParam("showEdit",'')}"<#else>"false"</#if>
:show-drag=<#if item.getEditorParam("showDrag",'') != ''>"${item.getEditorParam("showDrag",'')}"<#else>"false"</#if>
:persistence=<#if item.getEditorParam("persistence",'') != ''>"${item.getEditorParam("persistence",'')}"<#else>"false"</#if>
@formitemvaluechange="onFormItemValueChange">
</disk-file-upload>
\ No newline at end of file
// 表格行编辑暂不支持
\ No newline at end of file
// 面板暂不支持
\ No newline at end of file
EDITORTYPE=FILEUPLOADER#DISK
\ No newline at end of file
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
:data="JSON.stringify(data)" :data="JSON.stringify(data)"
name='${editor.name?lower_case}' name='${editor.name?lower_case}'
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:rowPreview="true" :rowPreview="true"
:uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>' :uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>'
:exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>' :exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>'
......
...@@ -6,9 +6,7 @@ ...@@ -6,9 +6,7 @@
:data="JSON.stringify(data)" :data="JSON.stringify(data)"
name='${editor.name?lower_case}' name='${editor.name?lower_case}'
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:rowPreview="true" :rowPreview="true"
:uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>' :uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>'
:exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>' :exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>'
......
...@@ -6,9 +6,7 @@ ...@@ -6,9 +6,7 @@
:transfer="true" :transfer="true"
format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择时间..." placeholder="请选择时间..."
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
@on-change="(val1, val2) => { data.${editor.name?lower_case} = val1; panelEditItemChange(data, '${editor.name?lower_case}', val1)}"> @on-change="(val1, val2) => { data.${editor.name?lower_case} = val1; panelEditItemChange(data, '${editor.name?lower_case}', val1)}">
......
...@@ -6,9 +6,7 @@ ...@@ -6,9 +6,7 @@
:transfer="true" :transfer="true"
format="yyyy-MM-dd" format="yyyy-MM-dd"
placeholder="请选择时间..." placeholder="请选择时间..."
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
@on-change="(val1, val2) => { data.${editor.name?lower_case} = val1; panelEditItemChange(data, '${editor.name?lower_case}', val1)}"> @on-change="(val1, val2) => { data.${editor.name?lower_case} = val1; panelEditItemChange(data, '${editor.name?lower_case}', val1)}">
......
...@@ -5,9 +5,7 @@ ...@@ -5,9 +5,7 @@
:transfer="true" :transfer="true"
format="mm" format="mm"
placeholder="请选择时间..." placeholder="请选择时间..."
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
@on-change="(val) => { data.${editor.name?lower_case} = val; panelEditItemChange(data, '${editor.name?lower_case}', val)}"> @on-change="(val) => { data.${editor.name?lower_case} = val; panelEditItemChange(data, '${editor.name?lower_case}', val)}">
......
...@@ -5,9 +5,7 @@ ...@@ -5,9 +5,7 @@
:transfer="true" :transfer="true"
format="HH" format="HH"
placeholder="请选择时间..." placeholder="请选择时间..."
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
@on-change="(val) => { data.${editor.name?lower_case} = val; panelEditItemChange(data, '${editor.name?lower_case}', val)}"> @on-change="(val) => { data.${editor.name?lower_case} = val; panelEditItemChange(data, '${editor.name?lower_case}', val)}">
......
...@@ -6,9 +6,7 @@ ...@@ -6,9 +6,7 @@
:transfer="true" :transfer="true"
format="yyyy-MM-dd" format="yyyy-MM-dd"
placeholder="请选择时间..." placeholder="请选择时间..."
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
@on-change="(val1, val2) => { data.${editor.name?lower_case} = val1; panelEditItemChange(data, '${editor.name?lower_case}', val1)}"> @on-change="(val1, val2) => { data.${editor.name?lower_case} = val1; panelEditItemChange(data, '${editor.name?lower_case}', val1)}">
......
...@@ -5,9 +5,7 @@ ...@@ -5,9 +5,7 @@
:transfer="true" :transfer="true"
format="HH:mm:ss" format="HH:mm:ss"
placeholder="请选择时间..." placeholder="请选择时间..."
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
@on-change="(val) => { data.${editor.name?lower_case} = val; panelEditItemChange(data, '${editor.name?lower_case}', val)}"> @on-change="(val) => { data.${editor.name?lower_case} = val; panelEditItemChange(data, '${editor.name?lower_case}', val)}">
......
...@@ -5,9 +5,7 @@ ...@@ -5,9 +5,7 @@
:transfer="true" :transfer="true"
format="HH:mm" format="HH:mm"
placeholder="请选择时间..." placeholder="请选择时间..."
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
@on-change="(val) => { data.${editor.name?lower_case} = val; panelEditItemChange(data, '${editor.name?lower_case}', val)}"> @on-change="(val) => { data.${editor.name?lower_case} = val; panelEditItemChange(data, '${editor.name?lower_case}', val)}">
......
...@@ -5,9 +5,7 @@ ...@@ -5,9 +5,7 @@
:transfer="true" :transfer="true"
format="ss" format="ss"
placeholder="请选择时间..." placeholder="请选择时间..."
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
@on-change="(val) => { data.${editor.name?lower_case} = val; panelEditItemChange(data, '${editor.name?lower_case}', val)}"> @on-change="(val) => { data.${editor.name?lower_case} = val; panelEditItemChange(data, '${editor.name?lower_case}', val)}">
......
...@@ -5,9 +5,7 @@ ...@@ -5,9 +5,7 @@
name='${editor.name}' name='${editor.name}'
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
@change="($event)=>{onPanelItemValueChange(data,$event)} " @change="($event)=>{onPanelItemValueChange(data,$event)} "
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
style="${item.getEditorCssStyle()}"> style="${item.getEditorCssStyle()}">
</app-stepper> </app-stepper>
</#if> </#if>
\ No newline at end of file
...@@ -5,9 +5,7 @@ ...@@ -5,9 +5,7 @@
name='${editor.name?lower_case}' name='${editor.name?lower_case}'
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
@change="($event)=>{onPanelItemValueChange(data,$event)} " @change="($event)=>{onPanelItemValueChange(data,$event)} "
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
style="${item.getEditorCssStyle()}"> style="${item.getEditorCssStyle()}">
</app-slider> </app-slider>
</#if> </#if>
\ No newline at end of file
<avue-custom-form @change="(value) => {data.${editor.name} = value}" :isParseString="false" :isFormData="<#if editor.getEditorParam('isFormData','') != ''>true<#else>false</#if>" <#if editor.getEditorParam('options','') != ''>:options="${editor.getEditorParam('options','')}"</#if> :value="data.${editor.name}" :formData="data" <#if editor.getEditorParam('url','') != ''>:url="${editor.getEditorParam('url','')}"</#if> :formState="formState"></avue-custom-form>
\ No newline at end of file
<#ibizinclude>../@MACRO/GRID/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
EDITORTYPE=USERCONTROL#CUSTOMAVUEFORM
\ No newline at end of file
...@@ -5,9 +5,7 @@ ...@@ -5,9 +5,7 @@
name='${editor.name?lower_case}' name='${editor.name?lower_case}'
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
@change="($event)=>{data.${editor.name?lower_case} = $event; panelEditItemChange(data, '${editor.name?lower_case}', $event)} " @change="($event)=>{data.${editor.name?lower_case} = $event; panelEditItemChange(data, '${editor.name?lower_case}', $event)} "
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
style="${item.getEditorCssStyle()}"> style="${item.getEditorCssStyle()}">
</app-rate> </app-rate>
</#if> </#if>
\ No newline at end of file
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
${item.render.code} ${item.render.code}
<#else> <#else>
<div style="${item.getEditorCssStyle()}"> <div style="${item.getEditorCssStyle()}">
<app-checkbox :value="data.${editor.name?lower_case}" @change="($event)=>{data.${editor.name?lower_case} = $event;panelEditItemChange(data, '${editor.name?lower_case}', $event)} " <#if item.getEnableCond??>:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"</#if>></app-checkbox> <app-checkbox :value="data.${editor.name?lower_case}" @change="($event)=>{data.${editor.name?lower_case} = $event;panelEditItemChange(data, '${editor.name?lower_case}', $event)} " :disabled="detailsModel.${item.getCodeName()}.disabled"></app-checkbox>
</div> </div>
</#if> </#if>
\ No newline at end of file
...@@ -4,9 +4,7 @@ ...@@ -4,9 +4,7 @@
<#else> <#else>
<app-checkbox-list <app-checkbox-list
v-model="data.${editor.name?lower_case}" v-model="data.${editor.name?lower_case}"
<#if item.getEnableCond??> :disabled="detailsModel.${item.getCodeName()}.disabled"
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:data="data" :data="data"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
......
...@@ -92,10 +92,6 @@ ${backend_block} ...@@ -92,10 +92,6 @@ ${backend_block}
context.srfsessionkey = context.srfsessionid; context.srfsessionkey = context.srfsessionid;
delete context.srfsessionid; delete context.srfsessionid;
} }
<#-- 关闭编辑视图 -->
<#if item.isCloseEditView()>
actionContext.closeView(null);
</#if>
const backend = () => { const backend = () => {
<#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()?? && item.getPSAppDEMethod?? && item.getPSAppDEMethod()??> <#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()?? && item.getPSAppDEMethod?? && item.getPSAppDEMethod()??>
const curService:${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}Service = new ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}Service(); const curService:${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}Service = new ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}Service();
...@@ -117,6 +113,10 @@ ${backend_block} ...@@ -117,6 +113,10 @@ ${backend_block}
xData.refresh(args); xData.refresh(args);
} }
</#if> </#if>
<#-- 关闭编辑视图 -->
<#if item.isCloseEditView()>
actionContext.closeView(null);
</#if>
<#-- 后续界面行为 --> <#-- 后续界面行为 -->
<#if item.getNextPSUIAction?? && item.getNextPSUIAction()??> <#if item.getNextPSUIAction?? && item.getNextPSUIAction()??>
<#assign nextPSUIAction = item.getNextPSUIAction()/> <#assign nextPSUIAction = item.getNextPSUIAction()/>
......
...@@ -51,6 +51,13 @@ ...@@ -51,6 +51,13 @@
} }
</#if> </#if>
<#-- END:导航参数 --> <#-- END:导航参数 -->
<#-- BEGIN:工作流传递userTaskId -->
<#if dataview.getViewType() == "DEWFDYNAEDITVIEW" >
if(this.viewparams && this.viewparams.userTaskId){
Object.assign(data,{'userTaskId':this.viewparams.userTaskId})
}
</#if>
<#-- END:工作流传递userTaskId -->
<#-- BEGIN:准备参数 --> <#-- BEGIN:准备参数 -->
<#if dataview.isRedirectView() && dataview.getViewType() != "DEREDIRECTVIEW"> <#if dataview.isRedirectView() && dataview.getViewType() != "DEREDIRECTVIEW">
const deResParameters: any[] = []; const deResParameters: any[] = [];
...@@ -162,11 +169,7 @@ ...@@ -162,11 +169,7 @@
} }
const openIndexViewTab = (data: any) => { const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data); const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
<#if dataview.getViewType() == "DEWFDYNAEDITVIEW" >
this.$router.push(routePath+'?userTaskId='+this.viewparams.userTaskId);
<#else>
this.$router.push(routePath); this.$router.push(routePath);
</#if>
} }
openIndexViewTab(data); openIndexViewTab(data);
<#elseif dataview.getOpenMode() == 'POPUPAPP'> <#elseif dataview.getOpenMode() == 'POPUPAPP'>
......
...@@ -79,7 +79,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co ...@@ -79,7 +79,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService} * @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
public ${srfclassname('${appCounter.getCodeName()}')}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store }); public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store,context:this.context,viewparams:this.viewparams });
</#if> </#if>
<#if view.isEnableQuickGroup()> <#if view.isEnableQuickGroup()>
...@@ -172,7 +172,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co ...@@ -172,7 +172,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
public quickGroupValueChange($event:any){ public quickGroupValueChange($event:any){
if($event && $event.data){ if($event){
this.quickGroupData = $event.data; this.quickGroupData = $event.data;
if(this.isEmitQuickGroupValue){ if(this.isEmitQuickGroupValue){
this.onSearch($event); this.onSearch($event);
......
...@@ -57,7 +57,7 @@ if(this.formDruipart){ ...@@ -57,7 +57,7 @@ if(this.formDruipart){
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService} * @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
public ${srfclassname('${appCounter.getCodeName()}')}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store }); public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store,context:this.context,viewparams:this.viewparams });
</#if> </#if>
/** /**
...@@ -254,7 +254,7 @@ if(this.formDruipart){ ...@@ -254,7 +254,7 @@ if(this.formDruipart){
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
public quickGroupValueChange($event:any){ public quickGroupValueChange($event:any){
if($event && $event.data){ if($event){
this.quickGroupData = $event.data; this.quickGroupData = $event.data;
if(this.isEmitQuickGroupValue){ if(this.isEmitQuickGroupValue){
this.onSearch($event); this.onSearch($event);
......
...@@ -59,7 +59,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co ...@@ -59,7 +59,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService} * @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
public ${srfclassname('${appCounter.getCodeName()}')}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store }); public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store,context:this.context,viewparams:this.viewparams });
</#if> </#if>
<#if view.isEnableQuickGroup()> <#if view.isEnableQuickGroup()>
...@@ -152,7 +152,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co ...@@ -152,7 +152,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
public quickGroupValueChange($event:any){ public quickGroupValueChange($event:any){
if($event && $event.data){ if($event){
this.quickGroupData = $event.data; this.quickGroupData = $event.data;
if(this.isEmitQuickGroupValue){ if(this.isEmitQuickGroupValue){
this.onSearch($event); this.onSearch($event);
......
...@@ -94,6 +94,32 @@ ...@@ -94,6 +94,32 @@
*/ */
public viewCacheData:any; public viewCacheData:any;
<#if view.getPSAppCounterRefs()??>
<#assign counterRefs = ''/>
<#list view.getPSAppCounterRefs() as singleCounterRef>
<#if singleCounterRef.getPSAppCounter()??>
<#assign appCounter = singleCounterRef.getPSAppCounter()/>
<#assign counterRefs>${counterRefs}this.${appCounter.getCodeName()?lower_case}counterservice<#if singleCounterRef_has_next>,</#if></#assign>
/**
* ${srfclassname('${appCounter.getCodeName()}')}CounterService计数器服务对象
*
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store,context:this.context,viewparams:this.viewparams});
</#if>
</#list>
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof ${srfclassname('${view.name}')}Base
*/
public counterServiceArray:Array<any> = [${counterRefs}];
</#if>
/** /**
* 解析视图参数 * 解析视图参数
* *
...@@ -447,6 +473,14 @@ ${P.getLogicCode(uiAction, "LOGIC.vue").code} ...@@ -447,6 +473,14 @@ ${P.getLogicCode(uiAction, "LOGIC.vue").code}
this.serviceStateEvent.unsubscribe(); 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> </#if>
</#if> </#if>
......
...@@ -68,32 +68,6 @@ export default class ${srfclassname('${view.name}')}Base extends Vue { ...@@ -68,32 +68,6 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
*/ */
public appUIService: ${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService(this.$store); public appUIService: ${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService(this.$store);
</#if> </#if>
<#if view.getPSAppCounterRefs()??>
<#assign counterRefs = ''/>
<#list view.getPSAppCounterRefs() as singleCounterRef>
<#if singleCounterRef.getPSAppCounter()??>
<#assign appCounter = singleCounterRef.getPSAppCounter()/>
<#assign counterRefs>${counterRefs}this.${srfclassname('${appCounter.getCodeName()}')}counterservice<#if singleCounterRef_has_next>,</#if></#assign>
/**
* ${srfclassname('${appCounter.getCodeName()}')}CounterService计数器服务对象
*
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${srfclassname('${appCounter.getCodeName()}')}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store });
</#if>
</#list>
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof ${srfclassname('${view.name}')}Base
*/
public counterServiceArray:Array<any> = [${counterRefs}];
</#if>
/** /**
* 数据变化 * 数据变化
...@@ -225,6 +199,8 @@ export default class ${srfclassname('${view.name}')}Base extends Vue { ...@@ -225,6 +199,8 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
_this.engine.load(); _this.engine.load();
<#if viewdata_block??>${viewdata_block}</#if> <#if viewdata_block??>${viewdata_block}</#if>
}); });
} else if(!Object.is(newVal, oldVal) && _this.refresh() && Object.is(_this.$util.typeOf(_this.refresh()), 'function')) {
_this.refresh();
} }
} }
......
<#assign self_viewparam>
this.$forceUpdate();
</#assign>
<#assign self_content>
/**
* 加载数据
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public loadModel(){
<#assign appDataEntity = view.getPSAppDataEntity() />
if(this.context.${appDataEntity.getCodeName()?lower_case}){
this.appEntityService.getDataInfo(JSON.parse(JSON.stringify(this.context)),{},false).then((response:any) =>{
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
this.viewState.next({ tag: 'app-actionbar', action: 'loadmodel', data:_data});
if (_data.${appDataEntity.getMajorPSAppDEField().getCodeName()?lower_case}) {
Object.assign(this.model, { dataInfo: _data.${appDataEntity.getMajorPSAppDEField().getCodeName()?lower_case} });
if(this.$tabPageExp){
let _this:any = this;
this.$tabPageExp.setCurPageCaption(_this.$t(this.model.srfCaption), _this.$t(this.model.srfCaption), _this.model.dataInfo);
}
if(this.$route){
this.$route.meta.info = this.model.dataInfo;
}
<#noparse>Object.assign(this.model, { srfCaption: `${this.$t(this.model.srfCaption)} - ${this.model.dataInfo}` });</#noparse>
}
})
}
}
</#assign>
<#ibizinclude>
../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
${P.getLayoutCode().code}
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
VIEWTYPE=APPDEPORTALVIEW#ENTITYDATAKANBANVIEWCARD
\ No newline at end of file
...@@ -51,6 +51,19 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co ...@@ -51,6 +51,19 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
} }
} }
/**
* 视图刷新
*
* @param {*} $event
* @memberof ${srfclassname('${view.name}')}Base
*/
public refresh(): void {
const refs: any = this.$refs;
if (refs.calendar) {
refs.calendar.refresh();
}
}
/** /**
* calendar 的 beforeload 事件 * calendar 的 beforeload 事件
* *
...@@ -107,7 +120,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co ...@@ -107,7 +120,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService} * @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
public ${srfclassname('${appCounter.getCodeName()}')}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store }); public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store,context:this.context,viewparams:this.viewparams });
</#if> </#if>
<#if view.isEnableQuickGroup()> <#if view.isEnableQuickGroup()>
...@@ -200,7 +213,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co ...@@ -200,7 +213,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
public quickGroupValueChange($event:any){ public quickGroupValueChange($event:any){
if($event && $event.data){ if($event){
this.quickGroupData = $event.data; this.quickGroupData = $event.data;
if(this.isEmitQuickGroupValue){ if(this.isEmitQuickGroupValue){
this.onSearch($event); this.onSearch($event);
......
...@@ -137,7 +137,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co ...@@ -137,7 +137,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService} * @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
public ${srfclassname('${appCounter.getCodeName()}')}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store }); public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store,context:this.context,viewparams:this.viewparams });
</#if> </#if>
<#if view.isEnableQuickGroup()> <#if view.isEnableQuickGroup()>
...@@ -230,7 +230,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co ...@@ -230,7 +230,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
public quickGroupValueChange($event:any){ public quickGroupValueChange($event:any){
if($event && $event.data){ if($event){
this.quickGroupData = $event.data; this.quickGroupData = $event.data;
if(this.isEmitQuickGroupValue){ if(this.isEmitQuickGroupValue){
this.onSearch($event); this.onSearch($event);
......
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
../@MACRO/LAYOUTPANEL_VIEW.template.ftl ../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude> </#ibizinclude>
<#assign import_block>
import { appConfig } from '@/config/appConfig';
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl ../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
...@@ -77,7 +81,7 @@ ...@@ -77,7 +81,7 @@
} else if (localStorage.getItem('theme-class')) { } else if (localStorage.getItem('theme-class')) {
return localStorage.getItem('theme-class'); return localStorage.getItem('theme-class');
} else { } else {
return 'app-default-theme'; return appConfig.defaultTheme;
} }
} }
...@@ -93,7 +97,7 @@ ...@@ -93,7 +97,7 @@
} else if (localStorage.getItem('font-family')) { } else if (localStorage.getItem('font-family')) {
return localStorage.getItem('font-family'); return localStorage.getItem('font-family');
} else { } else {
return 'Microsoft YaHei'; return appConfig.defaultFont;
} }
} }
...@@ -170,12 +174,8 @@ ...@@ -170,12 +174,8 @@
* @type {string[]} * @type {string[]}
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
get themeClasses(): string[] { get themeClasses(): string {
return [ return this.selectTheme;
Object.is(this.selectTheme, 'app_theme_blue') ? 'app_theme_blue' : '',
Object.is(this.selectTheme, 'app-default-theme') ? 'app-default-theme' : '',
Object.is(this.selectTheme, 'app_theme_darkblue') ? 'app_theme_darkblue' : '',
];
} }
/** /**
......
...@@ -122,6 +122,9 @@ export default class AuthService { ...@@ -122,6 +122,9 @@ export default class AuthService {
* @memberof AuthService * @memberof AuthService
*/ */
public getMenusPermission(item: any): boolean { public getMenusPermission(item: any): boolean {
if(!this.$store.getters['authresource/getEnablePermissionValid']) {
return true;
}
return this.$store.getters['authresource/getAuthMenu'](item); return this.$store.getters['authresource/getAuthMenu'](item);
} }
...@@ -133,6 +136,9 @@ export default class AuthService { ...@@ -133,6 +136,9 @@ export default class AuthService {
* @memberof AuthService * @memberof AuthService
*/ */
public getResourcePermission(tag: any): boolean { public getResourcePermission(tag: any): boolean {
if(!this.$store.getters['authresource/getEnablePermissionValid']) {
return true;
}
return this.$store.getters['authresource/getResourceData'](tag); return this.$store.getters['authresource/getResourceData'](tag);
} }
......
...@@ -10,14 +10,6 @@ TARGET=PSAPPCOUNTER ...@@ -10,14 +10,6 @@ TARGET=PSAPPCOUNTER
*/ */
export default class ${srfclassname('${item.getCodeName()}')}CounterServiceBase extends CounterService { export default class ${srfclassname('${item.getCodeName()}')}CounterServiceBase extends CounterService {
/**
* 当前计数器数据对象
*
* @param {*} [opts={}]
* @memberof ${srfclassname('${item.getCodeName()}')}CounterServiceBase
*/
public counterData:any ={};
/** /**
* Creates an instance of ${srfclassname('${item.getCodeName()}')}CounterServiceBase. * Creates an instance of ${srfclassname('${item.getCodeName()}')}CounterServiceBase.
* *
...@@ -27,8 +19,8 @@ export default class ${srfclassname('${item.getCodeName()}')}CounterServiceBase ...@@ -27,8 +19,8 @@ export default class ${srfclassname('${item.getCodeName()}')}CounterServiceBase
constructor(opts: any = {}) { constructor(opts: any = {}) {
super(opts); super(opts);
this.initCounterData(); this.initCounterData();
setInterval(() => { this.timer = setInterval(() => {
this.fetchCounterData(); this.fetchCounterData(this.context,this.viewparams);
}, <#if item.getTimer()??>${item.getTimer()?c}<#else>6000</#if>); }, <#if item.getTimer()??>${item.getTimer()?c}<#else>6000</#if>);
} }
...@@ -39,7 +31,7 @@ export default class ${srfclassname('${item.getCodeName()}')}CounterServiceBase ...@@ -39,7 +31,7 @@ export default class ${srfclassname('${item.getCodeName()}')}CounterServiceBase
* @memberof ${srfclassname('${item.getCodeName()}')}CounterServiceBase * @memberof ${srfclassname('${item.getCodeName()}')}CounterServiceBase
*/ */
public initCounterData(){ public initCounterData(){
this.fetchCounterData(); this.fetchCounterData(this.context,this.viewparams);
} }
/** /**
...@@ -48,19 +40,14 @@ export default class ${srfclassname('${item.getCodeName()}')}CounterServiceBase ...@@ -48,19 +40,14 @@ export default class ${srfclassname('${item.getCodeName()}')}CounterServiceBase
* @param {*} [opts={}] * @param {*} [opts={}]
* @memberof ${srfclassname('${item.getCodeName()}')}CounterServiceBase * @memberof ${srfclassname('${item.getCodeName()}')}CounterServiceBase
*/ */
public async fetchCounterData(){ public async fetchCounterData(context:any,data:any){
this.counterData = { <#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()?? && item.getGetPSAppDEAction?? && item.getGetPSAppDEAction()??>
item1:parseInt((Math.random()*10)+''), let _appEntityService:any = await this.appEntityService.getService('${item.getPSAppDataEntity().getCodeName()?lower_case}');
item2:parseInt((Math.random()*100)+''), if (_appEntityService['${item.getGetPSAppDEAction().getCodeName()}'] && _appEntityService['${item.getGetPSAppDEAction().getCodeName()}'] instanceof Function) {
item3:parseInt((Math.random()*100)+''), let result = await _appEntityService['${item.getGetPSAppDEAction().getCodeName()}'](context,data, false);
item4:parseInt((Math.random()*100)+''), this.counterData = result.data;
item5:parseInt((Math.random()*100)+''),
item6:parseInt((Math.random()*100)+''),
item7:parseInt((Math.random()*100)+''),
item8:parseInt((Math.random()*100)+''),
item9:parseInt((Math.random()*100)+''),
item10:parseInt((Math.random()*100)+'')
} }
</#if>
} }
/** /**
...@@ -69,8 +56,9 @@ export default class ${srfclassname('${item.getCodeName()}')}CounterServiceBase ...@@ -69,8 +56,9 @@ export default class ${srfclassname('${item.getCodeName()}')}CounterServiceBase
* @memberof ${srfclassname('${item.getCodeName()}')}CounterServiceBase * @memberof ${srfclassname('${item.getCodeName()}')}CounterServiceBase
*/ */
public async refreshData(){ public async refreshData(){
const res = await this.fetchCounterData(); if (this['fetchCounterData'] && this['fetchCounterData'] instanceof Function) {
return res; await this.fetchCounterData(this.context,this.viewparams);
}
} }
} }
\ No newline at end of file
...@@ -18,6 +18,8 @@ export const Environment = { ...@@ -18,6 +18,8 @@ export const Environment = {
ExportFile: '/ibizutil/download', ExportFile: '/ibizutil/download',
// 文件上传 // 文件上传
UploadFile: '/ibizutil/upload', UploadFile: '/ibizutil/upload',
// 数据导入单次上传最大数量
sliceUploadCnt: 100,
// 是否为pc端应用 // 是否为pc端应用
isAppMode:true, isAppMode:true,
//统一地址 //统一地址
......
...@@ -31,7 +31,10 @@ export default { ...@@ -31,7 +31,10 @@ export default {
deleteError: "Failed to delete", deleteError: "Failed to delete",
delDataFail: "Failed to delete data", delDataFail: "Failed to delete data",
noData: "No data", noData: "No data",
startsuccess:"Start successful" startsuccess:"Start successful",
loadmore:"Load more",
nomore:"No more",
other:"other"
}, },
local:{ local:{
new: "New", new: "New",
...@@ -45,6 +48,8 @@ export default { ...@@ -45,6 +48,8 @@ export default {
totle: "totle", totle: "totle",
noData: "No data", noData: "No data",
valueVail: "Value cannot be empty", valueVail: "Value cannot be empty",
group:"Group",
other:"Other",
notConfig: { notConfig: {
fetchAction: "The view table fetchaction parameter is not configured", fetchAction: "The view table fetchaction parameter is not configured",
removeAction: "The view table removeaction parameter is not configured", removeAction: "The view table removeaction parameter is not configured",
......
...@@ -31,7 +31,10 @@ export default { ...@@ -31,7 +31,10 @@ export default {
deleteError: "删除失败", deleteError: "删除失败",
delDataFail: "删除数据失败", delDataFail: "删除数据失败",
noData: "暂无数据", noData: "暂无数据",
startsuccess:"启动成功" startsuccess:"启动成功",
loadmore:"加载更多",
nomore:"没有更多了",
other:"其他"
}, },
local:{ local:{
new: "新建", new: "新建",
...@@ -45,6 +48,8 @@ export default { ...@@ -45,6 +48,8 @@ export default {
totle: "共", totle: "共",
noData: "无数据", noData: "无数据",
valueVail: "值不能为空", valueVail: "值不能为空",
group:"分组",
other:"其他",
notConfig: { notConfig: {
fetchAction: "视图表格fetchAction参数未配置", fetchAction: "视图表格fetchAction参数未配置",
removeAction: "视图表格removeAction参数未配置", removeAction: "视图表格removeAction参数未配置",
......
...@@ -518,8 +518,31 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr ...@@ -518,8 +518,31 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#list appdeAction.getBeforePSDEActionLogics() as beforelogic> <#list appdeAction.getBeforePSDEActionLogics() as beforelogic>
<#if beforelogic.getPSDELogic()?? && beforelogic.getPSDELogic().getLogicHolder?? && beforelogic.getPSDELogic().getLogicHolder()?? && (beforelogic.getPSDELogic().getLogicHolder() == 2 || beforelogic.getPSDELogic().getLogicHolder() == 3)> <#if beforelogic.getPSDELogic()?? && beforelogic.getPSDELogic().getLogicHolder?? && beforelogic.getPSDELogic().getLogicHolder()?? && (beforelogic.getPSDELogic().getLogicHolder() == 2 || beforelogic.getPSDELogic().getLogicHolder() == 3)>
<#assign singleLogic = beforelogic.getPSDELogic() /> <#assign singleLogic = beforelogic.getPSDELogic() />
<#if beforelogic.isInternalLogic()>
<#-- 内部逻辑start -->
let ${singleLogic.getCodeName()?lower_case}:${srfclassname('${singleLogic.getCodeName()}')}Logic = new ${srfclassname('${singleLogic.getCodeName()}')}Logic({context:JSON.parse(JSON.stringify(context)),data:JSON.parse(JSON.stringify(data))}); let ${singleLogic.getCodeName()?lower_case}:${srfclassname('${singleLogic.getCodeName()}')}Logic = new ${srfclassname('${singleLogic.getCodeName()}')}Logic({context:JSON.parse(JSON.stringify(context)),data:JSON.parse(JSON.stringify(data))});
data = await ${singleLogic.getCodeName()?lower_case}.onExecute(context,data,isloading?true:false); data = await ${singleLogic.getCodeName()?lower_case}.onExecute(context,data,isloading?true:false);
<#-- 内部逻辑end -->
<#else>
<#-- 外部逻辑start -->
let tempService:any = await this.getService("${beforelogic.getDstPSDE().getCodeName()?lower_case}");
let tempData:any = <#if beforelogic.isCloneParam()>Util.deepCopy(data)<#else>{}</#if>;
if(tempService['${beforelogic.getDstPSDEAction().getCodeName()}'] && tempService['${beforelogic.getDstPSDEAction().getCodeName()}'] instanceof Function){
<#if beforelogic.isIgnoreException()>try {</#if>
let response:any = await tempService['${beforelogic.getDstPSDEAction().getCodeName()}'](context,tempData,isloading?true:false);
if(response && response.status === 200){
data = response.data;
}else{
<#if !beforelogic.isIgnoreException()>data = response.data;</#if>
}
<#if beforelogic.isIgnoreException()>
} catch (error) {
console.warn(error);
}
</#if>
}
<#-- 外部逻辑end -->
</#if>
</#if> </#if>
</#list> </#list>
</#if> </#if>
...@@ -534,9 +557,32 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr ...@@ -534,9 +557,32 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#list appdeAction.getAfterPSDEActionLogics() as afterlogic> <#list appdeAction.getAfterPSDEActionLogics() as afterlogic>
<#if afterlogic.getPSDELogic()?? && afterlogic.getPSDELogic().getLogicHolder?? && afterlogic.getPSDELogic().getLogicHolder()?? && (afterlogic.getPSDELogic().getLogicHolder() == 2 || afterlogic.getPSDELogic().getLogicHolder() == 3)> <#if afterlogic.getPSDELogic()?? && afterlogic.getPSDELogic().getLogicHolder?? && afterlogic.getPSDELogic().getLogicHolder()?? && (afterlogic.getPSDELogic().getLogicHolder() == 2 || afterlogic.getPSDELogic().getLogicHolder() == 3)>
<#assign singleLogic = afterlogic.getPSDELogic() /> <#assign singleLogic = afterlogic.getPSDELogic() />
<#if afterlogic.isInternalLogic()>
<#-- 内部逻辑start -->
<@compress single_line=true>let ${singleLogic.getCodeName()?lower_case}:${srfclassname('${singleLogic.getCodeName()}')}Logic = new ${srfclassname('${singleLogic.getCodeName()}')}Logic({context:JSON.parse(JSON.stringify(context)),data:JSON.parse(JSON.stringify(res)).data});</@compress> <@compress single_line=true>let ${singleLogic.getCodeName()?lower_case}:${srfclassname('${singleLogic.getCodeName()}')}Logic = new ${srfclassname('${singleLogic.getCodeName()}')}Logic({context:JSON.parse(JSON.stringify(context)),data:JSON.parse(JSON.stringify(res)).data});</@compress>
<@compress single_line=true>let ${singleLogic.getCodeName()?lower_case}Data:any = await ${singleLogic.getCodeName()?lower_case}.onExecute(context,res.data,isloading?true:false);</@compress> <@compress single_line=true>let ${singleLogic.getCodeName()?lower_case}Data:any = await ${singleLogic.getCodeName()?lower_case}.onExecute(context,res.data,isloading?true:false);</@compress>
res ={status:200,data:${singleLogic.getCodeName()?lower_case}Data}; res ={status:200,data:${singleLogic.getCodeName()?lower_case}Data};
<#-- 内部逻辑end -->
<#else>
<#-- 外部逻辑start -->
let tempService:any = await this.getService("${afterlogic.getDstPSDE().getCodeName()?lower_case}");
let tempData:any = <#if afterlogic.isCloneParam()>Util.deepCopy(data)<#else>{}</#if>;
if(tempService['${afterlogic.getDstPSDEAction().getCodeName()}'] && tempService['${afterlogic.getDstPSDEAction().getCodeName()}'] instanceof Function){
<#if afterlogic.isIgnoreException()>try {</#if>
let response:any = await tempService['${afterlogic.getDstPSDEAction().getCodeName()}'](context,tempData,isloading?true:false);
if(response && response.status === 200){
res = response;
}else{
<#if !afterlogic.isIgnoreException()>res = response;</#if>
}
<#if afterlogic.isIgnoreException()>
} catch (error) {
console.warn(error);
}
</#if>
}
<#-- 外部逻辑end -->
</#if>
</#if> </#if>
</#list> </#list>
</#if> </#if>
...@@ -616,9 +662,10 @@ export default class ${srfclassname('${item.getCodeName()}')}ServiceBase extends ...@@ -616,9 +662,10 @@ export default class ${srfclassname('${item.getCodeName()}')}ServiceBase extends
<#if appdeAction.getPSDELogic?? && appdeAction.getPSDELogic()?? && (appdeAction.getActionHolder() == 2 || appdeAction.getActionHolder() == 3) > <#if appdeAction.getPSDELogic?? && appdeAction.getPSDELogic()?? && (appdeAction.getActionHolder() == 2 || appdeAction.getActionHolder() == 3) >
<#assign appdelogic = appdeAction.getPSDELogic() /> <#assign appdelogic = appdeAction.getPSDELogic() />
let appLogic:${srfclassname('${appdelogic.getCodeName()}')}Logic = new ${srfclassname('${appdelogic.getCodeName()}')}Logic({context:JSON.parse(JSON.stringify(context)),data:JSON.parse(JSON.stringify(data))}); let appLogic:${srfclassname('${appdelogic.getCodeName()}')}Logic = new ${srfclassname('${appdelogic.getCodeName()}')}Logic({context:JSON.parse(JSON.stringify(context)),data:JSON.parse(JSON.stringify(data))});
const res = await appLogic.onExecute(context,data,isloading?true:false); data = await appLogic.onExecute(context,data,isloading?true:false);
let res:any ={status:200,data:data};
<@excuteAfterAction appdeAction = appdeAction /> <@excuteAfterAction appdeAction = appdeAction />
return {status:200,data:res}; return res;
<#else> <#else>
<#-- 行为执行之后 start --> <#-- 行为执行之后 start -->
<#-- @author zpc --> <#-- @author zpc -->
......
<#ibiztemplate> <#ibiztemplate>
TARGET=PSSYSAPP TARGET=PSSYSAPP
</#ibiztemplate> </#ibiztemplate>
#app{
display: block;
}
<#if app.getAllPSAppCodeLists?? && app.getAllPSAppCodeLists()??> <#if app.getAllPSAppCodeLists?? && app.getAllPSAppCodeLists()??>
<#assign allAppCodeLists = app.getAllPSAppCodeLists() /> <#assign allAppCodeLists = app.getAllPSAppCodeLists() />
<#list allAppCodeLists as singleCodeList> <#list allAppCodeLists as singleCodeList>
......
## v7.0.0-alpha.19 [2020-9-13]
### Bug修复
修复表单动态隐藏和权限控制冲突问题
修复向导面板上一步去除表单校验逻辑
修复行为逻辑和附加后逻辑共同使用异常问题
修复树导航数据变化刷新当前节点问题
### 功能新增及优化
#### 模板
新增首页统一待办组件
新增实体工作流动态导航表格视图批量提交流程数据
新增菜单、工具栏、表单分组按钮、表单按钮、表格操作列单机模式支持
新增挂载外部配置文件
新增支持静态代码表样式表
新增增加树视图节点、日历项上下文菜单权限支持
新增支持表格导航、列表导航、卡片导航支持快速分组
新增部门人员选择器组件、文件上传(磁盘)组件、图片上传(磁盘)组件、动态表单组件
新增列表、数据视图回到顶部功能
新增表格分组、列表分组、数据视图分组功能
新增数据选择编辑器自填模式文本属性、值属性支持
新增附加逻辑外部逻辑支持
新增应用主题配置
优化项布局面板功能
优化列表样式
优化计数器支持
优化表格行编辑新建行追加在第一行
#### 基础文件
修复表单动态隐藏和权限控制冲突问题
修复嵌入视图组件初始化导航数据和抛值问题
修复app-format-data组件时间格式化转化异常
优化工作流审批组件
优化穿梭框组件样式
优化app-span精度逻辑
优化计数器处理逻辑
优化快速分组代码表抛值逻辑
优化debug组件和头部菜单增加开发环境配置
新增统一待办组件
新增实体工作流动态导航表格视图批量提交数据
新增菜单、工具栏、表单分组按钮、表单按钮、表格操作列单机模式支持
新增挂载外部配置文件
新增支持静态代码表样式表
新增部门人员选择器组件、文件上传(磁盘)组件、图片上传(磁盘)组件、动态表单组件
新增应用主题配置
## v7.0.0-alpha.18 [2020-8-23] ## v7.0.0-alpha.18 [2020-8-23]
### Bug修复 ### Bug修复
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册