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

Merge branch 'dev'

......@@ -80,6 +80,10 @@ ${ctrl.render.code}
:validRange="validRange"
:defaultDate="defaultDate"
:eventRender="eventRender"
<#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??>
:navLinks="true"
:navLinkDayClick ="onDayClick"
</#if>
@dateClick="onDateClick"
@eventClick="onEventClick"
@eventDrop="onEventDrop"
......@@ -356,7 +360,7 @@ FullCalendar,
<#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?? && 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>},
${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>
......@@ -957,6 +961,63 @@ FullCalendar,
</#list>
</#if>
<#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??>
<#if ctrl.getQuickPSDEToolbar().getCodeName?? && ctrl.getQuickPSDEToolbar().getCodeName()??>
<#assign ModelsName>${ctrl.getQuickPSDEToolbar().getCodeName()?lower_case}Models</#assign>
<#else>
<#assign ModelsName = 'toolBarModels' />
</#if>
<#assign heightIndex = 0>
<#if ctrl.getQuickPSDEToolbar().getPSDEToolbarItems?? && ctrl.getQuickPSDEToolbar().getPSDEToolbarItems()??>
<#list ctrl.getQuickPSDEToolbar().getPSDEToolbarItems() as item>
<#if item.getItemType()?? && item.getItemType() == 'DEUIACTION' && item.getPSUIAction?? && item.getPSUIAction()??>
<#assign heightIndex += 1>
</#if>
</#list>
</#if>
/**
* 时间点击
*
* @param {*} $event 当前时间
* @param {*} jsEvent 原生事件对象
* @returns
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onDayClick($event: any, jsEvent: any) {
let content: any = this.renderBarMenu;
const height = ${heightIndex} * 34;
const container = this.$apppopover.openPopover(jsEvent, content, "left-end", true, 103, height);
}
/**
* 绘制快速工具栏项
*
* @returns
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public renderBarMenu() {
return (
<div id="calendar-popover">
<dropdown class="tree-right-menu" trigger="custom" visible={true} on-on-click={($event: any) => this.${ctrl.getQuickPSDEToolbar().getName()}_click({tag: $event})}>
<dropdown-menu slot="list">
<#if ctrl.getQuickPSDEToolbar().getPSDEToolbarItems?? && ctrl.getQuickPSDEToolbar().getPSDEToolbarItems()??>
<#list ctrl.getQuickPSDEToolbar().getPSDEToolbarItems() as item>
<#if item.getItemType()?? && item.getItemType() == 'DEUIACTION' && item.getPSUIAction?? && item.getPSUIAction()??>
<dropdown-item name="${item.name}" v-show={this.${ModelsName}.${item.getName()?lower_case}.visabled} disabled={this.${ModelsName}.${item.getName()?lower_case}.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>
</#if>
</#list>
</#if>
</dropdown-menu>
</dropdown>
</div>
)
}
</#if>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
......@@ -100,4 +100,20 @@
text-align: center;
}
}
}
\ No newline at end of file
}
<#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??>
.app-popover {
padding: 0px !important;
background-color: #fff !important;
}
#calendar-popover {
.ivu-dropdown {
.ivu-select-dropdown {
top: 0px;
margin: 0;
padding: 0;
}
}
}
</#if>
\ No newline at end of file
......@@ -81,10 +81,35 @@ ${backend_block}
}
context = UIActionTool.handleContextParam(actionTarget,_args,parentContext,parentViewParam,context);
data = UIActionTool.handleActionParam(actionTarget,_args,parentContext,parentViewParam,params);
<#-- 多项数据主键转换数据 start -->
if(Object.is(actionTarget,"MULTIKEY")){
let tempDataArray:Array<any> = [];
if((_args.length >1) && (Object.keys(data).length >0)){
for(let i =0;i<_args.length;i++){
let tempObject:any = {};
Object.keys(data).forEach((key:string) =>{
Object.assign(tempObject,{[key]:data[key].split(',')[i]});
})
tempDataArray.push(tempObject);
}
}else{
tempDataArray.push(data);
}
data = tempDataArray;
}
<#-- 多项数据主键转换数据 end -->
context = Object.assign({},actionContext.context,context);
<#-- 构建srfparentdename和srfparentkey start -->
let parentObj:any = {srfparentdename:srfParentDeName?srfParentDeName:null,srfparentkey:srfParentDeName?context[srfParentDeName.toLowerCase()]:null};
Object.assign(data,parentObj);
<#-- 多项数据主键转换数据 start -->
if(Object.is(actionTarget,"MULTIKEY") && data.length >0){
data.forEach((item:any) => {
Object.assign(item,parentObj);
});
}else{
Object.assign(data,parentObj);
}
<#-- 多项数据主键转换数据 end -->
Object.assign(context,parentObj);
<#-- 构建srfparentdename和srfparentkey end -->
// 直接调实体服务需要转换的数据
......@@ -95,7 +120,7 @@ ${backend_block}
const backend = () => {
<#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()?? && item.getPSAppDEMethod?? && item.getPSAppDEMethod()??>
const curService:${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}Service = new ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}Service();
curService.${item.getPSAppDEMethod().getCodeName()}(context,data, ${item.isShowBusyIndicator()?c}).then((response: any) => {
curService.${item.getPSAppDEMethod().getCodeName()}<#if item.getActionTarget() == 'MULTIKEY'>Batch</#if>(context,data, ${item.isShowBusyIndicator()?c}).then((response: any) => {
if (!response || response.status !== 200) {
actionContext.$Notice.error({ title: '错误', desc: response.message });
return;
......
......@@ -45,7 +45,7 @@ TARGET=PSSYSAPP
"vue-class-component": "^7.0.2",
"vue-grid-layout": "^2.3.7",
"vue-i18n": "^8.15.3",
"vue-property-decorator": "^8.3.0",
"vue-property-decorator": "^9.1.2",
"vue-router": "^3.1.3",
"vuex": "^3.1.2",
<#if app.getAllPSAppPkgs?? && app.getAllPSAppPkgs()??>
......
......@@ -729,6 +729,47 @@ export default class ${srfclassname('${item.getCodeName()}')}ServiceBase extends
}
</#if>
<#-- 查询数据集(post方式)end -->
<#-- 自定义行为Batch方法start -->
<#if singleAppMethod.getMethodType?? && singleAppMethod.getMethodType()?? && singleAppMethod.getMethodType() == "DEACTION" && singleAppMethod.getPSDEAction?? && singleAppMethod.getPSDEAction()?? && singleAppMethod.getPSDEServiceAPIMethod?? && singleAppMethod.getPSDEServiceAPIMethod()??>
<#assign deAction = singleAppMethod.getPSDEAction()>
<#assign singleServiceApi = singleAppMethod.getPSDEServiceAPIMethod()/>
<#if deAction.getActionType?? && deAction.getActionType()?? && deAction.getActionType() == "USERCUSTOM">
/**
* ${singleAppMethod.getCodeName()}Batch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ${srfclassname('${item.getCodeName()}')}ServiceBase
*/
public async ${singleAppMethod.getCodeName()}Batch(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
<#if item.getPSAppDERSPathCount() gt 0 && singleServiceApi??>
<#list 1..item.getPSAppDERSPathCount() as count>
<#assign path = ''/>
<#assign condition = ''/>
<#list item.getPSAppDERSPath(count_index) as deRSPath>
<#if deRSPath.getMajorPSAppDataEntity?? && deRSPath.getMajorPSAppDataEntity()??>
<#assign _dataEntity = deRSPath.getMajorPSAppDataEntity()/>
<#assign condition>${condition}context.${_dataEntity.getCodeName()?lower_case} && </#assign>
<#assign path>${path}${srfpluralize(_dataEntity.codeName)?lower_case}/<#noparse>$</#noparse>{context.${_dataEntity.getCodeName()?lower_case}}/</#assign>
</#if>
</#list>
if(${condition}true){
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/${path}${item.codeName?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>batch`,tempData,isloading);
}
</#list>
</#if>
<#if item.isMajor()>
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/${item.codeName?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>batch`,tempData,isloading);
</#if>
}
</#if>
</#if>
<#-- 自定义行为Batch方法end -->
<#-- 检查行为是否可以执行 start -->
<#-- @author zpc -->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册