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

2020.5.14 更新

上级 6b36ad0e
......@@ -300,8 +300,9 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
Data.${appde.getKeyPSAppDEField().getCodeName()?lower_case} = Util.createUUID();
Data.${appde.getCodeName()?lower_case} = Data.${appde.getKeyPSAppDEField().getCodeName()?lower_case};
const PrimaryKey = Util.createUUID();
Data.${appde.getKeyPSAppDEField().getCodeName()?lower_case} = PrimaryKey;
Data.${appde.getCodeName()?lower_case} = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
......@@ -311,6 +312,7 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.${appde.getKeyPSAppDEField().getCodeName()?lower_case} = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
......
<template>
<div :class="['app-list', this.items.length > 0 ? '' : 'app-list-empty' ]">
<div v-if="items.length > 0">
<div v-if="items.length > 0" style="height:100%;">
<#if ctrl.render??>
${ctrl.render.code}
<#else>
......
......@@ -3,6 +3,7 @@
</#ibizinclude>
.app-list {
height:100%;
flex-grow: 1;
overflow-y: auto;
.app-list-item {
......@@ -16,6 +17,7 @@
}
}
.app-list-empty {
height:100%;
color: #909399;
display: flex;
justify-content: center;
......
......@@ -2,14 +2,19 @@
<#ibizinclude>
../@MACRO/CONTROL/LANGBASE.vue.ftl
</#ibizinclude>
<#if ctrl.getName() != 'toolbar'>
<#assign ModelsName>${ctrl.getCodeName()?lower_case}Models</#assign>
<#else>
<#assign ModelsName = 'toolBarModels' />
</#if>
<#assign deuiaction=item.getPSUIAction()>
<#if item.getTooltip()?? && item.getTooltip() != ''>
<tooltip :transfer="true" :max-width="600">
<#if deuiaction.getUIActionTag() == 'ExportExcel'>
<app-export-excel :item="toolBarModels.${item.name}" :caption="$t('${langbase}.${item.name}.caption')" @exportexcel="${ctrl.name}_click({ tag: '${item.name}' }, $event)"></app-export-excel>
<app-export-excel :item="${ModelsName}.${item.name}" :caption="$t('${langbase}.${item.name}.caption')" @exportexcel="${ctrl.name}_click({ tag: '${item.name}' }, $event)"></app-export-excel>
<#else>
<@badge item>
<i-button v-show="toolBarModels.${item.name}.visabled" :disabled="toolBarModels.${item.name}.disabled" class='<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)">
<i-button v-show="${ModelsName}.${item.name}.visabled" :disabled="${ModelsName}.${item.name}.disabled" class='<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)">
<#if item.isShowIcon()><i class='<#if item.getPSSysImage()??><#assign img=item.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i></#if>
<#if item.isShowCaption()><span class='caption'>{{<#if langbase??>$t('${langbase}.${item.name}.caption')<#else>'${item.getCaption()}'</#if>}}</span></#if>
</i-button>
......@@ -19,10 +24,10 @@
</tooltip>
<#else>
<#if deuiaction.getUIActionTag() == 'ExportExcel'>
<app-export-excel :item="toolBarModels.${item.name}" :caption="$t('${langbase}.${item.name}.caption')" @exportexcel="${ctrl.name}_click({ tag: '${item.name}' }, $event)"></app-export-excel>
<app-export-excel :item="${ModelsName}.${item.name}" :caption="$t('${langbase}.${item.name}.caption')" @exportexcel="${ctrl.name}_click({ tag: '${item.name}' }, $event)"></app-export-excel>
<#else>
<@badge item>
<i-button v-show="toolBarModels.${item.name}.visabled" :disabled="toolBarModels.${item.name}.disabled" class='<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)">
<i-button v-show="${ModelsName}.${item.name}.visabled" :disabled="${ModelsName}.${item.name}.disabled" class='<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)">
<#if item.isShowIcon()><i class='<#if item.getPSSysImage()??><#assign img=item.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i></#if>
<#if item.isShowCaption()><span class='caption'>{{<#if langbase??>$t('${langbase}.${item.name}.caption')<#else>'${item.getCaption()}'</#if>}}</span></#if>
</i-button>
......
......@@ -2,7 +2,12 @@
<#ibizinclude>
../@MACRO/CONTROL/LANGBASE.vue.ftl
</#ibizinclude>
<dropdown v-show="toolBarModels.${item.name}.visabled" trigger='click'>
<#if ctrl.getName() != 'toolbar'>
<#assign ModelsName>${ctrl.getCodeName()?lower_case}Models</#assign>
<#else>
<#assign ModelsName = 'toolBarModels' />
</#if>
<dropdown v-show="${ModelsName}.${item.name}.visabled" trigger='click'>
<#if item.getTooltip()?? && item.getTooltip() != ''>
<tooltip :transfer="true" :max-width="600">
<@badge item>
......
<#if ctrl.getName() != 'toolbar'>
<#assign ModelsName>${ctrl.getCodeName()?lower_case}Models</#assign>
<#else>
<#assign ModelsName = 'toolBarModels' />
</#if>
<div class='toolbar-container'>
<#if (view.getPSWorkflow?? && view.getPSWorkflow()??) && (view.isWFIAMode?? && view.isWFIAMode()) && (view.getWFStepValue?? && view.getWFStepValue() == "") && (view.getViewType?? && (view.getViewType() == 'DEWFEDITVIEW3' || view.getViewType() == 'DEWFEDITVIEW'))><#t>
<template v-for="item in containerModel.wflinks">
......
<#-- 工具栏模型 -->
<#if ctrl.getName() != 'toolbar'>
<#assign ModelsName>${ctrl.getCodeName()?lower_case}Models</#assign>
<#else>
<#assign ModelsName = 'toolBarModels' />
</#if>
/**
* 工具栏模型
*
* @type {*}
* @memberof ${srfclassname('${view.name}')}
*/
public toolBarModels: any = {
public ${ModelsName}: any = {
<#if ctrl.getPSDEToolbarItems()??>
<#list ctrl.getPSDEToolbarItems() as item>
${P.getPartCode(item).code}
......
......@@ -355,7 +355,9 @@ import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.code
if (Object.keys(item).length === 0) {
return;
}
this.click(item);
if(!item.hidden){
this.click(item);
}
}
/**
......@@ -495,6 +497,19 @@ ${P.getLogicCode(singleFuncs,"LOGIC.vue").code}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public load(data: any) {
this.handleMenusResource(this.menuMode.getAppMenuItems());
}
/**
* 通过统一资源标识计算菜单
*
* @param {*} data
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public handleMenusResource(inputMenus:Array<any>){
if(this.$store.getters['unifiedresource/getEnablePermissionValid']){
this.computedEffectiveMenus(inputMenus);
}
this.dataProcess(this.menuMode.getAppMenuItems());
this.menus = this.menuMode.getAppMenuItems();
<#if view.isDefaultPage?? && view.isDefaultPage()>
......@@ -502,6 +517,23 @@ ${P.getLogicCode(singleFuncs,"LOGIC.vue").code}
</#if>
}
/**
* 计算有效菜单项
*
* @param {*} data
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public computedEffectiveMenus(inputMenus:Array<any>){
inputMenus.forEach((_item:any) =>{
if(_item.resourcetag && !this.$store.getters['unifiedresource/getResourceData'](_item.resourcetag)){
_item.hidden = true;
if (_item.items && _item.items.length > 0) {
this.computedEffectiveMenus(_item.items);
}
}
})
}
/**
* 数据处理
*
......
......@@ -49,11 +49,13 @@
</#if>
</row>
</i-col>
<#if ctrl.getFormStyle() != "SEARCHBAR">
<i-col span="4" class="search-button">
<row v-show="Object.keys(data).length>0">
<i-button class='search_reset' size="default" type="primary" @click="onSearch">{{$t('app.searchButton.search')}}</i-button>
<i-button class='search_reset' size="default" @click="onReset">{{this.$t('app.searchButton.reset')}}</i-button>
</row>
</i-col>
</#if>
</row>
</i-form>
\ No newline at end of file
......@@ -228,6 +228,10 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.resetFormData({ name: name, newVal: newVal, oldVal: oldVal });
this.formLogic({ name: name, newVal: newVal, oldVal: oldVal });
this.dataChang.next(JSON.stringify(this.data));
<#-- 搜索栏值变更抛值 -->
<#if ctrl.getFormStyle() == "SEARCHBAR">
this.$emit('valuechange',this.data);
</#if>
}
/**
......@@ -717,7 +721,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
if (!this.formValidateStatus()) {
return;
}
this.$emit('load', this.data);
this.$emit('search', this.data);
</#if>
}
<#-- 搜索表单:Begin -->
......@@ -733,7 +737,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
if (!this.formValidateStatus()) {
return;
}
this.$emit('load', this.data);
this.$emit('search', this.data);
}
/**
......@@ -756,7 +760,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
if (!this.formValidateStatus()) {
return;
}
this.$emit('load', this.data);
this.$emit('search', this.data);
}
</#if>
</#if>
......
......@@ -2,10 +2,11 @@
<#assign content>
:showBusyIndicator="${ctrl.isShowBusyIndicator()?c}"
<#if view.isExpandSearchForm??>
v-show="isExpandSearchForm"
v-show="<#if ctrl.getFormStyle() == "SEARCHBAR">true<#else>isExpandSearchForm</#if>"
</#if>
loaddraftAction="<#if ctrl.getGetDraftPSControlAction()?? && ctrl.getGetDraftPSControlAction().getPSAppDEMethod()??>${ctrl.getGetDraftPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
loadAction="<#if ctrl.getGetPSControlAction()?? && ctrl.getGetPSControlAction().getPSAppDEMethod()??>${ctrl.getGetPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
<#if ctrl.getFormStyle() == "SEARCHBAR">@valuechange="qucikFormValueChange"</#if>
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
......
......@@ -18,7 +18,7 @@
</#if>
<#if layout == 'TABLE_24COL' && LayoutPos??><#t>
<i-col<#if LayoutPos.getColXS() != -1> :xs="{ span: ${LayoutPos.getColXS()}, offset: <#if LayoutPos.getColXSOffset() != -1>${LayoutPos.getColXSOffset()}<#else>0</#if>}"</#if><#if LayoutPos.getColSM() != -1> :sm="{ span: ${LayoutPos.getColSM()}, offset: <#if LayoutPos.getColSMOffset() != -1>${LayoutPos.getColSMOffset()}<#else>0</#if>}"</#if><#if LayoutPos.getColMD() != -1> :md="{ span: ${LayoutPos.getColMD()}, offset: <#if LayoutPos.getColMDOffset() != -1>${LayoutPos.getColMDOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColLG() != -1> :lg="{ span: ${LayoutPos.getColLG()}, offset: <#if LayoutPos.getColLGOffset() != -1>${LayoutPos.getColLGOffset()}<#else>0</#if> }"</#if>>
<card :bordered="false" dis-hover :padding="0">
<card class="portlet-card" :bordered="false" dis-hover :padding="0">
<#if portlet.isShowTitleBar() && portlet.getTitle()?has_content>
<p slot='title'>
${portlet.getTitle()}
......@@ -34,7 +34,7 @@ ${P.getCtrlCode(portlet, 'CONTROL.html').code}
</card>
</i-col>
<#else>
<card :bordered="false" dis-hover :padding="0">
<card class="portlet-card" :bordered="false" dis-hover :padding="0">
<#if portlet.isShowTitleBar() && portlet.getTitle()?has_content><#t>
<p slot='title'>
${portlet.getTitle()}
......@@ -49,7 +49,7 @@ ${P.getCtrlCode(portlet, 'CONTROL.html').code}
</card>
</#if>
<#if layout == 'FLEX'>
<card :bordered="false" dis-hover :padding="0">
<card class="portlet-card" :bordered="false" dis-hover :padding="0">
<#if portlet.isShowTitleBar() && portlet.getTitle()?has_content><#t>
<p slot='title'>
${portlet.getTitle()}
......
......@@ -455,28 +455,11 @@
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public computecurNodeContext(curNode:any){
let tempContext:any = JSON.parse(JSON.stringify(this.context));
while(curNode){
if(curNode.data && curNode.data.id){
let strTreeNodeId:string = curNode.data.id;
let strNodeType:string = strTreeNodeId.substring(0, strTreeNodeId.indexOf(";")).toLowerCase();
let strRealNodeValue:string = curNode.data.srfkey;
let strNodeKey:string = curNode.data.srfappctxkey?curNode.data.srfappctxkey:strNodeType;
if(!tempContext[strNodeKey]){
Object.defineProperty(tempContext, strNodeKey, {
value: strRealNodeValue,
writable: true,
enumerable: true,
configurable: true
});
}
if(tempContext[strNodeKey]){
curNode = null;
}
}
if(curNode){
curNode = curNode.parent;
}
let tempContext:any = {};
if(curNode && curNode.data && curNode.data.srfappctx){
tempContext = JSON.parse(JSON.stringify(curNode.data.srfappctx));
}else{
tempContext = JSON.parse(JSON.stringify(this.context));
}
return tempContext;
}
......
......@@ -476,9 +476,10 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#else>
let strText: string = entity.${node.getPSAppDataEntity().getMajorPSAppDEField().codeName?lower_case};
</#if>
Object.assign(treeNode,{srfparentdename:'${node.getPSAppDataEntity().getCodeName()}',srfparentkey: <#if node.getIdPSDEField()??>entity.${node.getIdPSDEField().codeName?lower_case}<#else>entity.${node.getPSAppDataEntity().getKeyPSAppDEField().codeName?lower_case}</#if>});
Object.assign(treeNode,{srfappctxkey:'${node.getPSAppDataEntity().getCodeName()?lower_case}'});
Object.assign(treeNode,{srfappctx:{'${node.getPSAppDataEntity().getCodeName()?lower_case}':strId}});
Object.assign(treeNode,{srfparentdename:'${node.getPSAppDataEntity().getCodeName()}',srfparentkey:<#if node.getIdPSDEField()??>entity.${node.getIdPSDEField().codeName?lower_case}<#else>entity.${node.getPSAppDataEntity().getKeyPSAppDEField().codeName?lower_case}</#if>});
let tempContext:any = JSON.parse(JSON.stringify(context));
Object.assign(tempContext,{srfparentdename:'${node.getPSAppDataEntity().getCodeName()}',srfparentkey:<#if node.getIdPSDEField()??>entity.${node.getIdPSDEField().codeName?lower_case}<#else>entity.${node.getPSAppDataEntity().getKeyPSAppDEField().codeName?lower_case}</#if>,${node.getPSAppDataEntity().getCodeName()?lower_case}:strId})
Object.assign(treeNode,{srfappctx:tempContext});
Object.assign(treeNode,{'${node.getPSAppDataEntity().getCodeName()?lower_case}':strId});
Object.assign(treeNode, { srfkey: strId });
Object.assign(treeNode, { text: strText, srfmajortext: strText });
......@@ -604,6 +605,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
response.then((response: any) => {
if (!response.status || response.status !== 200) {
resolve([]);
console.log(JSON.stringify(context));
console.error('查询${node.getPSAppDEDataSet().getCodeName()}数据集异常!');
}
const data: any = response.data;
......@@ -615,6 +617,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
}
}).catch((response: any) => {
resolve([]);
console.log(JSON.stringify(context));
console.error('查询${node.getPSAppDEDataSet().getCodeName()}数据集异常!');
});
}
......
......@@ -224,7 +224,6 @@
if(arg.srfappctx){
Object.assign(tempContext,JSON.parse(JSON.stringify(arg.srfappctx)));
}
Object.assign(tempContext,this.context);
if(arg.srfparentdename){
Object.assign(tempContext,{srfparentdename:arg.srfparentdename});
}
......
......@@ -7,6 +7,7 @@ ${item.render.code}
<app-form-druipart
<#if item.getPSSysCss?? && item.getPSSysCss()??>class="${item.getPSSysCss().getCssName()}"</#if>
:formState="formState"
:isForbidLoad="this.data.srfuf === '0'"
paramItem='<#if item.getParamItem()??>${item.getParamItem()}<#else>${appde.getCodeName()?lower_case}</#if>'
:parentdata='<#if dritem.getParentDataJO?? && dritem.getParentDataJO()??>${dritem.getParentDataJO()}<#else>{}</#if>'
:parameters="[
......
......@@ -26,6 +26,17 @@
@row-class-name="onRowClassName($event)"
@row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty">
无数据
<span class="quick-toolbar">
<#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??>
<#assign quickToolbar = ctrl.getQuickPSDEToolbar()/>
<@ibizindent blank=12>
${P.getCtrlCode(quickToolbar, 'CONTROL.html').code}
</@ibizindent>
</#if>
</span>
</template>
<template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template>
......@@ -57,6 +68,14 @@
</div>
</poptip>
</span>
<span v-if="selections.length > 0" class="batch-toolbar">
<#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>
<#assign batchToolbar = ctrl.getBatchPSDEToolbar()/>
<@ibizindent blank=12>
${P.getCtrlCode(batchToolbar, 'CONTROL.html').code}
</@ibizindent>
</#if>
</span>
<span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp;
<span>
{{$t('app.gridpage.show')}}&nbsp;
......@@ -374,6 +393,16 @@ import CodeListService from "@service/app/codelist-service";
public remoteData:any = {};
</#if>
<#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??>
<#assign quickToolbar = ctrl.getQuickPSDEToolbar()/>
${P.getCtrlCode(quickToolbar, 'CONTROL.vue').code}
</#if>
<#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>
<#assign batchToolbar = ctrl.getBatchPSDEToolbar()/>
${P.getCtrlCode(batchToolbar, 'CONTROL.vue').code}
</#if>
/**
* 表格是否显示
*
......@@ -486,7 +515,9 @@ import CodeListService from "@service/app/codelist-service";
const parentdata: any = {};
this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata);
Object.assign(arg,{viewparams:this.viewparams});
let tempViewParams:any = parentdata.viewparams?parentdata.viewparams:{};
Object.assign(tempViewParams,JSON.parse(JSON.stringify(this.viewparams)));
Object.assign(arg,{viewparams:tempViewParams});
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response.status || response.status !== 200) {
......@@ -845,11 +876,11 @@ import CodeListService from "@service/app/codelist-service";
<#elseif codelist.getOrMode() == 'NUM'>
renderMode: 'number',
textSeparator: '${codelist.textSeparator}',
valueSeparator: ';',
valueSeparator: ',',
<#else>
renderMode: 'other',
textSeparator: '、',
valueSeparator: ';',
valueSeparator: ',',
</#if>
},
</#if>
......
......@@ -29,6 +29,14 @@
display: inline;
}
.el-table {
.quick-toolbar{
display: inline-block;
button{
background: #ebf3fb;
color: #2575ca;
border: 0;
}
}
.el-tooltip{
.ivu-form-item{
margin-bottom: unset !important;
......@@ -51,12 +59,23 @@
position: absolute;
left: 0;
}
.batch-toolbar{
position: absolute;
left: 105px;
>.toolbar-container{
button {
font-size: 16px;
min-width: 32px;
height: 32px;
margin-right: 4px;
margin-top: 0;
margin-bottom: 0;
}
}
}
}
.el-table__body-wrapper{
height: calc(100% - 43px) !important;
}
.el-table__empty-block{
height: auto !important;
height: calc(100% - 45px) !important;
}
}
.ivu-modal-content{
......@@ -68,6 +87,7 @@
}
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
......@@ -309,7 +309,7 @@ import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/servi
if(response.data){
Object.assign(response.data,{srfuf:'0'});
//仿真主键数据
response.data.${appde.getCodeName()?lower_case} = Util.createUUID();
response.data.${appde.getKeyPSAppDEField().getCodeName()?lower_case} = Util.createUUID();
}
this.handleResponse(action, response, true);
this.mergeDefaults(response);
......
<#assign MDContent><#t>
<#if view.getPSSysCounterRef() ?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
</#if>
<#if view.getViewType() == "DEGRIDVIEW9">
<#if view.hasPSControl('searchform')>
${P.getCtrlCode('searchform', 'CONTROL.html').code}
......@@ -7,11 +10,22 @@ ${P.getCtrlCode('searchform', 'CONTROL.html').code}
${P.getCtrlCode('grid', 'CONTROL.html').code}
</#if>
</#if>
<#-- BEGIN:快速搜索或工具栏存在 -->
<#if (view.isEnableQuickSearch() || view.hasPSControl('toolbar'))>
<row style='margin-bottom: 6px;'>
<#-- BEGIN:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 -->
<#if (view.isEnableQuickSearch() || view.hasPSControl('toolbar') || view.isEnableQuickGroup() || view.getQuickPSDESearchForm()??)>
<div style='margin-bottom: 6px;'>
<#if view.isEnableQuickGroup()>
<div class="quick-group-container">
<app-quick-group :items="quickGroupModel" :counterService="${srfclassname('${appCounter.getCodeName()}')}counterservice" @valuechange="qucikGroupValueChange"></app-quick-group>
</div>
</#if>
<#if view.getQuickPSDESearchForm()??>
<div class="quick-search-container">
<#assign quickSearchForm = view.getQuickPSDESearchForm() />
${P.getCtrlCode(quickSearchForm, 'CONTROL.html').code}
</div>
</#if>
<#if view.isEnableQuickSearch()>
<i-input<#if view.hasPSControl('searchform')><#if view.isExpandSearchForm??> v-show="!isExpandSearchForm"</#if></#if> v-model="query" search enter-button @on-search="onSearch($event)" class='pull-left' style='max-width: 400px;margin-top:6px;' />
<i-input<#if view.hasPSControl('searchform')><#if view.isExpandSearchForm??> v-show="!isExpandSearchForm"</#if></#if> v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;' />
</#if>
<div class='pull-right'>
<#if view.hasPSControl('toolbar')>
......@@ -20,7 +34,7 @@ ${P.getCtrlCode('grid', 'CONTROL.html').code}
</@ibizindent>
</#if>
</div>
</row>
</div>
</#if>
<#-- END:快速搜索或工具栏存在 -->
<#if view.getViewType() != "DEGRIDVIEW9">
......@@ -34,7 +48,7 @@ ${P.getCtrlCode('grid', 'CONTROL.html').code}
</#assign>
<div class='view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card <#if !view.isShowCaptionBar()> view-no-caption</#if> view-no-toolbar' :dis-hover="true" :bordered="false">
<card class='view-card <#if !view.isShowCaptionBar()> view-no-caption</#if>' :dis-hover="true" :bordered="false">
<@ibizindent blank=8>
<#ibizinclude>
./VIEW_CAPTION.vue.ftl
......
......@@ -2,6 +2,14 @@
./LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
<#if 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>
./VIEW_HEADER-BASE.vue.ftl
</#ibizinclude>
......@@ -20,6 +28,10 @@ if(this.formDruipart){
}
</#assign>
<#assign mounted_block>
<#if view.isEnableQuickGroup()>_this.loadQuickGroupModel();</#if>
</#assign>
<#ibizinclude>
./VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
......@@ -37,6 +49,17 @@ if(this.formDruipart){
public isSingleSelect: boolean = ${grid.isSingleSelect()?c};
</#if>
<#if 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 ${srfclassname('${appCounter.getCodeName()}')}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store });
</#if>
/**
* 是否嵌入关系界面
*
......@@ -141,6 +164,97 @@ if(this.formDruipart){
}
</#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 qucikGroupData: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 = [...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>
}
/**
* 快速分组值变化
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public qucikGroupValueChange($event:any){
if($event && $event.data){
this.qucikGroupData = $event.data;
if(this.isEmitQuickGroupValue){
this.onSearch($event);
}
}
this.isEmitQuickGroupValue = true;
}
</#if>
<#if view.getQuickPSDESearchForm()??>
/**
* 快速搜索栏数据对象
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public qucikFormData:any;
/**
* 快速搜索栏值变化
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public qucikFormValueChange($event:any){
this.qucikFormData = $event;
this.onSearch($event);
}
</#if>
<#ibizinclude>
./VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
......@@ -257,6 +257,5 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
*/
public viewState: Subject<ViewState> = new Subject();
<#if view.hasPSControl('toolbar')>
${P.getCtrlCode('toolbar', 'CONTROL.vue').code}
</#if>
\ No newline at end of file
......@@ -87,6 +87,7 @@ if(this.viewparams.selectedData){
}
const removeSelect: boolean = this.viewSelections.some((selection: any) => selection._select);
this.containerModel.view_leftbtn.disabled = !removeSelect;
this.selectedData = JSON.stringify(this.viewSelections);
}
/**
......@@ -107,6 +108,7 @@ if(this.viewparams.selectedData){
});
const removeSelect: boolean = this.viewSelections.some((selection: any) => selection._select);
this.containerModel.view_leftbtn.disabled = !removeSelect;
this.selectedData = JSON.stringify(this.viewSelections);
}
/**
......@@ -119,14 +121,18 @@ if(this.viewparams.selectedData){
if (!Object.is(model.type, 'PICKUPVIEWPANEL')) {
return;
}
let newSelections:any[] = [];
model.selections.forEach((item: any) => {
const index: number = this.viewSelections.findIndex((selection: any) => Object.is(item.srfkey, selection.srfkey));
if (index === -1) {
let _item: any = { ...JSON.parse(JSON.stringify(item)) };
Object.assign(_item, { _select: false })
this.viewSelections.push(_item);
newSelections.push(_item);
}else{
newSelections.push(this.viewSelections[index]);
}
});
this.viewSelections = newSelections;
});
}
......@@ -138,6 +144,7 @@ if(this.viewparams.selectedData){
public onCLickAllLeft():void {
this.viewSelections = [];
this.containerModel.view_leftbtn.disabled = true;
this.selectedData = JSON.stringify(this.viewSelections);
}
/**
......
......@@ -15,6 +15,18 @@ TARGET=PSSYSAPP
"id": "${codeitem.getValue()?j_string}",
"label": "${codeitem.getText()?j_string}",
"text": "${codeitem.getText()?j_string}",
<#if codeitem.getPSSysImage()??>
<#assign sysimage = codeitem.getPSSysImage()/>
<#if sysimage.getImagePath() == "">
"iconcls":"${sysimage.getCssClass()}",
<#else>
"icon":"${sysimage.getImagePath()}",
</#if>
</#if>
"data":<#if codeitem.getData() !="">${codeitem.getData()}<#else>""</#if>,
<#if codeitem.getCodeName()??>
"codename":"${codeitem.getCodeName()}",
</#if>
<#if codeitem.getColor?? && codeitem.getColor()??>
"color": "${codeitem.getColor()?j_string}",
</#if>
......
......@@ -25,7 +25,7 @@ export const Environment = {
// 是否为开发模式
devMode: true,
// 项目模板地址
ProjectUrl: "http://demo.ibizlab.cn/groups/ibizr7pfstdtempl",
ProjectUrl: "http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7",
// 配置平台地址
StudioUrl: "http://172.16.170.145/slnstudio/",
// 中心标识
......
......@@ -24,6 +24,18 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
id: '${codeitem.getValue()?j_string}',
label: '${codeitem.getText()?j_string}',
text: '${codeitem.getText()?j_string}',
<#if codeitem.getPSSysImage()??>
<#assign sysimage = codeitem.getPSSysImage()/>
<#if sysimage.getImagePath() == "">
"iconcls":"${sysimage.getCssClass()}",
<#else>
"icon":"${sysimage.getImagePath()}",
</#if>
</#if>
"data":<#if codeitem.getData() != "">${codeitem.getData()}<#else>""</#if>,
<#if codeitem.getCodeName()??>
"codename":"${codeitem.getCodeName()}",
</#if>
<#if codeitem.getColor?? && codeitem.getColor()??>
"color": "${codeitem.getColor()?j_string}",
</#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册