提交 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>
......
...@@ -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)}">
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册