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

Merge branch 'dev'

......@@ -102,7 +102,7 @@ export default class ${srfclassname('${ctrl.codeName}')}Base extends Vue impleme
<#list ctrl.getPSAppCounterRefs() as singleCounterRef>
<#if 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计数器服务对象
......@@ -110,7 +110,7 @@ export default class ${srfclassname('${ctrl.codeName}')}Base extends Vue impleme
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @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>
</#list>
......
......@@ -102,7 +102,7 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get
<#list ctrl.getPSAppCounterRefs() as singleCounterRef>
<#if 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计数器服务对象
......@@ -110,7 +110,7 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @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>
</#list>
......
......@@ -2,7 +2,7 @@
<#if item.getPSUIAction?? && item.getPSUIAction()?? && item.getPSUIAction().getPSAppCounter?? && item.getPSUIAction().getPSAppCounter()??>
<#assign uiaction = item.getPSUIAction() />
<#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>
</Badge>
<#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.isShowCaption()>${item.getCaption()}</#if>
</dropdown-item>
\ No newline at end of file
......@@ -30,7 +30,7 @@
h('span', '${tabviewpanel.getCaption()}'),
h('Badge', {
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'
}
})
......@@ -143,7 +143,7 @@ import { Environment } from '@/environments/environment';
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public computedActiviedPanel(){
if(Environment.enablePermissionValid){
if(this.$store.getters['authresource/getEnablePermissionValid']){
if(Object.keys(this.authResourceObject).length >0){
let targetResult:Array<any> = [];
Object.keys(this.authResourceObject).forEach((item:any) =>{
......@@ -165,7 +165,7 @@ import { Environment } from '@/environments/environment';
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public computedAuthorizedPanel(name:string){
if(!Environment.enablePermissionValid)
if(!this.$store.getters['authresource/getEnablePermissionValid'])
return true;
if(!this.authResourceObject[name])
return true;
......
......@@ -134,7 +134,7 @@
*/
public initNavParam(){
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){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
......
<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 v-if="items.length > 0" style="height:100%;">
<div v-if="items.length > 0">
<#if ctrl.render??>
${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)">
<#if ctrl.getItemPSLayoutPanel()??>
<#assign panel = ctrl.getItemPSLayoutPanel()>
......@@ -16,13 +16,46 @@
{{item.srfmajortext}}
</#if>
</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>
<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 v-else>
{{ $t('app.commonWords.noData') }}
</div>
<el-backtop target=".content-container .app-list"></el-backtop>
</div>
</template>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
......@@ -126,6 +159,149 @@
*/
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 @@
*/
public isAddBehind:boolean = false;
/**
* 是否有滚动条
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public isScrollBar: boolean = false;
/**
* 排序方向
*
......@@ -222,6 +406,11 @@
*/
public afterMounted () {
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) {
this.loadMore();
}
......@@ -373,6 +562,9 @@
if(this.isSelectFirstDefault){
this.handleClick(this.items[0]);
}
<#if ctrl.isEnableGroup?? && ctrl.isEnableGroup()>
this.group();
</#if>
}, (response: any) => {
if (response && response.status === 401) {
return;
......@@ -433,9 +625,12 @@
}
//删除items中已删除的项
datas.forEach((data: any) => {
this.items.some((item:any,index:number)=>{
if(Object.is(item.srfkey,data.srfkey)){
this.items.splice(index,1);
this.items.some((item:any,index:number)=>{
if(Object.is(item.srfkey,data.srfkey)){
this.items.splice(index,1);
<#if ctrl.isEnableGroup?? && ctrl.isEnableGroup()>
this.group();
</#if>
return true;
}
});
......
......@@ -6,15 +6,34 @@
height:100%;
flex-grow: 1;
overflow-y: auto;
.el-collapse-item__header.is-active{
color: #409eff;
background-color: #ecf5ff;
}
.app-list-item {
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 {
background: #ecf5ff;
border-left: 5px solid #2d8cf0;
box-shadow: 0px 0px 3px 1px #82bff7;
}
.app-list-item:hover {
background: #ecf5ff;
}
.loadmore {
text-align: center;
padding: 10px;
text-decoration: underline;
color: #82bff7;
cursor: default;
}
}
.app-list-empty {
height:100%;
......
......@@ -10,6 +10,14 @@
</div>
</#if>
<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()>
<div class='search-container'>
<i-input :search="true"
......@@ -52,6 +60,13 @@
</#if>
</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>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
......@@ -101,6 +116,17 @@
*/
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
*
......@@ -194,6 +220,116 @@
*/
public navigateParams:any = <#if xDataControl.getPSNavigateParams?? && xDataControl.getPSNavigateParams()??><@getNavigateParams xDataControl /><#else>null</#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 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public afterCreated(){
<#if view.isEnableQuickGroup()>
this.loadQuickGroupModel();
</#if>
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
......
......@@ -23,8 +23,9 @@
}
.container-header{
display: flex;
justify-content: space-between;
justify-content: flex-start;
align-items: center;
flex-wrap: wrap;
.search-container {
width: 30%;
height: 48px;
......@@ -38,6 +39,10 @@
flex-wrap: wrap;
align-items: center;
}
.quick-group-container {
padding-top: 8px;
padding-right: 20px;
}
}
.list-exp-bar-content {
<#-- 计算高度 -->
......
......@@ -10,6 +10,14 @@
</div>
</#if>
<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()>
<div class='search-container'>
<i-input :search="true"
......@@ -52,6 +60,14 @@
</#if>
</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>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
......@@ -100,6 +116,17 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
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
......@@ -194,6 +221,116 @@
*/
public navigateParams:any = <#if xDataControl.getPSNavigateParams?? && xDataControl.getPSNavigateParams()??><@getNavigateParams xDataControl /><#else>null</#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 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public afterCreated(){
<#if view.isEnableQuickGroup()>
this.loadQuickGroupModel();
</#if>
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
......
......@@ -87,7 +87,7 @@
}
.container-header{
display: flex;
justify-content: space-between;
justify-content: flex-start;
align-items: center;
.search-container {
width: 30%;
......@@ -99,6 +99,9 @@
.toolbar-container{
padding: 4px;
}
.quick-group-container{
padding-right: 20px;
}
}
.dataview-exp-bar-content {
<#-- 计算高度 -->
......
......@@ -16,7 +16,7 @@
<#if item.getPSUIAction?? && item.getPSUIAction()?? && item.getPSUIAction().getPSAppCounter?? && item.getPSUIAction().getPSAppCounter()??>
<#assign uiaction = item.getPSUIAction() />
<#assign counter = uiaction.getPSAppCounter() />
<Badge type="primary" v-show="${ModelsName}.${item.name}.visabled" :count="${srfclassname('${counter.getCodeName()}')}counterservice.counterData.<#if uiaction.getCounterId()??>${uiaction.getCounterId()}</#if>">
<Badge type="primary" v-show="${ModelsName}.${item.name}.visabled" :count="${counter.getCodeName()?lower_case}counterservice.counterData.<#if uiaction.getCounterId()??>${uiaction.getCounterId()}</#if>">
</#if>
<i-button v-show="${ModelsName}.${item.name}.visabled" :disabled="${ModelsName}.${item.name}.disabled" class='<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)">
<#if item.isShowIcon()><i class='<#if item.getPSSysImage()??><#assign img=item.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i></#if>
......@@ -35,7 +35,7 @@
<#if item.getPSUIAction?? && item.getPSUIAction()?? && item.getPSUIAction().getPSAppCounter?? && item.getPSUIAction().getPSAppCounter()??>
<#assign uiaction = item.getPSUIAction() />
<#assign counter = uiaction.getPSAppCounter() />
<Badge type="primary" v-show="${ModelsName}.${item.name}.visabled" :count="${srfclassname('${counter.getCodeName()}')}counterservice.counterData.<#if uiaction.getCounterId()??>${uiaction.getCounterId()}</#if>">
<Badge type="primary" v-show="${ModelsName}.${item.name}.visabled" :count="${counter.getCodeName()?lower_case}counterservice.counterData.<#if uiaction.getCounterId()??>${uiaction.getCounterId()}</#if>">
</#if>
<i-button v-show="${ModelsName}.${item.name}.visabled" :disabled="${ModelsName}.${item.name}.disabled" class='<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)">
<#if item.isShowIcon()><i class='<#if item.getPSSysImage()??><#assign img=item.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i></#if>
......
......@@ -530,7 +530,7 @@ ${P.getLogicCode(singleFuncs,"LOGIC.vue").code}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public handleMenusResource(inputMenus:Array<any>){
if(Environment.enablePermissionValid){
if(this.$store.getters['authresource/getEnablePermissionValid']){
this.computedEffectiveMenus(inputMenus);
this.computeParentMenus(inputMenus);
}
......
<#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>
<template v-for="(item,index) in menus" >
<card :bordered="false" dis-hover :key = "index">
......
......@@ -2,7 +2,7 @@
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
/*** BEGIN:potal菜单 ***/
.app-app-menu{
.app-quick-menus{
>.ivu-row{
.ivu-card{
.ivu-card-body{
......
......@@ -31,6 +31,7 @@
</div>
</#if>
<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">
<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)">
......@@ -53,12 +54,51 @@
</el-card>
</i-col>
</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>
<div v-else class="app-data-empty">{{ $t('app.commonWords.noData') }}</div>
<el-backtop target=".content-container .app-data-view"></el-backtop>
</div>
</#if>
</template>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
......@@ -161,6 +201,148 @@
*/
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 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public afterMounted(){
<#if !ctrl.isEnablePagingBar()>
<#if ctrl.isEnablePagingBar()>
this.$el.addEventListener('scroll', ()=> {
if( this.$el.scrollTop + this.$el.clientHeight >= this.$el.scrollHeight) {
this.loadMore();
......@@ -459,6 +641,9 @@
if(this.isSelectFirstDefault){
this.handleClick(this.items[0]);
}
<#if ctrl.isEnableGroup?? && ctrl.isEnableGroup()>
this.group();
</#if>
}, (response: any) => {
if (response && response.status === 401) {
return;
......@@ -533,8 +718,11 @@
//删除items中已删除的项
_datas.forEach((data: any) => {
this.items.some((item:any,index:number)=>{
if(Object.is(item.srfkey,data.srfkey)){
this.items.splice(index,1);
if(Object.is(item.srfkey,data.srfkey)){
this.items.splice(index,1);
<#if ctrl.isEnableGroup?? && ctrl.isEnableGroup()>
this.group();
</#if>
return true;
}
});
......
......@@ -72,6 +72,16 @@
height: 100%;
</#if>
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{
padding: 10px;
.el-card__body{
......@@ -136,6 +146,9 @@
justify-content: center;
align-items: center;
}
.el-backtop {
position: absolute;
}
}
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
......
......@@ -96,8 +96,9 @@ import FullCalendar from '@fullcalendar/vue'
import dayGridPlugin from '@fullcalendar/daygrid'
import timeGridPlugin from '@fullcalendar/timegrid';
import listPlugin from '@fullcalendar/list';
import interactionPlugin from '@fullcalendar/interaction'
import ContextMenu from '@components/context-menu/context-menu'
import interactionPlugin from '@fullcalendar/interaction';
import ContextMenu from '@components/context-menu/context-menu';
import UIService from '@/uiservice/ui-service';
</#assign>
<#assign component_block>
......@@ -333,6 +334,34 @@ FullCalendar,
*/
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,
<#assign batchToolbar = ctrl.getBatchPSDEToolbar()/>
${P.getCtrlCode(batchToolbar, 'CONTROL.vue').code}
</#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,
public eventRender(info?:any,) {
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) => {
event.preventDefault();
let props = { data: data, renderContent: this.renderContextMenu };
let component = ContextMenu;
const vm:any = new Vue({
render(h) {
return h(component, { props });
this.copyActionModel = {};
Object.values(this.actionModel).forEach((item:any) =>{
if(Object.is(item.nodeOwner,data.itemType)){
this.copyActionModel[item.name] = item;
}
}).$mount();
document.body.appendChild(vm.$el);
const comp: any = vm.$children[0];
comp.showContextMenu(event.clientX, event.clientY);
})
if(Object.keys(this.copyActionModel).length === 0){
return;
}
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 @@
:filter-node-method="filterNode"
>
<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">
<div class="tree-node" @dblclick="doDefaultAction(node)">
<span class="icon">
......@@ -51,6 +51,10 @@
</div>
</#if>
</template>
<#assign import_block>
import { Environment } from '@/environments/environment';
import UIService from '@/uiservice/ui-service';
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
......@@ -253,6 +257,35 @@
*/
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 @@
if (Object.is('refresh_parent', action)) {
this.refresh_parent();
}
if (Object.is('refresh_current', action)) {
this.refresh_current();
}
});
}
if(AppCenterService && AppCenterService.getMessageCenter()){
......@@ -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 @@
if (parentnode) {
this.currentselectedNode = {};
}
this.$forceUpdate();
this.setDefaultSelection(_items);
}).catch((response: any) => {
if (response && response.status === 401) {
......@@ -649,10 +713,12 @@
*/
public renderContextMenu(node: any) {
let content;
if (node && node.data) {
const data: any = JSON.parse(JSON.stringify(node.data));
this.currentselectedNode = { ...data };
const tags: string[] = data.id.split(';');
let copyActionModel:any =Util.deepCopy(this.actionModel);
<#if ctrl.getPSControls()??>
<#list ctrl.getPSControls() as childCtrl>
<#if childCtrl.getControlType() == "CONTEXTMENU">
......@@ -672,7 +738,6 @@
/**
* 绘制${childCtrl.getOwner().getNodeType()}类型右键菜单
*
* @param {*} node
* @returns
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
......@@ -687,6 +752,67 @@ ${P.getCtrlCode(childCtrl, 'CONTROL.html').code}
</#list>
</#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
<#-- 补充nodeid和nodeid2 -->
Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
<#-- 补充节点类型 -->
Object.assign(treeNode, { nodeType: "${node.getTreeNodeType()}" });
list.push(treeNode);
resolve(list);
});
......@@ -362,6 +364,12 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#-- 补充nodeid和nodeid2 -->
Object.assign(item, { nodeid: item.srfkey });
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.forEach((item:any) => {
......@@ -434,6 +442,12 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#-- 补充nodeid和nodeid2 -->
Object.assign(treeNode, { nodeid: treeNode.srfkey });
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);
resolve(list);
})
......@@ -563,6 +577,8 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#-- 补充nodeid和nodeid2 -->
Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
<#-- 补充节点类型 -->
Object.assign(treeNode, { nodeType: "${node.getTreeNodeType()}",appEntityName:"${node.getPSAppDataEntity().getCodeName()?lower_case}" });
list.push(treeNode);
resolve(list);
bFirst = false;
......
......@@ -43,6 +43,8 @@
:viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)"
@viewdataschange="onViewDatasChange"
@drdatasaved="onDrViewDatasChange"
@drdatasremove="onDrViewDatasChange"
@viewdatasactivated="viewDatasActivated"
@viewload="onViewLoad">
</component>
......@@ -379,6 +381,19 @@
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';
public saveState:any ;
/**
* 属性值规则
* 值规则
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
......@@ -739,20 +739,18 @@ import { Environment } from '@/environments/environment';
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public computeButtonState(data:any){
if(Environment.enablePermissionValid){
let targetData:any = this.transformData(data);
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].detailType,"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.detailsModel[name].visible = tempUIAction.visabled;
this.detailsModel[name].disabled = tempUIAction.disabled;
this.detailsModel[name].isPower = result[0] === 1 ? true : false;
}
})
}
let targetData:any = this.transformData(data);
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].detailType,"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.detailsModel[name].visible = tempUIAction.visabled;
this.detailsModel[name].disabled = tempUIAction.disabled;
this.detailsModel[name].isPower = result[0] === 1 ? true : false;
}
})
}
}
......
......@@ -117,7 +117,7 @@
<span>${item.render.code}</span>
<#-- END:列绘制 -->
<#else>
<template v-if="actualIsOpenEdit">
<template v-if="actualIsOpenEdit && !row.children">
<app-form-item :error="gridItemsModel[$index][column.property].error">
${P.getEditorCode(item, "GRIDEIDTOR.vue").code}
</app-form-item>
......
......@@ -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>
../@MACRO/CSS/DEFAULT.less.ftl
......
......@@ -10,6 +10,14 @@
</div>
</#if>
<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()>
<div class='search-container'>
<i-input :search="true"
......@@ -52,6 +60,13 @@
</#if>
</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>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
......@@ -101,6 +116,17 @@
*/
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
*
......@@ -194,6 +220,116 @@
*/
public navigateParams:any = <#if xDataControl.getPSNavigateParams?? && xDataControl.getPSNavigateParams()??><@getNavigateParams xDataControl /><#else>null</#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 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public afterCreated(){
<#if view.isEnableQuickGroup()>
this.loadQuickGroupModel();
</#if>
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
......
......@@ -96,7 +96,7 @@
}
.container-header{
display: flex;
justify-content: space-between;
justify-content: flex-start;
align-items: center;
.search-container {
width: 30%;
......@@ -108,6 +108,9 @@
.toolbar-container{
padding: 4px;
}
.quick-group-container {
padding-right: 20px;
}
}
.grid-exp-bar-content {
<#-- 计算高度 -->
......
......@@ -19,7 +19,7 @@ ${P.getCtrlCode('grid', 'CONTROL.html').code}
<div style='margin-bottom: 6px;'>
<#if view.isEnableQuickGroup()>
<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>
</#if>
<#if view.getQuickPSDESearchForm()??>
......
......@@ -17,7 +17,7 @@
<div style="margin-bottom:6px;">
<#if view.isEnableQuickGroup()>
<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>
</#if>
<#if view.getQuickPSDESearchForm()??>
......
......@@ -14,7 +14,7 @@
<div style="margin-bottom:6px;">
<#if view.isEnableQuickGroup()>
<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>
</#if>
<#if view.getQuickPSDESearchForm()??>
......
......@@ -17,7 +17,7 @@
<div style="margin-bottom:6px;">
<#if view.isEnableQuickGroup()>
<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>
</#if>
<#if view.getQuickPSDESearchForm()??>
......
......@@ -13,7 +13,7 @@
<div style="margin-bottom:6px;">
<#if view.isEnableQuickGroup()>
<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>
</#if>
<#if view.getQuickPSDESearchForm()??>
......
......@@ -136,7 +136,7 @@ import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.code
public onViewDatasChange($event: any): void {
if($event.length>0){
$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){
Object.assign($event[index],{srfmajortext: srfmajortext});
}
......
......@@ -206,7 +206,7 @@ import { Environment } from '@/environments/environment';
icon:"<#if uiaction.getIconCls?? && uiaction.getIconCls()??>${uiaction.getIconCls()}</#if>",
<#if uiaction.getPSAppCounter?? && 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>
noprivdisplaymode:<#if uiaction.getNoPrivDisplayMode(view)??>${uiaction.getNoPrivDisplayMode(view)}<#else>''</#if>,
dataaccaction:'<#if uiaction.getDataAccessAction()??>${uiaction.getDataAccessAction()}</#if>',
......
<#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.getPSSysImage()??>
<#assign image = item.getPSSysImage()>
<i class="${image.getCssClass()}"></i>
</#if>
<#if item.isShowCaption()>
<span<#if item.getLabelPSSysCss()??> class="${item.getLabelPSSysCss().getCssName()}"</#if><#if item.getLabelPSSysCss()??> style="${item.getLabelPSSysCss().getRawCssStyle()}"</#if>>${item.getCaption()}</span>
</#if>
</i-button>
<#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="BUTTON"
:showCaption="<#if item.isShowCaption?? && item.isShowCaption()??>${item.isShowCaption()?c}<#else>true</#if>"
<#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>
<#ibizinclude>
./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude>
<#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}
</div>
<#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}
</i-col>
</#if>
\ No newline at end of file
......@@ -3,18 +3,11 @@
./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude>
<#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??>
${item.render.code}
<#else>
<#-- <#if item.isShowCaption()>
<#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>">
<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>">
<@ibizindent blank=8>
<#if item.getPSPanelItems()??>
<#list item.getPSPanelItems() as panelItem>
......@@ -24,20 +17,13 @@
</@ibizindent>
</div>
</#if>
</div>
</i-col>
<#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??>
${item.render.code}
<#else>
<#-- <#if item.isShowCaption()>
<#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>">
<row style="height:100%;">
<@ibizindent blank=8>
<#if item.getPSPanelItems()??>
<#list item.getPSPanelItems() as panelItem>
......
......@@ -6,11 +6,11 @@ ${P.getCtrlCode(item.getPSControl(), 'CONTROL.html').code}
./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude>
<#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}
</div>
<#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}
</i-col>
</#if>
\ No newline at end of file
......@@ -14,7 +14,7 @@ ${P.getCtrlCode('${item.name}', 'CONTROL.html').code}
${content}
</div>
<#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}
</i-col>
</#if>
\ No newline at end of file
<#if !item.isHidden()>
<#assign selfContent>
<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>
<div class="item-field-content">
<#if item.render??>
${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}
</div>
</app-panel-field>
</#if>
</div>
</#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'>
new PanelContainerModel({ ${detail} })
<#elseif item.getItemType() == 'RAWITEM'>
......@@ -8,7 +8,11 @@ new PanelFieldModel({ ${detail} })
<#elseif item.getItemType() == 'CONTROL'>
new PanelControlModel({ ${detail} })
<#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'>
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>
\ No newline at end of file
<#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>
<#ibizinclude>
./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude>
<#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}
</div>
<#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}
</i-col>
</#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>
./@MACRO/PLAYOUT.vue.ftl
</#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??>
${item.render.code}
<#else>
<@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>
</#if>
</div>
\ No newline at end of file
</i-col>
\ No newline at end of file
<#assign selfContent>
<#if item.render??>
${item.render.code}
<#else>
面板自定义插件没有定义插件
</#if>
</#assign>
<#ibizinclude>
./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude>
<#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}
</div>
<#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}
</i-col>
</#if>
\ No newline at end of file
<#if ctrl.render??>
${ctrl.render.code}
<#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'>
<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>
<#if ctrl.getRootPSPanelItems()??>
<#list ctrl.getRootPSPanelItems() as item>
......@@ -11,9 +10,9 @@ ${P.getPartCode(item).code}
</#list>
</#if>
</@ibizindent>
</div>
</row>
<#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>
<#if ctrl.getRootPSPanelItems()??>
<#list ctrl.getRootPSPanelItems() as item>
......@@ -23,5 +22,4 @@ ${P.getPartCode(item).code}
</@ibizindent>
</row>
</#if>
</div>
</#if>
\ No newline at end of file
......@@ -2,7 +2,7 @@
${P.getPartCode(item,'PANEL').code}
</template>
<#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 CodeListService from "@service/app/codelist-service";
</#assign>
......@@ -30,7 +30,7 @@ import CodeListService from "@service/app/codelist-service";
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
getData() {
return this.data;
return this.panelData;
}
/**
......@@ -50,61 +50,77 @@ import CodeListService from "@service/app/codelist-service";
@Prop() public inputData?: any;
/**
* 代码表服务对象
* UI数据对象
*
* @type {CodeListService}
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store:this.$store });
public data:any = {};
/**
* 详情模型集合
* 面板数据对象
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public detailsModel: any = {
<#list ctrl.getAllPSPanelItems() as panelItems>
${panelItems.name}: new FormItemModel({ visible: <#if panelItems.getPSPanelItemGroupLogic('PANELVISIBLE')??>false<#else>true</#if>, disabled: false, enableCond: 3 }),
</#list>
};
public panelData:any = null;
/**
* 面板逻辑
* 数据模型对象
*
* @public
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @type {${srfclassname('${ctrl.codeName}')}Model}
* @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>
}
public dataModel:${srfclassname('${ctrl.codeName}')}Model = new ${srfclassname('${ctrl.codeName}')}Model();
/**
* 数据模型对象
* 代码表服务对象
*
* @type {${srfclassname('${ctrl.codeName}')}Model}
* @type {CodeListService}
* @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 {*}
* @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 {*}
* @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";
public onInputDataChange(newVal: any, oldVal: any){
if(newVal){
this.computedUIData(newVal);
this.panelData = Util.deepCopy(newVal);
this.computeButtonState(newVal);
this.panelLogic({ name: '', newVal: null, oldVal: null });
this.$forceUpdate();
}
......@@ -135,18 +153,28 @@ import CodeListService from "@service/app/codelist-service";
}
/**
* 计算面板数据
*
* @memberof Mob
* 计算面板按钮权限状态
*
* @param {*} [data] 传入数据
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public computeOutputData(){
let panelData:any = {};
if((this.dataModel.getDataItems instanceof Function) && this.dataModel.getDataItems().length >0){
this.dataModel.getDataItems().forEach((item:any) =>{
panelData[item.prop] = this.data[item.name];
})
public computeButtonState(data:any){
// 若为项布局面板,存在parentRef
if(this.parentRef){
let targetData:any = this.parentRef.transformData(data);
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";
* @param {*} $event
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public async uiAction(row: any, tag: any, $event: any) {
await this.computeOutputData();
public uiAction(row: any, tag: any, $event: any) {
<#if ctrl.getPSAppViewLogics()??>
<#list ctrl.getPSAppViewLogics() as logic>
<#if logic.getPSAppViewUIAction().getPSUIAction()??>
......@@ -212,7 +239,7 @@ import CodeListService from "@service/app/codelist-service";
* 刷新
*
* @param {*} [opt={}]
* @memberof Main
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public refresh(opt: any = {}) {
if (this.parentRef.refresh && this.parentRef.refresh instanceof Function) {
......@@ -220,7 +247,6 @@ 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>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
.app-layoutpanel {
height: 100%;
> .app-layoutpanel-container {
height: 100%;
.app-layoutpanel-container {
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{
padding: 0 4px;
......
......@@ -2,12 +2,10 @@
${item.render.code}
<#else>
<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}"
style="${item.getEditorCssStyle()}"
type="text"
:disabled="detailsModel.${item.getCodeName()}.disabled"
<#if item.getUnitName?? && item.getUnitName()??>unit="${item.getUnitName()}"</#if>
<#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if>
@change="($event)=>{panelEditItemChange(data, '${editor.getName()?lower_case}', $event)}">
......
<#if item.render??>
${item.render.code}
<#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>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<dropdown-list
v-model="data.${editor.name?lower_case}"
<#if item.getEnableCond??>
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled"
:data="data"
:context="context"
:viewparams="viewparams"
......
......@@ -4,9 +4,7 @@
<#else>
<dropdown-list
v-model="data.${editor.name?lower_case}"
<#if item.getEnableCond??>
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled"
:data="data"
:context="context"
:viewparams="viewparams"
......
......@@ -4,9 +4,7 @@
<#else>
<dropdown-list
v-model="data.${editor.name?lower_case}"
<#if item.getEnableCond??>
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled"
:data="data"
:context="context"
:viewparams="viewparams"
......
......@@ -9,9 +9,7 @@
:viewparams="viewparams"
:localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
<#if item.getEnableCond??>
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled"
<#if item.getPSCodeList()??>
<#assign codelist=editor.getPSCodeList()>
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 @@
<#else>
<app-radio-group
v-model="data.${editor.name?lower_case}"
<#if item.getEnableCond??>
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled"
name="${editor.name?lower_case}"
:data="data"
:context="context"
......
......@@ -8,9 +8,7 @@
:data="JSON.stringify(data)"
name='${editor.name?lower_case}'
:value="data.${editor.name?lower_case}"
<#if item.getEnableCond??>
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled"
:rowPreview="true"
:imageOnly="true"
:uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>'
......
......@@ -8,9 +8,7 @@
:data="JSON.stringify(data)"
name='${editor.name?lower_case}'
:value="data.${editor.name?lower_case}"
<#if item.getEnableCond??>
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled"
:rowPreview="true"
:imageOnly="true"
: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 @@
<div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type">
<textarea
class="ivu-input"
<#if item.getEnableCond??>
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled"
v-model="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}"
<#if item.getPlaceHolder?? && item.getPlaceHolder()??>
......
......@@ -4,9 +4,7 @@
<div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type">
<textarea
class="ivu-input"
<#if item.getEnableCond??>
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled"
rows="10"
v-model="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}"
......
......@@ -3,9 +3,7 @@
<#else>
<input-box
type="password"
<#if item.getEnableCond??>
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled"
v-model="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}"
@change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}">
......
......@@ -5,9 +5,7 @@
name='${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)} "
<#if item.getEnableCond??>
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled"
style="${item.getEditorCssStyle()}">
</app-switch>
</#if>
\ No newline at end of file
......@@ -3,9 +3,7 @@
<#else>
<input-box
type="number"
<#if item.getEnableCond??>
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled"
<#if item.getUnitName?? && item.getUnitName()??>unit="${item.getUnitName()}"</#if>
:precision="2"
v-model="data.${editor.name?lower_case}"
......
......@@ -13,10 +13,18 @@
:localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled"
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()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
:service="service"
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#if editor.getPSAppDEACMode().getMinorSortPSDEF?? && editor.getPSAppDEACMode().getMinorSortPSDEF()?? && editor.getPSAppDEACMode().getMinorSortDir?? && editor.getPSAppDEACMode().getMinorSortDir()??>
......
......@@ -13,10 +13,18 @@
:localParam =<@getNavigateParams editor />
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
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()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
:service="service"
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#if editor.getPSAppDEACMode().getMinorSortPSDEF?? && editor.getPSAppDEACMode().getMinorSortPSDEF()?? && editor.getPSAppDEACMode().getMinorSortDir?? && editor.getPSAppDEACMode().getMinorSortDir()??>
......
......@@ -11,12 +11,20 @@
:viewparams="viewparams"
:localContext =<@getNavigateContext 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}'
<#-- 自填模式文本属性、值属性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()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
:service="service"
:acParams=<@getAcParams editor />
valueitem='${editor.getValueItemName()}'
......
......@@ -36,10 +36,18 @@
</#if>
<#-- 自填模式界面行为组end -->
</#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()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
:service="service"
:acParams=<@getAcParams editor />
valueitem='${editor.getValueItemName()}'
......
......@@ -34,10 +34,18 @@
</#if>
<#-- 自填模式界面行为组end -->
</#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()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
:service="service"
:acParams=<@getAcParams editor />
valueitem='${item.getValueItemName()}'
......
......@@ -11,10 +11,18 @@
:localParam =<@getNavigateParams editor />
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
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()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
:service="service"
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#if editor.getPSAppDEACMode().getMinorSortPSDEF?? && editor.getPSAppDEACMode().getMinorSortPSDEF()?? && editor.getPSAppDEACMode().getMinorSortDir?? && editor.getPSAppDEACMode().getMinorSortDir()??>
......
......@@ -36,10 +36,18 @@
</#if>
<#-- 自填模式界面行为组end -->
</#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()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
:service="service"
:acParams=<@getAcParams editor />
valueitem='${editor.getValueItemName()}'
......
......@@ -13,10 +13,18 @@
:localParam =<@getNavigateParams editor />
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
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()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
:service="service"
:acParams=<@getAcParams editor />
valueitem='${editor.getValueItemName()}'
......
......@@ -13,10 +13,18 @@
:localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled"
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()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
valueitem='${editor.getValueItemName()}'
:value="data.${editor.name}"
editortype="pickup-no-ac"
......
......@@ -13,10 +13,18 @@
:localParam =<@getNavigateParams editor />
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
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()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
valueitem='${editor.getValueItemName()}'
:value="row[column.property]"
editortype="pickup-no-ac"
......
......@@ -13,10 +13,18 @@
:localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled"
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()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if>
</#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
valueitem='${editor.getValueItemName()}'
:value="data.${editor.name}"
editortype="pickup-no-ac"
......
......@@ -13,10 +13,18 @@
:localParam =<@getNavigateParams editor />
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
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()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if>
</#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
valueitem='${editor.getValueItemName()}'
:value="row[column.property]"
editortype="pickup-no-ac"
......
......@@ -14,10 +14,18 @@
:disabled="detailsModel.${editor.name}.disabled"
:showButton="false"
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()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
</#if>
</#if>
<#-- 自填模式文本属性、值属性end -->
:service="service"
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#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 @@
:data="JSON.stringify(data)"
name='${editor.name?lower_case}'
:value="data.${editor.name?lower_case}"
<#if item.getEnableCond??>
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled"
:rowPreview="true"
:uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>'
:exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>'
......
......@@ -6,9 +6,7 @@
:data="JSON.stringify(data)"
name='${editor.name?lower_case}'
:value="data.${editor.name?lower_case}"
<#if item.getEnableCond??>
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled"
:rowPreview="true"
:uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>'
:exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>'
......
......@@ -6,9 +6,7 @@
:transfer="true"
format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择时间..."
<#if item.getEnableCond??>
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled"
:value="data.${editor.name?lower_case}"
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)}">
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册