提交 d5dc2685 编写于 作者: laowang's avatar laowang

合并分支 'dev' 到 'master'

Dev

查看合并请求 !3
......@@ -2,58 +2,66 @@
./MODEL_HEADER.ts.ftl
</#ibizinclude>
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Model
*/
public getDataItems(): any[] {
return [
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Model
*/
public getDataItems(): any[] {
return [
<#-- 表单项 -->
<#if ctrl.getPSDEFormItems()??>
<#list ctrl.getPSDEFormItems() as dataitem>
{
name: '${dataitem.getName()}',
<#if dataitem.getPSDEField()??>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: '${dataitem.getPSDEField().getDataType()}',
</#if>
},
</#list>
<#list ctrl.getPSDEFormItems() as dataitem>
{
name: '${dataitem.getName()}',
<#if dataitem.getPSDEField()??>
<#if ctrl.getControlType() == 'SEARCHFORM'>
<#if dataitem.getPSDEFSearchMode?? && dataitem.getPSDEFSearchMode()??>
prop: '${dataitem.getPSDEFSearchMode().getCodeName()?lower_case}',
<#else>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
</#if>
<#else>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
</#if>
dataType: '${dataitem.getPSDEField().getDataType()}',
</#if>
},
</#list>
</#if>
<#-- 关联主实体的主键 -->
<#if ctrl.getPSAppDataEntity()??>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.isMajor() == false && appDataEntity.getMinorPSAppDERSs()??>
<#list appDataEntity.getMinorPSAppDERSs() as minorAppDERSs>
<#if minorAppDERSs.getMajorPSAppDataEntity()??>
<#assign majorAppDataEntity = minorAppDERSs.getMajorPSAppDataEntity() />
{
name: '${majorAppDataEntity.getCodeName()?lower_case}',
prop: '${majorAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#list>
</#if>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.isMajor() == false && appDataEntity.getMinorPSAppDERSs()??>
<#list appDataEntity.getMinorPSAppDERSs() as minorAppDERSs>
<#if minorAppDERSs.getMajorPSAppDataEntity()??>
<#assign majorAppDataEntity = minorAppDERSs.getMajorPSAppDataEntity() />
{
name: '${majorAppDataEntity.getCodeName()?lower_case}',
prop: '${majorAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#list>
</#if>
</#if>
<#-- 界面主键标识 -->
<#if ctrl.getPSDEFormItems()??>
<#list ctrl.getPSDEFormItems() as dataitem>
<#if dataitem.getPSAppDEField()?? && dataitem.getPSAppDEField().isKeyField() == true>
<#if !P.exists("importService1", dataitem.getPSAppDEField().getId(), "")>
{
name: '${ctrl.getPSAppDataEntity().getCodeName()?lower_case}',
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#if>
</#list>
<#list ctrl.getPSDEFormItems() as dataitem>
<#if dataitem.getPSAppDEField()?? && dataitem.getPSAppDEField().isKeyField() == true>
<#if !P.exists("importService1", dataitem.getPSAppDEField().getId(), "")>
{
name: '${ctrl.getPSAppDataEntity().getCodeName()?lower_case}',
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#if>
</#list>
</#if>
]
}
];
}
<#ibizinclude>
./MODEL_BOTTOM.ts.ftl
......
<template>
<div class="app-wizard">
<#if ctrl.getPSDEWizard?? && ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getPSDEWizardSteps?? && ctrl.getPSDEWizard().getPSDEWizardSteps()??>
<van-steps class="wizard-steps" :active="wizardForms.indexOf(activeForm)" finish-status="success">
<#list ctrl.getPSDEWizard().getPSDEWizardSteps() as step>
<van-step >${step.getTitle()}</van-step>
</#list>
</van-steps>
</#if>
<template class="app-wizard-content">
<#if ctrl.getPSDEEditForms()??>
<#list ctrl.getPSDEEditForms() as form>
<#assign handler = form.getPSAjaxControlHandler() />
<view_${form.getName()}
v-if="activeForm == '${form.getName()}'"
:key="'${form.name}'"
:viewState='wizardState'
:context="context"
:viewparams="viewparams"
updateAction="<#if form.getUpdatePSControlAction()?? && form.getUpdatePSControlAction().getPSAppDEMethod()??>${form.getUpdatePSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
removeAction="<#if form.getRemovePSControlAction()?? && form.getRemovePSControlAction().getPSAppDEMethod()??>${form.getRemovePSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
loadAction="<#if form.getGetPSControlAction()?? && form.getGetPSControlAction().getPSAppDEMethod()??>${form.getGetPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
<#if form.getHookEventNames()??>
<#list form.getHookEventNames() as eventName>
@${eventName?lower_case}="${form.name}_${eventName?lower_case}"
</#list>
</#if>
name='${form.name}'
ref='${form.name}'>
</view_${form.getName()}>
</#list>
</#if>
</template>
<ion-footer class="app-wizard-footer">
<ion-button :disabled="isDisabled('PREV')" @click="onClickPrev()" type="primary">上一步</ion-button>
<ion-button :disabled="isDisabled('NEXT')" @click="onClickNext()" type="primary">下一步</ion-button>
<ion-button :disabled="isDisabled('FINISH')" @click="onClickFinish()" type="primary">完成</ion-button>
</ion-footer>
</div>
</template>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
/**
* 部件行为--init
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public initAction!: string;
/**
* 部件行为--finish
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public finishAction!: string;
/**
* 显示处理提示
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop({ default: true }) public showBusyIndicator?: boolean;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getDatas(): any[] {
return [this.formParam];
}
/**
* 获取单项数据
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getData(): any {
return this.formParam;
}
/**
* 视图状态订阅对象
*
* @public
* @type {Subject<{action: string, data: any}>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public wizardState: Subject<ViewState> = new Subject();
/**
* 当前激活表单
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
<#if ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getFirstPSDEWizardForm()??>
<#assign firstForm = ctrl.getPSDEWizard().getFirstPSDEWizardForm()>
public activeForm: string = '${ctrl.name}_form_${firstForm.getFormTag()}';
<#else>
public activeForm: string = '';
</#if>
/**
* 向导表单参数
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public formParam: any = {};
/**
* 执行过的表单
*
* @public
* @type {Array<string>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public historyForms: Array<string> = [];
/**
* 步骤行为集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public stepActions: any = {};
/**
* 向导表单集合
*
* @type {Array<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public wizardForms: Array<any> = [];
/**
* 当前状态
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public curState = '';
/**
* Vue声明周期(处理组件的输入属性)
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public created(): void {
this.regFormActions();
if(this.activeForm) {
this.historyForms.push(this.activeForm);
}
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (Object.is(tag, this.name)) {
if (Object.is('load', action)) {
this.doInit(data);
}
}
});
}
}
/**
* vue 生命周期
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public destroyed() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
<#if destroyed_block??>
${destroyed_block}
</#if>
}
/**
* 注册表单步骤行为
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public regFormActions() {
<#if ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getPSDEWizardForms()??>
<#list ctrl.getPSDEWizard().getPSDEWizardForms() as form>
this.regFormAction('${ctrl.name}_form_${form.getFormTag()}', [<#if form.getStepActions()??><#list form.getStepActions() as action><#if action_index gt 0>,</#if>'${action}'</#list></#if>]);
</#list>
</#if>
}
/**
* 注册表单步骤行为
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public regFormAction(name: string, actions: Array<string>) {
this.stepActions[name] = actions;
this.wizardForms.push(name);
}
/**
* 初始化行为
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public doInit(opt: any = {}) {
<#if ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getInitPSDEAction()??>
<#assign action = ctrl.getPSDEWizard().getInitPSDEAction()>
const arg: any = { ...opt };
Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = this.service.init(this.initAction, JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (response && response.status === 200) {
this.formParam = response.data;
if(response.data.${ctrl.getPSAppDataEntity().getCodeName()?lower_case}){
Object.assign(this.context,{${ctrl.getPSAppDataEntity().getCodeName()?lower_case}:response.data.${ctrl.getPSAppDataEntity().getCodeName()?lower_case}})
}
this.formLoad();
}
}).catch((response: any) => {
if (response && response.status === 401) {
return;
}
this.$notice.warning( response.info );
});
</#if>
}
/**
* 表单加载
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public formLoad() {
if(this.activeForm) {
this.wizardState.next({ tag: this.activeForm, action: 'load', data: this.formParam });
}
}
/**
* 完成行为
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public doFinish() {
<#if ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getFinishPSDEAction()??>
<#assign action = ctrl.getPSDEWizard().getFinishPSDEAction()>
let arg: any = {};
Object.assign(arg, this.formParam);
Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = this.service.finish(this.finishAction, JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
this.$emit("finish", data);
}
}).catch((response: any) => {
if (response && response.status === 401) {
return;
}
this.$notice.warning( response.info );
});
</#if>
}
/**
* 向导表单加载完成
*
* @param {*} args
* @param {string} name
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public ${ctrl.name}_formload(args: any, name: string, $event2?: any) {
if(args) {
Object.assign(this.formParam, args);
}
}
/**
* 向导表单保存完成
*
* @param {*} args
* @param {string} name
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public ${ctrl.name}_formsave(args: any, name: string, $event2?: any) {
Object.assign(this.formParam, args);
if(Object.is(this.curState, 'NEXT')) {
this.historyForms.push(name);
if (this.getNextForm()) {
this.activeForm = this.getNextForm();
setTimeout(() => {
this.formLoad();
}, 1);
} else {
this.doFinish();
}
}else if(Object.is(this.curState, 'FINISH')) {
this.doFinish();
}
}
/**
* 获取下一步向导表单
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getNextForm() {
let index = this.wizardForms.indexOf(this.activeForm);
if(index >= 0) {
if(this.wizardForms[index + 1]) {
return this.wizardForms[index + 1];
}
}
return undefined;
}
/**
* 上一步
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public onClickPrev() {
const length = this.historyForms.length;
if(length > 1) {
this.curState = 'PREV';
this.activeForm = this.historyForms[length - 1];
setTimeout(() => {
this.formLoad();
}, 1);
this.historyForms.splice(length - 1, 1);
}
}
/**
* 下一步
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public onClickNext() {
if(this.activeForm) {
if(this.$refs && this.$refs[this.activeForm]){
let form: any = this.$refs[this.activeForm];
if(form.formValidateStatus()) {
this.curState = 'NEXT';
this.wizardState.next({ tag: this.activeForm, action: 'save', data: this.formParam });
} else {
this.$notice.warning( '值规则校验异常' );
}
}
}
}
/**
* 完成
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public onClickFinish() {
if(this.activeForm) {
if(this.$refs && this.$refs[this.activeForm]){
let form: any = this.$refs[this.activeForm];
if(form.formValidateStatus()) {
this.curState = 'FINISH';
this.wizardState.next({ tag: this.activeForm, action: 'save', data: this.formParam });
} else {
this.$notice.warning( '值规则校验异常' );
}
}
}
}
/**
* 是否禁用
*
* @param {string} type
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public isDisabled(type: string) {
const actions: Array<string> = this.stepActions[this.activeForm]
if(actions && actions.indexOf(type) < 0) {
return true;
}
return false;
}
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
<#assign content>
:showBusyIndicator="${ctrl.isShowBusyIndicator()?c}"
<#if ctrl.getPSControlActions()??>
<#list ctrl.getPSControlActions() as action>
<#if action.getPSAppDEMethod?? && action.getPSAppDEMethod()??>
${action.name?lower_case}Action='${action.getPSAppDEMethod().getCodeName()}'
</#if>
</#list>
</#if>
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
.app-wizard-footer{
text-align: center;
}
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
## ibiz向导视图相关文档(移动端)
### 一、向导部件
##### (1)支持功能:操作向导(上一步、下一步)、提交向导表单
##### (2)界面UI
<div style = "display:flex; overflow:hidden; ">
<img src="images/README/xd_1.png" ></img>
<img src="images/README/xd_2.png" ></img>
</div>
<div style = "display:flex; overflow:hidden; ">
<img src="images/README/xd_3.png" ></img>
</div>
\ No newline at end of file
......@@ -15,9 +15,12 @@
<#-- 流程操作菜单:END -->
<#elseif ctrl.getToolbarStyle() == 'MOBBOTTOMMENU'>
<#-- 底部菜单:BEGIN -->
<div class = "bottom_menu">
<div <#if view.hasPSControl('mdctrl') || view.hasPSControl('dataview') || view.hasPSControl('calendar')>v-show="!showCheack"</#if> class = "bottom_menu">
<#list ctrl.getPSDEToolbarItems() as item>
${P.getPartCode(item).code}
<#if custom_toolbar??>
${custom_toolbar}
</#if>
</#list>
</div>
<#-- 底部菜单:END -->
......@@ -27,6 +30,9 @@
<div class="app-quick-toolbar">
<#list ctrl.getPSDEToolbarItems() as item>
${P.getPartCode(item).code}
<#if custom_toolbar??>
${custom_toolbar}
</#if>
</#list>
</div>
</div>
......@@ -37,6 +43,9 @@
<div class="app-quick-toolbar">
<#list ctrl.getPSDEToolbarItems() as item>
${P.getPartCode(item).code}
<#if custom_toolbar??>
${custom_toolbar}
</#if>
</#list>
</div>
</div>
......@@ -46,6 +55,9 @@
<div class="app-quick-toolbar">
<#list ctrl.getPSDEToolbarItems() as item>
${P.getPartCode(item).code}
<#if custom_toolbar??>
${custom_toolbar}
</#if>
</#list>
</div>
</div>
......
......@@ -74,6 +74,9 @@ ion-backdrop {
width: 40%;
right: 20px;
}
.app-quick-toolbar{
text-align: center;
}
<#assign havestyle = 0>
<#if ctrl.getToolbarStyle() == 'MOBNAVLEFTMENU'|| ctrl.getToolbarStyle() == 'MOBNAVRIGHTMENU' && havestyle = 0>
<#assign havestyle = 1>
......
......@@ -5,32 +5,40 @@
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<van-form ref='${ctrl.name}' class="app-form <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<div ref='${ctrl.name}' class="app-form <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#-- isNoTabHeader是否隐藏分页头部-->
<#if ctrl.isNoTabHeader()>
<#list ctrl.getPSDEFormPages() as formmenber>
${P.getPartCode(formmenber).code}
</#list>
<#else>
<van-tabs v-model="detailsModel.${ctrl.name}.activiedPage" @click="detailsModel.${ctrl.name}.clickPage($event)">
<ion-tabs class="app-form-tabs" @ionTabsDidChange="detailsModel.${ctrl.name}.clickPage($event)">
<#list ctrl.getPSDEFormPages() as formpage>
<van-tab name='${formpage.name}' :disabled="!detailsModel.${formpage.name}.visible">
<div slot="title" class="caption<#if formpage.getLabelPSSysCss?? && formpage.getLabelPSSysCss()??> ${formpage.getLabelPSSysCss().getCssName()}</#if>">
<#if formpage.getPSSysImage()??>
<#assign sysimage = formpage.getPSSysImage()/>
<#if sysimage.getImagePath() == "">
<i class="${sysimage.getCssClass()}" style="margin-right: 2px"></i>
<#else>
<img src="${sysimage.getImagePath()}" style="margin-right: 2px"/>
</#if>
</#if>
{{<#if langbase??>$t('${langbase}.details.${formpage.name}')<#else>'${formpage.getCaption()}'</#if>}}
</div>
${P.getPartCode(formpage).code}
</van-tab>
<ion-tab class="app-form-tab" tab="${formpage.name}">
<ion-row>
${P.getPartCode(formpage).code}
</ion-row>
</ion-tab>
</#list>
</van-tabs>
<ion-tab-bar slot="top">
<#list ctrl.getPSDEFormPages() as formpage>
<ion-tab-button tab="${formpage.name}" :disabled="!detailsModel.${formpage.name}.visible">
<ion-label class="caption<#if formpage.getLabelPSSysCss?? && formpage.getLabelPSSysCss()??> ${formpage.getLabelPSSysCss().getCssName()}</#if>">
<#if formpage.getPSSysImage()??>
<#assign sysimage = formpage.getPSSysImage()/>
<#if sysimage.getImagePath() == "">
<i class="${sysimage.getCssClass()}" style="margin-right: 2px"></i>
<#else>
<img src="${sysimage.getImagePath()}" style="margin-right: 2px"/>
</#if>
</#if>
{{<#if langbase??>$t('${langbase}.details.${formpage.name}')<#else>'${formpage.getCaption()}'</#if>}}
</ion-label>
</ion-tab-button>
</#list>
</ion-tab-bar>
</ion-tabs>
</#if>
</van-form>
</div>
</#if>
</template>
\ No newline at end of file
......@@ -17,7 +17,8 @@ ${item.render.code}
</#list>
</#if>
]"
:viewParam="context"
:context="context"
:viewparams="viewparams"
parameterName='${appde.getCodeName()?lower_case}'
refviewtype='<#if refView.getPSViewType()??>${refView.getPSViewType().getId()}</#if>'
refreshitems='<#if item.getRefreshItems()??>${item.getRefreshItems()}</#if>'
......@@ -25,6 +26,6 @@ ${item.render.code}
viewname='${srffilepath2(refView.codeName)}'
:data="JSON.stringify(this.data)"
@drdatasaved="drdatasaved($event)"
style="<#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX">height: 100%</#if><#if item.getContentHeight() == 0><#if refView.getHeight() gt 0>height:${refView.getHeight()?c}px</#if><#else>height:${item.getContentHeight()?c}px</#if>;overflow: auto;">
style="<#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX">height: 100%;</#if><#if item.getContentHeight() == 0><#if refView.getHeight() gt 0>height:${refView.getHeight()?c}px</#if><#else>height:${item.getContentHeight()?c}px;</#if>">
</app-form-druipart>
</#if>
......@@ -5,7 +5,7 @@
<#if item.render??>
${item.render.code}
<#else>
<app-form-item v-show="detailsModel.${item.name}.visible" name='${item.name}' :itemRules="this.rules.${item.name}" class='<#if item.getPSSysCss?? && item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>'<#if item.getLabelPSSysCss?? && item.getLabelPSSysCss()??> labelStyle="${item.getLabelPSSysCss().getCssName()}"</#if> :caption="<#if langbase??>$t('${langbase}.details.${item.name}')<#else>'${item.getCaption()}'</#if>" uiStyle="${item.getDetailStyle()}" :labelWidth="${item.getLabelWidth()?c}" :isShowCaption="${item.isShowCaption()?c}" :error="detailsModel.${item.name}.error" :isEmptyCaption="${item.isEmptyCaption()?c}" labelPos="${item.getLabelPos()}">
<app-form-item ref="${item.name}rules" :checkValue="this.data.${item.name}" v-show="detailsModel.${item.name}.visible" name='${item.name}' :itemRules="this.rules.${item.name}" class='<#if item.getPSSysCss?? && item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>'<#if item.getLabelPSSysCss?? && item.getLabelPSSysCss()??> labelStyle="${item.getLabelPSSysCss().getCssName()}"</#if> :caption="<#if langbase??>$t('${langbase}.details.${item.name}')<#else>'${item.getCaption()}'</#if>" uiStyle="${item.getDetailStyle()}" :labelWidth="${item.getLabelWidth()?c}" :isShowCaption="${item.isShowCaption()?c}" :error="detailsModel.${item.name}.error" :isEmptyCaption="${item.isEmptyCaption()?c}" labelPos="${item.getLabelPos()}">
<#if item.isCompositeItem()>
<#assign formitems=item.getPSDEFormItems()>
<app-range-editor v-model="data.${item.name}" :activeData="data" :disabled="detailsModel.${item.name}.disabled" name="${item.name}" editorType="${item.getEditorType()}" format="${item.getEditorParam("TIMEFMT","")}" :refFormItem="[<#list formitems as formitem><#if formitem_index gt 0>,</#if>'${formitem.name}'</#list>]" @formitemvaluechange="onFormItemValueChange" style="${item.getEditorCssStyle()}"></app-range-editor>
......
......@@ -21,9 +21,7 @@ ${item.render.code}
${content}
</div>
<#else>
<van-row>
${content}
</van-row>
${content}
</#if>
</app-form-group>
</#if>
......@@ -336,7 +336,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
<#if formitem.getPSDEFormItemUpdate()??>
<#assign itemUpdate=formitem.getPSDEFormItemUpdate()/>
if(Object.is(name, '${formitem.name}')){
if (Object.is(name, '${formitem.name}')) {
const details: string[] = [<#list itemUpdate.getPSDEFIUpdateDetails() as detail><#if detail_index gt 0>, </#if>'${detail.getPSDEFormDetailName()?lower_case}'</#list>];
this.updateFormItems('${itemUpdate.codeName}', this.data, details, ${itemUpdate.isShowBusyIndicator()?c});
}
......@@ -473,12 +473,23 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected formValidateStatus(): boolean {
const form: any = this.$refs.${ctrl.name};
<#-- const form: any = this.$refs.${ctrl.name};
let validatestate: boolean = true;
<#-- form.validate((valid: boolean) => {
form.validate((valid: boolean) => {
validatestate = valid ? true : false;
}); -->
return validatestate
return this.cheackRules();
}
public cheackRules() :boolean{
let refArr: Array<string> = [<#list ctrl.getAllPSDEFormDetails() as formdetail><#if formdetail.getDetailType?? && formdetail.getDetailType() == 'FORMITEM'>"${formdetail.getName()}rules",</#if></#list>];
let falg = true ;
refArr.forEach((item:any) => {
if(this.$refs[item] && (this.$refs[item] as any).checkRule && !(this.$refs[item] as any).checkRule()){
falg = false;
}
});
return falg;
}
/**
......@@ -822,8 +833,8 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.$nextTick(() => {
this.formState.next({ type: 'load', data: data });
});
} else if (response && response.status === 401) {
const { data: _data } = response;
} else if (response && response.status !== 401) {
const { error: _data } = response;
this.$notice.error(_data.message);
}
return response;
......@@ -856,8 +867,8 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.$nextTick(() => {
this.formState.next({ type: 'load', data: data });
});
} else if (response && response.status === 401) {
const { data: _data } = response;
} else if (response && response.status !== 401) {
const { error: _data } = response;
this.$notice.error(_data.message);
}
return response;
......@@ -897,7 +908,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.formState.next({ type: 'save', data: data });
});
} else if (response.status && response.status !== 401) {
const { data: _data } = response;
const { error: _data } = response;
if (Object.is(_data.status, 'BAD_REQUEST') && _data.parameters && _data.parameters.fieldErrors) {
this.resetValidates();
this.fillValidates(_data.parameters.fieldErrors)
......@@ -972,7 +983,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
}
</#if>
} else if (response && response.status !== 401) {
const { data: _data } = response;
const { error: _data } = response;
if (Object.is(_data.status, 'BAD_REQUEST') && _data.parameters && _data.parameters.fieldErrors) {
this.resetValidates();
this.fillValidates(_data.parameters.fieldErrors)
......@@ -1007,7 +1018,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.data.ismodify = false;
this.$notice.success((data.srfmajortext ? data.srfmajortext : '') + '&nbsp;删除成功!');
} else if (response && response.status !== 401) {
const { data: _data } = response;
const { error: _data } = response;
this.$notice.error(_data.message);
}
return response;
......@@ -1034,7 +1045,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
if (response && response.status === 200) {
this.$notice.success('工作流启动成功');
} else if (response && response.status !== 401) {
this.$notice.error('工作流启动失败, ' + response.info);
this.$notice.error('工作流启动失败, ' + response.error.message);
}
return response;
}
......@@ -1059,7 +1070,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
if (response && response.status === 200) {
this.$notice.success('工作流提交成功');
} else if (response && response.status !== 401) {
this.$notice.error('工作流提交失败, ' + response.info);
this.$notice.error('工作流提交失败, ' + response.error.message);
}
return response;
}
......@@ -1082,7 +1093,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
}
const arg: any = { ...data };
Object.assign(arg, this.viewparams);
const response: any = this.service.frontLogic(mode, { ...this.context }, arg, showloading);
const response: any = await this.service.frontLogic(mode, { ...this.context }, arg, showloading);
if (response && response.status === 200) {
const data = response.data;
const _data: any = {};
......@@ -1100,7 +1111,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.formState.next({ type: 'updateformitem', ufimode: arg.srfufimode, data: _data });
});
} else if (response && response.status !== 401) {
const { data: _data } = response;
const { error: _data } = response;
if (Object.is(_data.status, 'BAD_REQUEST') && _data.parameters && _data.parameters.fieldErrors) {
this.resetValidates();
this.fillValidates(_data.parameters.fieldErrors)
......@@ -1268,6 +1279,8 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.$emit('load', this.data);
}
</#if>
</#if>
......
<#-- 表单项 -->
<#if ctrl.getPSDEFormItems()??>
<#list ctrl.getPSDEFormItems() as dataitem>
{
name: '${dataitem.getName()}',
<#if dataitem.getPSDEField()??>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: '${dataitem.getPSDEField().getDataType()}',
</#if>
},
</#list>
<#list ctrl.getPSDEFormItems() as dataitem>
{
name: '${dataitem.getName()}',
<#if dataitem.getPSDEField()??>
<#if ctrl.getControlType() == 'SEARCHFORM'>
<#if dataitem.getPSDEFSearchMode?? && dataitem.getPSDEFSearchMode()??>
prop: '${dataitem.getPSDEFSearchMode().getCodeName()?lower_case}',
<#else>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
</#if>
<#else>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
</#if>
dataType: '${dataitem.getPSDEField().getDataType()}',
</#if>
},
</#list>
</#if>
<#-- 关联主实体的主键 -->
<#if ctrl.getPSAppDataEntity()??>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.isMajor() == false && appDataEntity.getMinorPSAppDERSs()??>
<#list appDataEntity.getMinorPSAppDERSs() as minorAppDERSs>
<#if minorAppDERSs.getMajorPSAppDataEntity()??>
<#assign majorAppDataEntity = minorAppDERSs.getMajorPSAppDataEntity() />
{
name: '${majorAppDataEntity.getCodeName()?lower_case}',
prop: '${majorAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#list>
</#if>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.isMajor() == false && appDataEntity.getMinorPSAppDERSs()??>
<#list appDataEntity.getMinorPSAppDERSs() as minorAppDERSs>
<#if minorAppDERSs.getMajorPSAppDataEntity()??>
<#assign majorAppDataEntity = minorAppDERSs.getMajorPSAppDataEntity() />
{
name: '${majorAppDataEntity.getCodeName()?lower_case}',
prop: '${majorAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#list>
</#if>
</#if>
<#-- 界面主键标识 -->
<#if ctrl.getPSDEFormItems()??>
<#list ctrl.getPSDEFormItems() as dataitem>
<#if dataitem.getPSAppDEField()?? && dataitem.getPSAppDEField().isKeyField() == true>
<#if !P.exists("importService1", dataitem.getPSAppDEField().getId(), "")>
{
name: '${ctrl.getPSAppDataEntity().getCodeName()?lower_case}',
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#if>
</#list>
<#list ctrl.getPSDEFormItems() as dataitem>
<#if dataitem.getPSAppDEField()?? && dataitem.getPSAppDEField().isKeyField() == true>
<#if !P.exists("importService1", dataitem.getPSAppDEField().getId(), "")>
{
name: '${ctrl.getPSAppDataEntity().getCodeName()?lower_case}',
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#if>
</#list>
</#if>
\ No newline at end of file
## ibiz搜索表单相关文档(移动端)
### 一、搜索表单
##### (1)支持功能:重置、条件搜索
##### (2)界面UI
<div style = "display : flex ; overflow: hidden; ">
<img src="images/serch.png" ></img>
</div>
<#-- 绘图极坐标系的角度轴 -->
<#if item.render??>
${item.render.code}
<#else>
{
min: 0,
max: 360,
interval: 30,
startAngle: 45
}
</#if>
\ No newline at end of file
<#-- 绘图X轴 -->
<#if item.render??>
${item.render.code}
<#else>
{
<#if item.getIndex()??>gridIndex:${item.getIndex()},</#if>
position:<#if item.getPosition()?? && item.getPosition() =='bottom'>"bottom"<#else>"top"</#if>,
type:<#if item.getType()??>'${item.getType()}'<#else>'category'</#if>,
name:<#if item.getCaption()??>'${item.getCaption()}'</#if>,
<#if item.getMinValue()??>min:${item.getMinValue()},</#if>
<#if item.getMaxValue()??>max:${item.getMaxValue()},</#if>
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
}
</#if>
\ No newline at end of file
<#-- 绘图极坐标系的径向轴 -->
<#if item.render??>
${item.render.code}
<#else>
{
min: 0,
max: 10,
interval: 2
}
</#if>
\ No newline at end of file
<#-- 绘图平行坐标系 -->
<#if item.render??>
${item.render.code}
<#else>
{
}
</#if>
\ No newline at end of file
<#-- 绘图单轴 -->
<#if item.render??>
${item.render.code}
<#else>
{
}
</#if>
\ No newline at end of file
<#-- 绘图Y轴 -->
<#if item.render??>
${item.render.code}
<#else>
{
<#if item.getIndex()??>gridIndex:${item.getIndex()},</#if>
position:<#if item.getPosition()?? && item.getPosition() =='bottom'>"bottom"<#else>"top"</#if>,
type:<#if item.getType()?? && item.getType() == 'numeric'>'value'<#else>'${item.getType()}'</#if>,
name:<#if item.getCaption()??>'${item.getCaption()}'</#if>,
<#if item.getMinValue()??>min:${item.getMinValue()},</#if>
<#if item.getMaxValue()??>max:${item.getMaxValue()},</#if>
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
}
</#if>
\ No newline at end of file
<#-- 绘图X轴 -->
<#if item.render??>
${item.render.code}
<#else>
{
<#if item.getIndex()??>gridIndex:${item.getIndex()},</#if>
position:<#if item.getPosition()?? && item.getPosition() =='bottom'>"bottom"<#else>"top"</#if>,
type:<#if item.getType()??>'${item.getType()}'<#else>'category'</#if>,
name:<#if item.getCaption()??>'${item.getCaption()}'</#if>,
<#if item.getMinValue()??>min:${item.getMinValue()},</#if>
<#if item.getMaxValue()??>max:${item.getMaxValue()},</#if>
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
}
</#if>
\ No newline at end of file
<#-- 绘图Y轴 -->
<#if item.render??>
${item.render.code}
<#else>
{
<#if item.getIndex()??>gridIndex:${item.getIndex()},</#if>
position:<#if item.getPosition()?? && item.getPosition() =='bottom'>"bottom"<#else>"top"</#if>,
type:<#if item.getType()?? && item.getType() == 'numeric'>'value'<#else>'${item.getType()}'</#if>,
name:<#if item.getCaption()??>'${item.getCaption()}'</#if>,
<#if item.getMinValue()??>min:${item.getMinValue()},</#if>
<#if item.getMaxValue()??>max:${item.getMaxValue()},</#if>
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
}
</#if>
\ No newline at end of file
<#-- 绘图网格start -->
<#if item.render??>
${item.render.code}
<#else>
{
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
}
</#if>
<#-- 绘图网格end -->
\ No newline at end of file
<#-- 柱状图序列start -->
<#if item.render??>
${item.render.code}
<#else>
{
id:'<#if item.getName()??>${item.getName()?lower_case}</#if>',
name:'<#if item.getCaption()??>${item.getCaption()}</#if>',
type:'bar',
xAxisIndex:${item.getIndex()},
yAxisIndex:${item.getIndex()},
datasetIndex:${item.getIndex()},
encode: {
<#if item.getPSChartSeriesEncode()??><#assign chartSeriesEncode = item.getPSChartSeriesEncode() /></#if>
x: [<#if chartSeriesEncode.getX()??><#list chartSeriesEncode.getX() as xValue>'${xValue?lower_case}'<#if xValue_has_next>,</#if></#list></#if>],
y: [<#if chartSeriesEncode.getY()??><#list chartSeriesEncode.getY() as yValue>'${yValue?lower_case}'<#if yValue_has_next>,</#if></#list></#if>]
}<#if item.getBaseOptionJOString()??>,
${item.getBaseOptionJOString()}
</#if>
}
</#if>
<#-- 柱状图序列end -->
\ No newline at end of file
<#-- 折线图序列start -->
<#if item.render??>
${item.render.code}
<#else>
{
id:'<#if item.getName()??>${item.getName()?lower_case}</#if>',
name:'<#if item.getCaption()??>${item.getCaption()}</#if>',
type:'funnel',
datasetIndex:${item.getIndex()},
<#compress><#if item.getLeft()?? && item.getLeft() != "">left:"${item.getLeft()}",</#if>
<#if item.getTop()?? && item.getTop() != 0>top:"${item.getTop()}",</#if>
<#if item.getBottom()?? && item.getBottom() != 0>bottom:"${item.getBottom()}",</#if>
<#if item.getRight()?? && item.getRight() != "">right:"${item.getRight()}",</#if>
<#if item.getWidth()?? && item.getWidth() != "">width:"${item.getWidth()}",</#if>
<#if item.getHeight()?? && item.getHeight() != "">height:"${item.getHeight()}",</#if>
<#if item.getMinValue()?? && item.getMinValue() != 0 >min:"${item.getMinValue()}",</#if>
<#if item.getMaxValue()?? && item.getMaxValue() != 0 >max:"${item.getMaxSize()}",</#if>
<#if item.getMinSize()?? && item.getMinSize() != "">minSize:"${item.getMinSize()}",</#if>
<#if item.getMaxSize()?? && item.getMaxSize() != "">maxSize: "${item.getMaxSize()}",</#if>
<#if item.getFunnelAlign()?? && item.getFunnelAlign() != "">funnelAlign:"${item.getFunnelAlign()}",</#if></#compress>
seriesLayoutBy:"${item.getSeriesLayoutBy()}",
encode:{
<#if item.getPSChartSeriesEncode()??><#assign chartSeriesEncode = item.getPSChartSeriesEncode() /></#if>
itemName:"<#if chartSeriesEncode.getCategory()??>${chartSeriesEncode.getCategory()?lower_case}<#else>${item.getCatalogField()?lower_case}</#if>",
value:"<#if chartSeriesEncode.getValue()??>${chartSeriesEncode.getValue()?lower_case}<#else>${item.getValueField()?lower_case}</#if>"
}<#if item.getBaseOptionJOString()??>,
${item.getBaseOptionJOString()}
</#if>
}
</#if>
<#-- 折线图序列end -->
\ No newline at end of file
<#-- 折线图序列start -->
<#if item.render??>
${item.render.code}
<#else>
{
id:'<#if item.getName()??>${item.getName()?lower_case}</#if>',
name:'<#if item.getCaption()??>${item.getCaption()}</#if>',
type:'line',
xAxisIndex:${item.getIndex()},
yAxisIndex:${item.getIndex()},
datasetIndex:${item.getIndex()},
encode: {
<#if item.getPSChartSeriesEncode()??><#assign chartSeriesEncode = item.getPSChartSeriesEncode() /></#if>
x: [<#if chartSeriesEncode.getX()??><#list chartSeriesEncode.getX() as xValue>'${xValue?lower_case}'<#if xValue_has_next>,</#if></#list></#if>],
y: [<#if chartSeriesEncode.getY()??><#list chartSeriesEncode.getY() as yValue>'${yValue?lower_case}'<#if yValue_has_next>,</#if></#list></#if>]
}<#if item.getBaseOptionJOString()??>,
${item.getBaseOptionJOString()}
</#if>
}
</#if>
<#-- 折线图序列end -->
\ No newline at end of file
<#-- 序列模型start -->
<#if item.getEChartsType()??>
<#if item.getEChartsType() == "line">
new ChartLineSeries({
name:'${item.name?lower_case}',
<#if item.getIdField()??>seriesIdField:"${item.getIdField()?lower_case}",</#if>
<#if item.getSeriesField?? && item.getSeriesField()??>seriesNameField:"${item.getSeriesField()?lower_case}",</#if>
categorField:'<#if item.getCatalogField?? && item.getCatalogField()??>${item.getCatalogField()?lower_case}</#if>',
<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}',emptycode:'empty',emptytext:'${categorCodeList.getEmptyText()}'},</#if>
valueField:'${item.getValueField()?lower_case}',
seriesValues:[],
seriesIndex:${item.getIndex()},
data:[],
seriesMap:{},
<#if item.getPSChartDataSet()??>
<#assign chartDataSet = item.getPSChartDataSet()/>
<#if chartDataSet.getPSChartDataSetFields()??>
dataSetFields:[
<#list chartDataSet.getPSChartDataSetFields() as singleField>
{name:"${singleField.getName()?lower_case}",codelist:<#if singleField.getPSCodeList()??><#assign codelist = singleField.getPSCodeList()/>{type:"${codelist.getCodeListType()}",tag:"${codelist.getCodeName()}",emptycode:'empty',emptytext:'${categorCodeList.getEmptyText()}'}<#else>null</#if>,isGroupField:${singleField.isGroupField()?c},groupMode:"${singleField.getGroupMode()}"}<#if singleField_has_next>,</#if>
</#list>
],
</#if>
</#if>
ecxObject:{
<#-- 序列label start -->
<#if item.containsUserParam("ECX.label")>
label:${item.getUserParam("ECX.label")},
<#else>
label:{
show: true,
position: 'inside'
},
</#if>
<#-- 序列label end -->
<#-- 序列labelLine start -->
<#if item.containsUserParam("ECX.labelLine")>
labelLine:${item.getUserParam("ECX.labelLine")},
<#else>
labelLine:{
length: 10,
lineStyle: {
width: 1,
type: 'solid'
}
},
</#if>
<#-- 序列labelLine end -->
<#-- 序列itemStyle start -->
<#if item.containsUserParam("ECX.itemStyle")>
itemStyle:${item.getUserParam("ECX.itemStyle")},
<#else>
itemStyle:{
borderColor: '#fff',
borderWidth: 1
},
</#if>
<#-- 序列itemStyle end -->
<#-- 序列emphasis start -->
<#if item.containsUserParam("ECX.emphasis")>
emphasis:${item.getUserParam("ECX.emphasis")},
<#else>
emphasis:{
label: {
fontSize: 20
}
}
</#if>
<#-- 序列emphasis end -->
},
ecObject:{
<#if item.getUserParamNames()??>
<#list item.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${item.getUserParam(userparam)},
</#if>
</#list>
</#if>
},
seriesTemp:{
type:'line',
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
},
seriesLayoutBy:"${item.getSeriesLayoutBy()}",
baseOption:{
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
}
})
<#elseif item.getEChartsType() == "funnel">
new ChartFunnelSeries({
name:'${item.name?lower_case}',
<#if item.getIdField()??>seriesIdField:"${item.getIdField()?lower_case}",</#if>
<#if item.getSeriesField?? && item.getSeriesField()??>seriesNameField:"${item.getSeriesField()?lower_case}",</#if>
categorField:'<#if item.getCatalogField?? && item.getCatalogField()??>${item.getCatalogField()?lower_case}</#if>',
<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}',emptycode:'empty',emptytext:'${categorCodeList.getEmptyText()}'},</#if>
valueField:'${item.getValueField()?lower_case}',
seriesValues:[],
seriesIndex:${item.getIndex()},
data:[],
seriesMap:{},
<#if item.getPSChartDataSet()??>
<#assign chartDataSet = item.getPSChartDataSet()/>
<#if chartDataSet.getPSChartDataSetFields()??>
dataSetFields:[
<#list chartDataSet.getPSChartDataSetFields() as singleField>
{name:"${singleField.getName()?lower_case}",codelist:<#if singleField.getPSCodeList()??><#assign codelist = singleField.getPSCodeList()/>{type:"${codelist.getCodeListType()}",tag:"${codelist.getCodeName()}",emptycode:'empty',emptytext:'${codelist.getEmptyText()}'}<#else>null</#if>,isGroupField:${singleField.isGroupField()?c},groupMode:"${singleField.getGroupMode()}"}<#if singleField_has_next>,</#if>
</#list>
],
</#if>
</#if>
ecxObject:{
<#-- 序列label start -->
<#if item.containsUserParam("ECX.label")>
label:${item.getUserParam("ECX.label")},
<#else>
label:{
show: true,
position: 'inside'
},
</#if>
<#-- 序列label end -->
<#-- 序列labelLine start -->
<#if item.containsUserParam("ECX.labelLine")>
labelLine:${item.getUserParam("ECX.labelLine")},
<#else>
labelLine:{
length: 10,
lineStyle: {
width: 1,
type: 'solid'
}
},
</#if>
<#-- 序列labelLine end -->
<#-- 序列itemStyle start -->
<#if item.containsUserParam("ECX.itemStyle")>
itemStyle:${item.getUserParam("ECX.itemStyle")},
<#else>
itemStyle:{
borderColor: '#fff',
borderWidth: 1
},
</#if>
<#-- 序列itemStyle end -->
<#-- 序列emphasis start -->
<#if item.containsUserParam("ECX.emphasis")>
emphasis:${item.getUserParam("ECX.emphasis")},
<#else>
emphasis:{
label: {
fontSize: 20
}
}
</#if>
<#-- 序列emphasis end -->
},
ecObject:{
<#if item.getUserParamNames()??>
<#list item.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${item.getUserParam(userparam)},
</#if>
</#list>
</#if>
},
seriesTemp:{
type:'funnel',
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
},
baseOption:{
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
},
seriesLayoutBy:"${item.getSeriesLayoutBy()}"
})
<#elseif item.getEChartsType() == "pie">
new ChartPieSeries({
name:'${item.name?lower_case}',
<#if item.getIdField()??>seriesIdField:"${item.getIdField()?lower_case}",</#if>
<#if item.getSeriesField?? && item.getSeriesField()??>seriesNameField:"${item.getSeriesField()?lower_case}",</#if>
categorField:'<#if item.getCatalogField?? && item.getCatalogField()??>${item.getCatalogField()?lower_case}</#if>',
<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}',emptycode:'empty',emptytext:'${categorCodeList.getEmptyText()}'},</#if>
valueField:'${item.getValueField()?lower_case}',
seriesValues:[],
seriesIndex:${item.getIndex()},
data:[],
seriesMap:{},
<#if item.getPSChartDataSet()??>
<#assign chartDataSet = item.getPSChartDataSet()/>
<#if chartDataSet.getPSChartDataSetFields()??>
dataSetFields:[
<#list chartDataSet.getPSChartDataSetFields() as singleField>
{name:"${singleField.getName()?lower_case}",codelist:<#if singleField.getPSCodeList()??><#assign codelist = singleField.getPSCodeList()/>{type:"${codelist.getCodeListType()}",tag:"${codelist.getCodeName()}",emptycode:'empty',emptytext:'${codelist.getEmptyText()}'}<#else>null</#if>,isGroupField:${singleField.isGroupField()?c},groupMode:"${singleField.getGroupMode()}"}<#if singleField_has_next>,</#if>
</#list>
],
</#if>
</#if>
ecxObject:{
<#-- 序列label start -->
<#if item.containsUserParam("ECX.label")>
label:${item.getUserParam("ECX.label")},
<#else>
label:{
show: true,
position: 'outside',
},
</#if>
<#-- 序列label end -->
<#-- 序列labelLine start -->
<#if item.containsUserParam("ECX.labelLine")>
labelLine:${item.getUserParam("ECX.labelLine")},
<#else>
labelLine:{
show: true,
length: 10,
lineStyle: {
width: 1,
type: 'solid'
}
},
</#if>
<#-- 序列labelLine end -->
<#-- 序列itemStyle start -->
<#if item.containsUserParam("ECX.itemStyle")>
itemStyle:${item.getUserParam("ECX.itemStyle")},
<#else>
itemStyle:{
borderColor: '#fff',
borderWidth: 1
},
</#if>
<#-- 序列itemStyle end -->
<#-- 序列emphasis start -->
<#if item.containsUserParam("ECX.emphasis")>
emphasis:${item.getUserParam("ECX.emphasis")},
<#else>
emphasis:{
label: {
fontSize: 20
}
}
</#if>
<#-- 序列emphasis end -->
},
ecObject:{
<#if item.getUserParamNames()??>
<#list item.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${item.getUserParam(userparam)},
</#if>
</#list>
</#if>
},
seriesTemp:{
type:'pie',
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
},
baseOption:{
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
},
seriesLayoutBy:"${item.getSeriesLayoutBy()}"
})
<#elseif item.getEChartsType() == "bar">
new ChartBarSeries({
name:'${item.name?lower_case}',
<#if item.getIdField()??>seriesIdField:"${item.getIdField()?lower_case}",</#if>
<#if item.getSeriesField?? && item.getSeriesField()??>seriesNameField:"${item.getSeriesField()?lower_case}",</#if>
categorField:'<#if item.getCatalogField?? && item.getCatalogField()??>${item.getCatalogField()?lower_case}</#if>',
<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}',emptycode:'empty',emptytext:'${categorCodeList.getEmptyText()}'},</#if>
valueField:'${item.getValueField()?lower_case}',
seriesValues:[],
seriesIndex:${item.getIndex()},
data:[],
seriesMap:{},
<#if item.getPSChartDataSet()??>
<#assign chartDataSet = item.getPSChartDataSet()/>
<#if chartDataSet.getPSChartDataSetFields()??>
dataSetFields:[
<#list chartDataSet.getPSChartDataSetFields() as singleField>
{name:"${singleField.getName()?lower_case}",codelist:<#if singleField.getPSCodeList()??><#assign codelist = singleField.getPSCodeList()/>{type:"${codelist.getCodeListType()}",tag:"${codelist.getCodeName()}",emptycode:'empty',emptytext:'${categorCodeList.getEmptyText()}'}<#else>null</#if>,isGroupField:${singleField.isGroupField()?c},groupMode:"${singleField.getGroupMode()}"}<#if singleField_has_next>,</#if>
</#list>
],
</#if>
</#if>
ecxObject:{
<#-- 序列label start -->
<#if item.containsUserParam("ECX.label")>
label:${item.getUserParam("ECX.label")},
<#else>
label:{
show: true,
position: 'inside'
},
</#if>
<#-- 序列label end -->
<#-- 序列labelLine start -->
<#if item.containsUserParam("ECX.labelLine")>
labelLine:${item.getUserParam("ECX.labelLine")},
<#else>
labelLine:{
length: 10,
lineStyle: {
width: 1,
type: 'solid'
}
},
</#if>
<#-- 序列labelLine end -->
<#-- 序列itemStyle start -->
<#if item.containsUserParam("ECX.itemStyle")>
itemStyle:${item.getUserParam("ECX.itemStyle")},
<#else>
itemStyle:{
borderColor: '#fff',
borderWidth: 1
},
</#if>
<#-- 序列itemStyle end -->
<#-- 序列emphasis start -->
<#if item.containsUserParam("ECX.emphasis")>
emphasis:${item.getUserParam("ECX.emphasis")},
<#else>
emphasis:{
label: {
fontSize: 20
}
}
</#if>
<#-- 序列emphasis end -->
},
ecObject:{
<#if item.getUserParamNames()??>
<#list item.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${item.getUserParam(userparam)},
</#if>
</#list>
</#if>
},
seriesTemp:{
type:'bar',
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
},
baseOption:{
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
},
seriesLayoutBy:"${item.getSeriesLayoutBy()}"
})
<#else>
new ChartLineSeries({name:'${item.name?lower_case}',categorField:'<#if item.getCatalogField?? && item.getCatalogField()??>${item.getCatalogField()?lower_case}</#if>',<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}'},</#if>valueField:'${item.getValueField()?lower_case}',data:[]}),
</#if>
</#if>
<#-- 序列模型end -->
\ No newline at end of file
<#-- 折线图序列start -->
<#if item.render??>
${item.render.code}
<#else>
{
id:'<#if item.getName()??>${item.getName()?lower_case}</#if>',
name:'<#if item.getCaption()??>${item.getCaption()}</#if>',
type:'pie',
datasetIndex:${item.getIndex()},
<#compress><#if item.getLeft()?? && item.getLeft() != "">left:"${item.getLeft()}",</#if>
<#if item.getTop()?? && item.getTop() != 0>top:"${item.getTop()}",</#if>
<#if item.getBottom()?? && item.getBottom() != 0>bottom:"${item.getBottom()}",</#if>
<#if item.getRight()?? && item.getRight() != "">right:"${item.getRight()}",</#if>
<#if item.getWidth()?? && item.getWidth() != "">width:"${item.getWidth()}",</#if>
<#if item.getHeight()?? && item.getHeight() != "">height:"${item.getHeight()}",</#if></#compress>
seriesLayoutBy:"${item.getSeriesLayoutBy()}",
encode:{
<#if item.getPSChartSeriesEncode()??><#assign chartSeriesEncode = item.getPSChartSeriesEncode() /></#if>
itemName:"<#if chartSeriesEncode.getCategory()??>${chartSeriesEncode.getCategory()?lower_case}<#else>${item.getCatalogField()?lower_case}</#if>",
value:"<#if chartSeriesEncode.getValue()??>${chartSeriesEncode.getValue()?lower_case}<#else>${item.getValueField()?lower_case}</#if>"
}<#if item.getBaseOptionJOString()??>,
${item.getBaseOptionJOString()}
</#if>
}
</#if>
<#-- 折线图序列end -->
\ No newline at end of file
<template>
<div class="app-data-chart <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.render??><#t>
${ctrl.render.code}
<#else><#t>
<div class="app-charts" :id="chartId" style="<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()};<#else>width:400px;</#if>height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()}px<#else>50vh;</#if>;padding: 6px 0;"></div>
</#if>
</div>
</template>
<#assign import_block>
import echarts from 'echarts';
import moment from "moment";
import CodeListService from "@app-core/service/app/code-list-service";
import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,ChartBarSeries} from '@/model/chart-detail';
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getData(): any {
return null;
}
/**
* 显示处理提示
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop({ default: true }) public showBusyIndicator!: boolean;
/**
* 部件行为--fetch
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public fetchAction!: string;
/**
* Vue声明周期(组件初始化完毕)
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public afterCreated(){
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('load', action)) {
this.load(data);
}
});
}
}
/**
* vue 生命周期
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
<#if destroyed_block??>
${destroyed_block}
</#if>
}
/**
* 图表div绑定的id
*
* @type {}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public chartId:string = this.$util.createUUID();
/**
* echarts图表对象
*
* @type {}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public myChart:any;
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public codeListService:CodeListService = new CodeListService();
/**
* 序列模型
*
* @type {}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public seriesModel:any = {
<#if ctrl.getPSDEChartSerieses?? && ctrl.getPSDEChartSerieses()?? >
<#list ctrl.getPSDEChartSerieses() as chartSeries>
${chartSeries.getName()?lower_case}:${P.getPartCode(chartSeries, 'SERIES_MODEL').code}<#if chartSeries_has_next>,</#if>
</#list>
</#if>
};
/**
* 图表自定义参数集合
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public chartUserParams:any ={
<#if ctrl.getUserParamNames()??>
<#list ctrl.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${ctrl.getUserParam(userparam)}<#if userparam_has_next>,</#if>
</#if>
</#list>
</#if>
};
/**
* 图表基础动态模型
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public chartBaseOPtion:any = {<#if ctrl.getBaseOptionJOString()??>${ctrl.getBaseOptionJOString()}</#if>};
/**
* 初始化图表所需参数
*
* @type {}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public chartOption:any = {
<#-- 标题start -->
<#if ctrl.getPSDEChartTitle()??>
<#assign title= ctrl.getPSDEChartTitle() />
title:{
show:<#if title.isShowTitle()>true<#else>false</#if> ,
text:'<#if title.getTitle()??>${title.getTitle()}</#if>',
subtext:'<#if title.getSubTitle()??>${title.getSubTitle()}</#if>'
},
</#if>
<#-- 标题end -->
<#-- 图例start -->
<#if ctrl.getPSDEChartLegend()??>
<#assign legend= ctrl.getPSDEChartLegend() />
legend:{
show:<#if legend.isShowLegend()>true<#else>false</#if>
},
</#if>
<#-- 图例end -->
<#-- 绘图网格start -->
<#if ctrl.getPSChartGrids()??>
grid:[
<@ibizindent blank=8>
<#list ctrl.getPSChartGrids() as chartGrid>
${P.getPartCode(chartGrid).code}<#if chartGrid_has_next>,</#if>
</#list>
</@ibizindent>
],
</#if>
<#-- 绘图网格end -->
<#-- X轴start -->
<#if ctrl.getPSChartXAxises()??>
xAxis: [
<@ibizindent blank=8>
<#list ctrl.getPSChartXAxises() as chartXAxise>
${P.getPartCode(chartXAxise).code}<#if chartXAxise_has_next>,</#if>
</#list>
</@ibizindent>
],
</#if>
<#-- X轴end -->
<#-- Y轴start -->
<#if ctrl.getPSChartYAxises()??>
yAxis:[
<@ibizindent blank=8>
<#list ctrl.getPSChartYAxises() as chartYAxise>
${P.getPartCode(chartYAxise).code}<#if chartYAxise_has_next>,</#if>
</#list>
</@ibizindent>
],
</#if>
<#-- Y轴end -->
<#-- 提示框组件start -->
tooltip:{
show:true
},
<#-- 提示框组件end -->
<#-- 数据集start -->
dataset:[],
<#-- 数据集end -->
<#-- 序列start -->
series:[
<@ibizindent blank=8>
<#list ctrl.getPSDEChartSerieses() as chartSeriese>
${P.getPartCode(chartSeriese).code}<#if chartSeriese_has_next>,</#if>
</#list>
</@ibizindent>
]
<#-- 序列end -->
};
/**
* 刷新
*
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public refresh(opt: any = {}) {
this.load(opt);
}
/**
* 获取图表数据
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public load(opt?:any) {
let _this = this;
const arg: any = { ...opt };
const parentdata: any = {};
this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata);
Object.assign(arg,{viewparams:this.viewparams});
this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)),arg,this.showBusyIndicator).then((res) => {
if (res) {
this.transformToBasicChartSetData(res.data.records,() =>{_this.drawCharts()});
}
}).catch((error) => {
console.error(error);
});
}
/**
* 绘制图表
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public drawCharts(){
if(!this.myChart){
let element:any = document.getElementById(this.chartId);
this.myChart = echarts.init(element);
}
this.handleChartOPtion();
console.log(this.chartOption);
this.myChart.setOption(this.chartOption);
this.myChart.resize();
}
/**
* 处理图表参数
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public handleChartOPtion(){
if(Object.keys(this.seriesModel).length > 0){
let tempDataSourceMap:Map<string,any> = new Map();
for(let i=0;i<Object.keys(this.seriesModel).length;i++){
Object.values(this.seriesModel).forEach((seriesvalue:any) =>{
if(seriesvalue.seriesIndex === i){
tempDataSourceMap.set(seriesvalue.name,seriesvalue.data);
}
})
}
if(tempDataSourceMap.size > 0){
tempDataSourceMap.forEach((item:any) =>{
this.chartOption.dataset.push({'source':item});
})
}
Object.keys(this.seriesModel).forEach((seriesName:string) =>{
if(this.chartOption && this.chartOption.series.length > 0){
this.chartOption.series.forEach((item:any) =>{
if(this.seriesModel[seriesName].ecxObject){
item = this.$util.deepObjectMerge(item,this.seriesModel[seriesName].ecxObject);
}
if(this.seriesModel[seriesName].baseOption && Object.keys(this.seriesModel[seriesName].baseOption).length > 0){
item = this.$util.deepObjectMerge(item,this.seriesModel[seriesName].baseOption);
}
if(this.seriesModel[seriesName].ecObject){
item = this.$util.deepObjectMerge(item,this.seriesModel[seriesName].ecObject);
}
})
}
//设置多序列
let tempSeries:any = this.seriesModel[seriesName];
if(tempSeries && tempSeries.seriesIdField && tempSeries.seriesValues.length > 0){
const returnIndex:number = this.chartOption.series.findIndex((item:any) =>{
return Object.is(item.id,seriesName);
})
this.chartOption.series.splice(returnIndex,1);
let tempSeriesArray:Array<any> = [];
tempSeries.seriesValues.forEach((seriesvalueItem:any) =>{
let tempSeriesTemp:any = JSON.parse(JSON.stringify(tempSeries.seriesTemp));
<#noparse>Object.assign(tempSeriesTemp,{name:tempSeries.seriesMap[seriesvalueItem],datasetIndex:tempSeries.seriesIndex,encode:{x:tempSeries.categorField,y:`${seriesvalueItem}`}});</#noparse>
this.chartOption.series.push(tempSeriesTemp);
})
}
})
}
if(Object.keys(this.chartBaseOPtion).length > 0){
Object.assign(this.chartOption,this.chartBaseOPtion);
}
if(Object.keys(this.chartUserParams).length >0){
Object.assign(this.chartOption,this.chartUserParams);
}
}
/**
* 实体数据集转化为图表数据集
*
* @param {*} data 实体数据集
* @param {Function} callback 回调
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public async transformToBasicChartSetData(data:any,callback:Function){
if(!data || !Array.isArray(data) || data.length === 0){
return;
}
//获取代码表值
let allCodeList:any = await this.getChartAllCodeList();
if(Object.values(this.seriesModel).length > 0){
Object.values(this.seriesModel).forEach((singleSeries:any,index:number) =>{
// 分组属性
let groupField = singleSeries.dataSetFields.find((datasetField:any) =>{
return datasetField.name === singleSeries.categorField;
});
let tempChartSetData:Array<any> = [];
let tempSeriesValues:Map<string,any> = new Map();
data.forEach((item:any) =>{
let tempChartSetDataItem:any = {};
// 序列属性不存在
if(!singleSeries.seriesIdField){
Object.assign(tempChartSetDataItem,{name:singleSeries.name});
if(singleSeries.dataSetFields && singleSeries.dataSetFields.length >0){
singleSeries.dataSetFields.forEach((singleDataSetField:any) =>{
this.handleSingleDataSetField(item,singleDataSetField,allCodeList,tempChartSetDataItem,groupField);
})
}
}else{
// 序列属性存在时
let tempSeriesValueItem = tempSeriesValues.get(item[singleSeries.seriesIdField]);
if(!tempSeriesValueItem){
tempSeriesValues.set(item[singleSeries.seriesIdField],item[singleSeries.seriesNameField]);
}
Object.assign(tempChartSetDataItem,{name:item[singleSeries.seriesIdField]});
if(singleSeries.dataSetFields && singleSeries.dataSetFields.length >0){
singleSeries.dataSetFields.forEach((singleDataSetField:any) =>{
this.handleSingleDataSetField(item,singleDataSetField,allCodeList,tempChartSetDataItem,groupField);
})
}
}
tempChartSetData.push(tempChartSetDataItem);
})
// 补全数据集合
this.completeDataSet(tempChartSetData,singleSeries,allCodeList);
singleSeries.seriesValues = [...tempSeriesValues.keys()];
let tempSeriesMapObj:any = {};
tempSeriesValues.forEach((value:any,key:any) =>{
tempSeriesMapObj[key] = value;
})
singleSeries.seriesMap = tempSeriesMapObj;
let callbackFunction:any = (index === (Object.values(this.seriesModel).length - 1))?callback:null;
this.transformToChartSeriesDataSet(tempChartSetData,singleSeries,callbackFunction,allCodeList);
})
}
}
/**
* 构建图表序列数据集合
*
* @param {Array<any>} data 传入数据
* @param {Array<any>} item 单个序列
* @param {Array<any>} callback 回调
* @param {*} allCodeList 所有代码表
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public transformToChartSeriesDataSet(data:any,item:any,callback:Function,allCodeList:any):any{
if(item.seriesIdField){
// 多序列
let groupField = item.dataSetFields.filter((datasetField:any) =>{
return datasetField.name === item.categorField;
});
let tempGroupField:Array<any> = groupField.map((item:any) =>{
return item.name;
});
let seriesField = item.dataSetFields.filter((datasetField:any) =>{
return datasetField.name === item.seriesIdField;
});
let tempSeriesField:Array<any> = seriesField.map((item:any) =>{
return item.name;
});
let valueField = item.dataSetFields.filter((datasetField:any) =>{
return datasetField.name === item.valueField;
});
let tempValueField:Array<any> = valueField.map((item:any) =>{
return item.name;
});
item.data = this.groupAndAdd(tempGroupField,tempSeriesField,tempValueField,data,item,groupField,allCodeList);
}else{
//单序列
let groupField = item.dataSetFields.filter((datasetField:any) =>{
return datasetField.name === item.categorField;
});
let tempGroupField:Array<any> = groupField.map((item:any) =>{
return item.name;
})
let valueField = item.dataSetFields.filter((datasetField:any) =>{
return datasetField.name === item.valueField;
});
let tempValueField:Array<any> = valueField.map((item:any) =>{
return item.name;
})
item.data = this.groupAndAdd(tempGroupField,[],tempValueField,data,item,groupField,allCodeList);
}
if(callback && callback instanceof Function){
callback();
}
}
/**
* 分组和求和
* @param {Array<any>} groupField 分组属性
* @param {Array<any>} groupField 值属性
* @param {Array<any>} data 传入数据
* @param {*} groupFieldModel 分组属性模型
* @param {*} allCodeList 所有代码表
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public groupAndAdd(groupField:Array<any>,seriesField:Array<any>,valueField:Array<any>,data:any,item:any,groupFieldModel:any,allCodeList:any){
let tempMap:Map<string,any> = new Map();
let groupMode:string = groupFieldModel[0].groupMode;
let groupKeyStr:string = "";
data.forEach((item:any) =>{
let tempGroupField:string = groupField[0];
groupKeyStr = item[tempGroupField];
let tempMapItem:any = tempMap.get(groupKeyStr);
if(tempMapItem){
tempMapItem.push(item);
tempMap.set(groupKeyStr,tempMapItem);
}else{
tempMap.set(groupKeyStr,[item]);
}
})
// 处理多序列
if(seriesField.length > 0 && tempMap.size > 0){
let tempSeriesField:string = seriesField[0];
tempMap.forEach((item:any,key:string) =>{
let tempItemMap:Map<string,any> = new Map();
item.forEach((singleItem:any)=>{
let seriesValueArray:any = tempItemMap.get(singleItem[tempSeriesField]);
if(seriesValueArray){
seriesValueArray.push(singleItem);
tempItemMap.set(singleItem[tempSeriesField],seriesValueArray);
}else{
tempItemMap.set(singleItem[tempSeriesField],[singleItem]);
}
})
tempMap.set(key,tempItemMap);
});
}
let returnArray:Array<any> = [];
if(seriesField.length == 0){
//单序列
tempMap.forEach((tempItem:any) =>{
if(tempItem.length >0){
let curObject:any = {};
let valueResult:number = 0;
let categorResult:any;
tempItem.forEach((singleItem:any) =>{
categorResult = singleItem[groupField[0]];
valueResult += singleItem[valueField[0]];
})
Object.defineProperty(curObject, groupField[0], {
value: categorResult,
writable : true,
enumerable : true,
configurable : true
});
Object.defineProperty(curObject, valueField[0], {
value: valueResult,
writable : true,
enumerable : true,
configurable : true
});
returnArray.push(curObject);
}
})
}else{
// 多序列
let seriesValuesArray:Array<any> = item.seriesValues;
tempMap.forEach((groupItem:any,groupKey:string) =>{
//求和
let curObject:any = {};
Object.defineProperty(curObject, groupField[0], {
value: groupKey,
writable : true,
enumerable : true,
configurable : true
});
seriesValuesArray.forEach((seriesValueItem:any) =>{
Object.defineProperty(curObject, seriesValueItem, {
value: 0,
writable : true,
enumerable : true,
configurable : true
});
});
groupItem.forEach((seriesItem:any,seriesKey:string) =>{
let seriesNum:number = 0;
seriesItem.forEach((dataItem:any) =>{
seriesNum += dataItem[valueField[0]];
})
curObject[seriesKey] = seriesNum;
})
returnArray.push(curObject);
})
}
// 补全空白分类
if(returnArray.length >0){
let emptyText = (groupFieldModel[0] && groupFieldModel[0].codeList)?groupFieldModel[0].codeList.emptytext:"未定义";
returnArray.forEach((item:any) =>{
if(!item[groupField[0]]){
item[groupField[0]] = emptyText;
}
})
}
returnArray = this.sortReturnArray(returnArray,groupFieldModel,allCodeList);
console.log(JSON.stringify(returnArray));
return returnArray;
}
/**
* 排序数组
*
* @param {Array<any>} arr 传入数组
* @param {*} groupField 分组属性
* @param {*} allCodeList 所有代码表
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public sortReturnArray(arr:Array<any>,groupField:any,allCodeList:any){
let returnArray:Array<any> = [];
// todo
// 分组属性有代码表的情况(最后执行)
if(groupField[0].codelist){
let curCodeList:Map<number,any> = allCodeList.get(groupField[0].codelist.tag);
curCodeList.forEach((codelist:any) =>{
arr.forEach((item:any) =>{
if(Object.is(item[groupField[0].name],codelist)){
returnArray.push(item);
item.hasused = true;
}
})
})
arr.forEach((item:any,index:number) =>{
if(!item.hasused){
returnArray.push(item);
}
})
}else{
// 分组为年份
if(Object.is(groupField[0].groupMode,"YEAR")){
returnArray = arr.sort((a:any, b:any) => {
return Number(a[groupField[0].name]) - Number(b[groupField[0].name]);
});
}else if(Object.is(groupField[0].groupMode,"QUARTER")){
returnArray = this.handleSortGroupData(arr,groupField,"季度");
}else if(Object.is(groupField[0].groupMode,"MONTH")){
returnArray = this.handleSortGroupData(arr,groupField,"月");
}else if(Object.is(groupField[0].groupMode,"YEARWEEK")){
returnArray = this.handleSortGroupData(arr,groupField,"周");
}else if(Object.is(groupField[0].groupMode,"DAY")){
returnArray = arr.sort((a:any, b:any) => {
return moment(a[groupField[0].name]).unix() - moment(b[groupField[0].name]).unix();
});
}else{
returnArray = arr;
}
}
return returnArray;
}
/**
* 排序分组模式下的数据
*
* @param {Array<any>} arr 传入数据
* @param {Array<any>} groupField 分组属性
* @param {Array<any>} label label标签
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public handleSortGroupData(arr:Array<any>,groupField:any,label:string){
arr.forEach((item:any) =>{
let sortFieldValue:Array<any> = item[groupField[0].name].split("-");
Object.assign(item,{sortField:Number(sortFieldValue[0])*10000+Number(sortFieldValue[1])});
item[groupField[0].name] = sortFieldValue[0]+"年"+sortFieldValue[1]+label;
})
arr.sort((a:any, b:any) => {
return Number(a.sortField) - Number(b.sortField);
});
arr.forEach((item:any) =>{
delete item.sortField;
})
return arr;
}
/**
* 补全数据集
*
* @param {Array<any>} data 传入数据
* @param {Array<any>} item 单个序列
* @param {Array<any>} allCodeList 所有的代码表
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public completeDataSet(data:any,item:any,allCodeList:any){
// 分组属性
let groupField = item.dataSetFields.find((datasetField:any) =>{
return datasetField.name === item.categorField;
});
if(Object.is(groupField.groupMode,"")){
return;
}
//分组模式为代码表(补值)
if(Object.is(groupField.groupMode,'CODELIST')){
this.completeCodeList(data,item,allCodeList);
}
//分组模式为年/季度/月份(最大值,最小值,分组,补值)
if(Object.is(groupField.groupMode,"YEAR") || Object.is(groupField.groupMode,"QUARTER") || Object.is(groupField.groupMode,"MONTH") || Object.is(groupField.groupMode,"YEARWEEK") || Object.is(groupField.groupMode,"DAY")){
this.handleTimeData(data,item,allCodeList,groupField);
}
}
/**
* 获取最大值最小值
*
* @param {Array<any>} tempTimeArray 传入数据
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public getRangeData(tempTimeArray:Array<any>){
tempTimeArray.forEach((item:any) =>{
let tempParams:Array<any> = item._i.split("-");
item.sortField = Number(tempParams[0] + tempParams[1]);
})
tempTimeArray.sort((a:any, b:any) => {
return Number(a.sortField) - Number(b.sortField);
});
tempTimeArray.forEach((item:any) =>{
delete item.sortField;
})
return tempTimeArray;
}
/**
* 补全时间类型数据集
*
* @param {Array<any>} data 传入数据
* @param {Array<any>} item 单个序列
* @param {Array<any>} allCodeList 所有的代码表
* @param {Array<any>} groupField 分组属性
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public handleTimeData(data:any,item:any,allCodeList:any,groupField:any){
let valueField = item.dataSetFields.find((datasetField:any) =>{
return datasetField.name === item.valueField;
});
let groupMode:string = groupField.groupMode;
// 排序数据,找到最大值、最小值
let tempTimeArray:Array<any> = [];
if(data && data.length >0){
data.forEach((dataItem:any) =>{
// 判断时间类型是否为空,为空不处理
if(dataItem[groupField.name]){
tempTimeArray.push(moment(dataItem[groupField.name]));
}
})
}
let maxTime:any;
let minTime:any;
if(Object.is(groupMode,"YEAR") || Object.is(groupMode,"DAY")){
maxTime = moment.max(tempTimeArray);
minTime = moment.min(tempTimeArray);
}
if(Object.is(groupMode,"QUARTER")){
tempTimeArray = this.getRangeData(tempTimeArray);
minTime = moment().year((tempTimeArray[0]._i.split("-"))[0]).quarters((tempTimeArray[0]._i.split("-"))[1]);
maxTime = moment().year((tempTimeArray[tempTimeArray.length - 1]._i.split("-"))[0]).quarters((tempTimeArray[tempTimeArray.length - 1]._i.split("-"))[1]);
}
if(Object.is(groupMode,"MONTH")){
tempTimeArray = this.getRangeData(tempTimeArray);
minTime = moment().year((tempTimeArray[0]._i.split("-"))[0]).month((tempTimeArray[0]._i.split("-"))[1]);
maxTime = moment().year((tempTimeArray[tempTimeArray.length - 1]._i.split("-"))[0]).month((tempTimeArray[tempTimeArray.length - 1]._i.split("-"))[1]);
}
if(Object.is(groupMode,"YEARWEEK")){
tempTimeArray = this.getRangeData(tempTimeArray);
minTime = moment().year((tempTimeArray[0]._i.split("-"))[0]).week((tempTimeArray[0]._i.split("-"))[1]);
maxTime = moment().year((tempTimeArray[tempTimeArray.length - 1]._i.split("-"))[0]).week((tempTimeArray[tempTimeArray.length - 1]._i.split("-"))[1]);
}
let timeFragmentArray:Array<any> = [];
let tempGrounpData:Map<string,any> = new Map();
// 时间分段
//groupMode为"YEAR"
if(Object.is(groupMode,"YEAR")){
let curTime:any = minTime;
while(curTime){
if(curTime.isSameOrBefore(maxTime)){
let tempcurTime:any = curTime.clone();
timeFragmentArray.push(tempcurTime.year().toString());
curTime = tempcurTime.clone().add(1, 'years');
}else{
curTime = null;
}
}
}
//groupMode为"QUARTER"
if(Object.is(groupMode,"QUARTER")){
let curTime:any = minTime;
while(curTime){
if(curTime.isSameOrBefore(maxTime)){
let tempcurTime:any = curTime.clone();
timeFragmentArray.push(tempcurTime.year().toString()+"-"+tempcurTime.quarter().toString());
curTime = tempcurTime.clone().add(1, 'quarters');
}else{
curTime = null;
}
}
}
//groupMode为"MONTH"
if(Object.is(groupMode,"MONTH")){
let curTime:any = minTime;
while(curTime){
if(curTime.isSameOrBefore(maxTime)){
let tempcurTime:any = curTime.clone();
timeFragmentArray.push(tempcurTime.year().toString()+"-"+tempcurTime.month().toString());
curTime = tempcurTime.clone().add(1, 'months');
}else{
curTime = null;
}
}
}
//groupMode为"YEARWEEK"
if(Object.is(groupMode,"YEARWEEK")){
let curTime:any = minTime;
while(curTime){
if(curTime.isSameOrBefore(maxTime)){
let tempcurTime:any = curTime.clone();
timeFragmentArray.push(tempcurTime.year().toString()+"-"+tempcurTime.week().toString());
curTime = tempcurTime.clone().add(1, 'weeks');
}else{
curTime = null;
}
}
}
//groupMode为"DAY"
if(Object.is(groupMode,"DAY")){
let curTime:any = minTime;
while(curTime){
if(curTime.isSameOrBefore(maxTime)){
let tempcurTime:any = curTime.clone();
timeFragmentArray.push(tempcurTime.format('YYYY-MM-DD'));
curTime = tempcurTime.clone().add(1, 'days');
}else{
curTime = null;
}
}
}
data.forEach((item:any) =>{
let tempKeyStr:string = item[groupField.name];
let tempGrounpItem:any = tempGrounpData.get(tempKeyStr);
if(!tempGrounpItem){
tempGrounpData.set(tempKeyStr,item);
}
})
timeFragmentArray.forEach((timeFragment:any) =>{
if(!tempGrounpData.get(timeFragment)){
let copyTemp:any = JSON.parse(JSON.stringify(data[0]));
let curObj:any = {};
curObj[groupField.name] = timeFragment;
curObj[valueField.name] = 0;
Object.assign(copyTemp,curObj);
data.push(copyTemp);
}
})
}
/**
* 补全代码表
*
* @param {Array<any>} data 传入数据
* @param {Array<any>} item 单个序列
* @param {Array<any>} allCodeList 所有的代码表
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public completeCodeList(data:any,item:any,allCodeList:any){
let groupField = item.dataSetFields.find((datasetField:any) =>{
return datasetField.name === item.categorField;
});
if(!groupField.codelist){
return;
}
let valueField = item.dataSetFields.find((datasetField:any) =>{
return datasetField.name === item.valueField;
});
let curCodeList:Map<number,any> = allCodeList.get(groupField.codelist.tag);
// 对分类实现分组
let tempGrounpData:Map<string,any> = new Map();
data.forEach((item:any) =>{
let tempGrounpItem:any = tempGrounpData.get(item[groupField.name+'_srfvalue']);
if(!tempGrounpItem){
tempGrounpData.set(item[groupField.name+'_srfvalue'],item);
}
})
if(curCodeList.size !== tempGrounpData.size){
curCodeList.forEach((text:any,value:any) =>{
if(!tempGrounpData.get(value)){
let copyTemp:any = JSON.parse(JSON.stringify(data[0]));
let curObj:any = {};
curObj[groupField.name+'_srfvalue'] = value;
curObj[groupField.name] = text;
curObj[valueField.name] = 0;
Object.assign(copyTemp,curObj);
data.push(copyTemp);
}
})
}
}
/**
* 处理单个属性
*
* @param {*} input 输入值
* @param {*} field 属性值
* @param {*} allCodeList 所有代码表
* @param {*} result 结果值
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public handleSingleDataSetField(input:any,field:any,allCodeList:any,result:any,groupField:any){
let tempFieldObj:any = {};
//存在代码表的情况(自动转化值)
if(field.codelist){
//获取代码表
let curCodeList:Map<number,any> = allCodeList.get(field.codelist.tag);
tempFieldObj[field.name] = curCodeList.get(input[field.name]);
tempFieldObj[field.name+'_srfvalue'] = input[field.name];
}else{
// 不存在代码表的情况
if(groupField && Object.is(groupField.name,field.name)){
if(Object.is(groupField.groupMode,"YEAR") ){
tempFieldObj[field.name] = moment(input[field.name]).year().toString();
}else if(Object.is(groupField.groupMode,"QUARTER") ){
tempFieldObj[field.name] = moment(input[field.name]).year().toString()+"-"+moment(input[field.name]).quarters().toString();
}else if(Object.is(groupField.groupMode,"MONTH") ){
tempFieldObj[field.name] = moment(input[field.name]).year().toString()+"-"+moment(input[field.name]).month().toString();
}else if(Object.is(groupField.groupMode,"YEARWEEK") ){
tempFieldObj[field.name] = moment(input[field.name]).year().toString()+"-"+moment(input[field.name]).week().toString();
}else if(Object.is(groupField.groupMode,"DAY") ){
tempFieldObj[field.name] = moment(input[field.name]).format("YYYY-MM-DD");
}else{
tempFieldObj[field.name] = input[field.name];
}
}else{
tempFieldObj[field.name] = input[field.name]
}
}
Object.assign(result,tempFieldObj);
}
/**
* 获取图表所需代码表
*
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public getChartAllCodeList():Promise<any>{
return new Promise((resolve:any,reject:any) =>{
let codeListMap:Map<string,any> = new Map();
if(Object.values(this.seriesModel).length >0){
let tempFlag:boolean = true;
Object.values(this.seriesModel).forEach((singleSeries:any) =>{
if(singleSeries.dataSetFields && singleSeries.dataSetFields.length >0){
let promiseArray:Array<any> = [];
let promiseKeyArray:Array<any> = [];
singleSeries.dataSetFields.forEach((singleDataSetField:any,index:any) =>{
if(singleDataSetField.codelist){
tempFlag = false;
if(!codeListMap.get(singleDataSetField.codelist.tag)){
promiseArray.push(this.getCodeList(singleDataSetField.codelist));
promiseKeyArray.push(singleDataSetField.codelist.tag);
Promise.all(promiseArray).then((result:any) =>{
if(result && result.length >0){
result.forEach((codeList:any) =>{
let tempCodeListMap:Map<number,any> = new Map();
if(codeList.length >0){
codeList.forEach((codeListItem:any) =>{
tempCodeListMap.set(codeListItem.value,codeListItem.text);
})
}
codeListMap.set(singleDataSetField.codelist.tag,tempCodeListMap);
})
resolve(codeListMap);
}
})
}
}
})
}
})
if(tempFlag){resolve(codeListMap);}
}else{
resolve(codeListMap);
}
})
}
/**
* 获取代码表
*
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public getCodeList(codeListObject:any):Promise<any>{
return new Promise((resolve:any,reject:any) =>{
if(codeListObject.tag && Object.is(codeListObject.type,"STATIC")){
const codelist = this.$store.getters.getCodeList(codeListObject.tag);
if (codelist) {
resolve([...JSON.parse(JSON.stringify(codelist.items))]);
} else {
console.log(`<#noparse>----${codeListObject.tag}----代码表不存在</#noparse>`);
}
}else if(codeListObject.tag && Object.is(codeListObject.type,"DYNAMIC")){
this.codeListService.getItems(codeListObject.tag).then((res:any) => {
resolve(res);
}).catch((error:any) => {
console.log(`<#noparse>----${codeListObject.tag}----代码表不存在</#noparse>`);
});
}
})
}
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
<#assign content>
fetchAction="<#if ctrl.getFetchPSControlAction()?? && ctrl.getFetchPSControlAction().getPSAppDEMethod()??>${ctrl.getFetchPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
:showBusyIndicator="${ctrl.isShowBusyIndicator()?c}"
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
.app-data-chart {
width: 100%;
height: 100%;
}
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.getCodeName()}')}${srfclassname('${ctrl.name}')}Mode
*/
public getDataItems(): any[] {
return [
{
name:'query',
prop:'query'
},
]
}
<#ibizinclude>
../@MACRO/MODEL/MODEL_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
## ibiz图表视图相关文档(移动端)
### 一、图表(序列)类型
#### 1、漏斗图
##### (1) 支持功能
- ###### 自定义分组:需配置代码表
- ###### 图例数据自定义切换
##### (2) 平台配置
- 选择序列类型为漏斗图、坐标系为:无坐标系、分类属性为该实体的分类属性、值属性为该实体的值属性
<div style = "display:flex; overflow:hidden; ">
<img src="images/README/pz_funnel_1.png" ></img>
</div>
-
##### (3) 界面UI
<div style = "display:flex; overflow:hidden; ">
<img src="images/README/funnel.png" ></img>
</div>
#### 2、条形图
##### (1)支持功能:
- ###### 自定义分组:季度分组、年分组、月分组(示例为季度分组)
- ###### 图例数据自定义切换
##### (2) 平台配置
- 建立坐标轴(x、y)数据字段为该轴展示的数据(见二坐标轴配置)
- 选择序列类型为条形图、x、y坐标轴(为第一步建立的坐标轴)、分类属性为该实体的分类属性、值属性为该实体的值属性、分组模式
<div style = "display : flex ; overflow: hidden; ">
<img src="images/README/pz_bar_2.png" ></img>
</div>
##### (3)界面UI
<div style = "display : flex ; overflow: hidden; ">
<img src="images/README/bar.png" ></img>
</div>
#### 3、饼图
##### (1)支持功能
- ###### 自定义分组:季度分组、年分组、月分组(示例为季度分组)、代码表
- ###### 图例数据自定义切换
##### (2) 平台配置
- 建立坐标轴(x、y)数据字段为该轴展示的数据(见二坐标轴配置)
- 选择序列类型为饼图、x、y坐标轴(为第一步建立的坐标轴)、分类属性为该实体的分类属性、值属性为该实体的值属性
<div style = "display : flex ; overflow: hidden; ">
<img src="images/README/pz_bing_1.png" ></img>
</div>
##### (3)界面UI
<div style = "display : flex ; overflow: hidden; ">
<img src="images/README/bing.png" ></img>
</div>
#### 4、折线图
##### (1)支持功能:
- ###### 自定义分组:需配置代码表
- ###### 图例数据自定义切换
##### (2)平台配置
- 建立坐标轴(x、y)数据字段为该轴展示的数据(见二坐标轴配置)
- 选择序列类型为折线图、x、y坐标轴(为第一步建立的坐标轴)、分类属性为该实体的分类属性、值属性为该实体的值属性
<div style = "display : flex ; overflow: hidden; ">
<img src="images/README/pz_line_1.png" ></img>
</div>
##### (3)界面UI
<div style = "display : flex ; overflow: hidden; ">
<img src="images/README/line.png" ></img>
</div>
### 二、坐标轴
新建坐标轴:标题为该坐标轴的标题、坐标轴类型(分类、数值、时间)、坐标轴位置(坐标轴展示数据的位置)
数据字段(该坐标轴的数据属性)
<div style = "display : flex ; overflow: hidden; ">
<img src="images/README/pz_bar_1.png" ></img>
</div>
\ No newline at end of file
<#assign extendsClass>ChartServiceBase</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=CHART#NEW
\ No newline at end of file
......@@ -69,7 +69,7 @@
<#-- END:输出分页头部 -->
<#if ctrl.getCalendarStyle() == "TIMELINE">
<div class="calendar-events">
<van-steps direction="vertical">
<van-steps active-icon="passed" inactive-icon="passed" direction="vertical">
<van-step v-for="i in count" :key="i">
<p>{{year}}-{{month+1}}-{{i}}</p>
<template v-for="(it,index) in evendata[activeItem]">
......@@ -88,14 +88,17 @@
<#elseif ctrl.getCalendarStyle() == "MONTH_TIMELINE" || ctrl.getCalendarStyle() == "WEEK_TIMELINE">
<div class="calendar-events">
<van-steps direction="vertical">
<van-steps active-icon="passed" inactive-icon="passed" direction="vertical">
<van-step v-for="(i,index) in evendata[activeItem]" :key="index">
<p>{{i.time}}</p>
<div v-for="item in i.evens" :key="item.id" class="even-box">
<#-- BENGIN: 事件内容项 -->
<#ibizinclude>./EVENTS_CONTENT.vue.ftl</#ibizinclude>
<#-- END: 事件内容项 -->
<ion-icon @click="remove([item])" class="event-delete" name="close-outline"></ion-icon>
<div class="touch" v-for="(item,index) in i.evens" :key="index" @touchstart="touchStart" @touchend="touchEnd">
<ion-checkbox v-show="showCheack" class="touch-checkbox" @click.stop="checkboxSelect(item)"></ion-checkbox>
<div :key="item.id" class="even-box">
<#-- BENGIN: 事件内容项 -->
<#ibizinclude>./EVENTS_CONTENT.vue.ftl</#ibizinclude>
<#-- END: 事件内容项 -->
<ion-icon v-show="!showCheack" @click="remove([item])" class="event-delete" name="close-outline"></ion-icon>
</div>
</div>
</van-step>
</van-steps>
......
......@@ -167,6 +167,7 @@ import moment from 'moment';
*/
public count :number = 20;
/**
* 获取单项树
*
......@@ -243,7 +244,6 @@ import moment from 'moment';
return ;
}
this.activeItem = _value;
this.formatData(new Date(this.year+'/'+(this.month+1)+'/'+this.day));
}
/**
......@@ -486,6 +486,26 @@ import moment from 'moment';
}
});
for (const key in obj) {
<#if ctrl.getPSSysCalendarItems()??>
<#list ctrl.getPSSysCalendarItems() as calendaritem>
<#if calendaritem.getItemType()??>
let ${calendaritem.getItemType()?lower_case} = false;
</#if>
</#list>
</#if>
obj[key].forEach((item:any,index:number) => {
<#if ctrl.getPSSysCalendarItems()??>
<#list ctrl.getPSSysCalendarItems() as calendaritem>
<#if calendaritem.getItemType()??>
if(item.itemType=="${calendaritem.getItemType()?lower_case}" && ${calendaritem.getItemType()?lower_case}){
obj[key].splice(0,index);
}else{
${calendaritem.getItemType()?lower_case} = true;
}
</#if>
</#list>
</#if>
});
this.sign.push({time:key,evens:obj[key]});
}
}
......@@ -616,7 +636,7 @@ import moment from 'moment';
<#list ctrl.getPSSysCalendarItems() as calendarItem>
<#if calendarItem.getPSAppDataEntity()??>
<#assign _appde = calendarItem.getPSAppDataEntity() />
case "${calendarItem.getItemType()}":
case "${calendarItem.getItemType()?lower_case}":
_context.${_appde.getCodeName()?lower_case} = $event.${_appde.getCodeName()?lower_case};
view = this.getEditView("${_appde.getCodeName()?lower_case}");
break;
......@@ -632,7 +652,7 @@ import moment from 'moment';
if (Object.is(view.placement, 'POPUPMODAL')) {
container = await this.$appmodal.openModal(view, JSON.parse(JSON.stringify(_context)), JSON.parse(JSON.stringify(this.viewparams)));
} else if (view.placement.startsWith('DRAWER')) {
container = this.$appdrawer.openDrawer(view, JSON.parse(JSON.stringify(_context)), JSON.parse(JSON.stringify(this.viewparams)));
container = await this.$appdrawer.openDrawer(view, JSON.parse(JSON.stringify(_context)), JSON.parse(JSON.stringify(this.viewparams)));
}
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
......@@ -658,6 +678,66 @@ import moment from 'moment';
this.formatData(new Date(year + '/' + month + '/' + (week*7 - weekline + 1)));
}
}
/**
* 选中数组
*
* @param {Array<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public selectedArray:Array<any> = [];
/**
* 是否展示多选
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop({default:false}) showCheack?: boolean;
/**
* 选中或取消事件
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public checkboxSelect(item:any){
let count = this.selectedArray.findIndex((i) => {
return i.mobile_entity1id == item.mobile_entity1id;
});
if(count == -1){
this.selectedArray.push(item);
}else{
this.selectedArray.splice(count,1);
}
}
/**
* 长按定时器
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public loop :any;
/**
* 开始长按
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public touchStart () {
      clearTimeout(this.loop); //再次清空定时器,防止重复注册定时器
      this.loop = setTimeout(() => {
this.$emit('showCheackChange', !this.showCheack);
      }, 1000);
    }
/**
* 结束长按
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public touchEnd () {
clearTimeout(this.loop); //清空定时器,防止重复注册定时器
}
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
<#-- content -->
<#assign content>
:showBusyIndicator="${ctrl.isShowBusyIndicator()?c}"
:showCheack="showCheack"
@showCheackChange="showCheackChange"
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
......
......@@ -120,6 +120,7 @@
margin-bottom: 5px;
border-radius: 4px;
color: #333;
width: 100%;
}
.evenname {
padding: 5px 0;
......@@ -137,4 +138,14 @@
}
</#if>
.van-step__icon--active, .van-step__title--active {
color: #969799;
}
.touch{
display:flex ;
align-items: center;
.touch-checkbox{
min-width: 25px;
margin-right: 10px;
}
}
\ No newline at end of file
<#assign import_block>
import Calendar from "mpvue-calendar";
import "mpvue-calendar/src/browser-style.css";
import moment from 'moment';
</#assign>
<#assign components>
Calendar
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#if ctrl.getPSSysCalendarItems()??>
<#list ctrl.getPSSysCalendarItems() as calendarItem>
<div v-if="activeItem == '<#if calendarItem.getItemType()??>${calendarItem.getItemType()?lower_case}</#if>'" <#if ctrl.getCalendarStyle() == "TIMELINE">:key="item.id"</#if>>
<div v-if="activeItem == '<#if calendarItem.getItemType()??>${calendarItem.getItemType()?lower_case}</#if>'" <#if ctrl.getCalendarStyle() == "TIMELINE">:key="item.id"</#if><#if calendarItem.getPSSysCalendarItemRVs()??>@click="onEventClick(item)"</#if>>
<#if calendarItem.getPSLayoutPanel?? && calendarItem.getPSLayoutPanel()??>
<#assign layoutpanel=calendarItem.getPSLayoutPanel()>
<layout_${layoutpanel.getName()} :context="{}" :viewparams="{}" :item="item"></layout_${layoutpanel.getName()}>
<#else>
<#if calendarItem.getTextPSAppDEField()??>
<#assign text=true>
<div class="evenname">{{item.${calendarItem.getTextPSAppDEField().getName()?lower_case}}}</div>
......@@ -16,6 +20,7 @@
<#if !text>
<div class="evenname">{{item.<#if appde.getMajorPSAppDEField()??>${appde.getMajorPSAppDEField().getCodeName()?lower_case}<#else>srfmajortext</#if>}}}</div>
</#if>
</#if>
</div>
</#list>
</#if>
\ No newline at end of file
## ibiz日历样式相关文档(移动端)
### 一、日历部件样式
#### 1、月/月(复合时间轴)
##### (1)支持功能:年/月/日切换、切换日历样式、删除日程、日程展示标识、点击日期更新日程
##### (1)支持功能:年/月/日切换、切换日历样式、删除日程、日程展示标识、点击日期更新日程、长按事件多选、长按显示批操工具栏
##### (2)界面UI
<div style = "display : flex ; overflow: hidden; ">
<div style = "display:flex; overflow:hidden; ">
<img src="images/README/mounth.png" ></img>
<img src="images/README/mounth_top.png" ></img>
</div>
<div style = "display:flex; overflow:hidden; ">
<img src="images/README/each.png" ></img>
</div>
#### 2、周/周(复合时间轴)
##### (1)支持功能:年/月/日切换、删除日程、日程展示标识、时间轴日程
##### (1)支持功能:年/月/日切换、删除日程、日程展示标识、时间轴日程、长按事件多选
##### (2)界面UI
​ ![week](images/README/week.png)
<div style = "display : flex ; overflow: hidden; ">
<img src="images/README/week.png" ></img>
<img src="images/README/week_touch.png" ></img>
</div>
#### 3、天
##### (1)支持功能:展示日程
......
......@@ -8,7 +8,11 @@
<div class="app-mob-mdctrl-${ctrl.name}">
<ion-list class="items">
<template v-if="(viewType == 'DEMOBMDVIEW9') && controlStyle != 'SWIPERVIEW' ">
<ion-item-sliding v-for="(item, index) in items" @click="goPage(item)" :key="index" class="app-mob-mdctrl-item">
<div class="selectall">
<ion-checkbox :checked="selectAllIschecked" v-show="showCheack" @ionChange="checkboxAll"></ion-checkbox>
<ion-label class="selectal-label" v-show="showCheack">全选</ion-label>
</div>
<ion-item-sliding v-for="(item, index) in items" @click="goPage(item)" :key="index" class="app-mob-mdctrl-item" @touchstart="start" @touchend="end">
<#-- BENGIN:输出界面行为组 -->
<@outPutActionGroup ctrl />
<#-- END:输出界面行为组 -->
......@@ -18,6 +22,7 @@
<#-- END:输出项布局面板 -->
<#else>
<ion-item>
<ion-checkbox :checked="item.checked" v-show="showCheack" @click.stop="checkboxSelect(item)"></ion-checkbox>
<#--实体列表项集合-->
<#if ctrl.getPSDEListItems()??>
<!-- 列表视图样式 -->
......@@ -36,7 +41,11 @@
<ion-list class="items">
<#--多数据视图||多数据视图(部件视图)-->
<template v-if="(viewType == 'DEMOBMDVIEW') && controlStyle != 'SWIPERVIEW' ">
<ion-item-sliding v-for="(item, index) in items" @click="goPage(item)" :key="index" class="app-mob-mdctrl-item">
<div class="selectall">
<ion-checkbox :checked="selectAllIschecked" v-show="showCheack" @ionChange="checkboxAll"></ion-checkbox>
<ion-label class="selectal-label" v-show="showCheack">全选</ion-label>
</div>
<ion-item-sliding v-for="(item, index) in items" @click="goPage(item)" :key="index" class="app-mob-mdctrl-item" @touchstart="start" @touchend="end">
<#-- BENGIN:输出界面行为组 -->
<@outPutActionGroup ctrl />
<#-- END:输出界面行为组 -->
......@@ -46,6 +55,7 @@
<#-- END:输出项布局面板 -->
<#else>
<ion-item>
<ion-checkbox :checked="item.checked" v-show="showCheack" @click.stop="checkboxSelect(item)"></ion-checkbox>
<#--实体列表项集合-->
<#if ctrl.getPSDEListItems()??>
<!-- 列表视图样式 -->
......
......@@ -674,6 +674,91 @@
this.goPage(item);
}
/**
* 是否展示多选
*
* @memberof Mdctrl
*/
@Prop({default:false}) showCheack?: boolean;
/**
* 选中或取消事件
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public checkboxSelect(item:any){
let count = this.selectedArray.findIndex((i) => {
return i.${appde.getKeyPSAppDEField().getCodeName()?lower_case} == item.${appde.getKeyPSAppDEField().getCodeName()?lower_case};
});
let re = false;
if(count == -1){
re = true;
this.selectedArray.push(item);
}else{
this.selectedArray.splice(count,1);
}
this.items.forEach((_item:any,index:number)=>{
if(_item.${appde.getKeyPSAppDEField().getCodeName()?lower_case} == item.${appde.getKeyPSAppDEField().getCodeName()?lower_case}){
this.items[index].checked = re;
}
});
}
/**
* 长按定时器
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public loop :any;
/**
* 开始长按
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public start () {
      clearTimeout(this.loop); //再次清空定时器,防止重复注册定时器
      this.loop = setTimeout(() => {
this.$emit('showCheackChange', !this.showCheack);
      }, 1000);
    }
/**
* 结束长按
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public end () {
clearTimeout(this.loop); //清空定时器,防止重复注册定时器
}
/**
* 全选事件
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public checkboxAll(item:any) {
this.selectAllIschecked = item.detail.checked;
if(this.selectAllIschecked){
this.selectedArray = JSON.parse(JSON.stringify(this.items));
}else{
this.selectedArray = [];
}
this.items.forEach((item:any,index:number)=>{
this.items[index].checked = this.selectAllIschecked
});
this.$forceUpdate();
}
/**
* 全选按钮选中状态
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public selectAllIschecked = false;
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
......@@ -10,6 +10,10 @@
createAction="<#if ctrl.getCreatePSControlAction?? && ctrl.getCreatePSControlAction()?? && ctrl.getCreatePSControlAction().getPSAppDEMethod()??>${ctrl.getCreatePSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
fetchAction="<#if ctrl.getFetchPSControlAction?? && ctrl.getFetchPSControlAction()?? && ctrl.getFetchPSControlAction().getPSAppDEMethod()??>${ctrl.getFetchPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
:isMutli="!isSingleSelect"
<#if view.getViewType?? && view.getViewType()?? && view.getViewType() == 'DEMOBMDVIEW' || view.getViewType() == 'DEMOBMDVIEW9'>
:showCheack="showCheack"
@showCheackChange="showCheackChange"
</#if>
:isTempMode="<#if ctrl.isTempMode?? && ctrl.isTempMode()??>${ctrl.isTempMode()?c}</#if>"
</#assign>
<#ibizinclude>
......
......@@ -7,4 +7,15 @@
</#if>
.ibz-ionic-item{
--inner-border-width:0;
}
.iconcheck{
width: 70px;
}
.selectall{
padding: 5px 20px;
padding: 0 20px;
display: flex;
}
.selectal-label{
padding-left: 15px;
}
\ No newline at end of file
......@@ -2,6 +2,7 @@
<#assign layoutpanel=ctrl.getItemPSLayoutPanel()>
<div style="width:100%;">
<ion-item class="ibz-ionic-item">
<ion-checkbox class="iconcheck" v-show="showCheack" @click.stop="checkboxSelect(item)"></ion-checkbox>
<layout_${layoutpanel.getName()} :context="{}" :viewparams="{}" :item="item"></layout_${layoutpanel.getName()}>
</ion-item>
</div>
......
......@@ -11,48 +11,48 @@
public getDataItems(): any[] {
return [
<#-- 表格数据项 -->
<#if ctrl.getPSListDataItems?? && ctrl.getPSListDataItems()??>
<#list ctrl.getPSListDataItems() as dataitem>
<#if ctrl.getPSListDataItems?? && ctrl.getPSListDataItems()??>
<#list ctrl.getPSListDataItems() as dataitem>
{
name: '${dataitem.getName()}',
<#if dataitem.getPSDEField()??>
<#if dataitem.getPSDEField()??>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: '${dataitem.getPSDEField().getDataType()}',
</#if>
</#if>
},
</#list>
</#if>
</#list>
</#if>
<#-- 关联主实体的主键 -->
<#if ctrl.getPSAppDataEntity()??>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.isMajor() == false && appDataEntity.getMinorPSAppDERSs()??>
<#list appDataEntity.getMinorPSAppDERSs() as minorAppDERSs>
<#if minorAppDERSs.getMajorPSAppDataEntity()??>
<#assign majorAppDataEntity = minorAppDERSs.getMajorPSAppDataEntity() />
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.isMajor() == false && appDataEntity.getMinorPSAppDERSs()??>
<#list appDataEntity.getMinorPSAppDERSs() as minorAppDERSs>
<#if minorAppDERSs.getMajorPSAppDataEntity()??>
<#assign majorAppDataEntity = minorAppDERSs.getMajorPSAppDataEntity() />
{
name: '${majorAppDataEntity.getCodeName()?lower_case}',
prop: '${majorAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#list>
</#if>
</#if>
</#list>
</#if>
</#if>
<#if ctrl.getPSListDataItems?? && ctrl.getPSListDataItems()??>
<#list ctrl.getPSListDataItems() as dataitem>
<#list ctrl.getPSListDataItems() as dataitem>
<#-- 界面主键标识 -->
<#if dataitem.getPSDEField?? && dataitem.getPSDEField()??>
<#if !P.exists("importService", dataitem.getPSDEField().getId(), "")>
<#if dataitem.getPSDEField().isKeyDEField() == true>
<#if dataitem.getPSDEField?? && dataitem.getPSDEField()??>
<#if !P.exists("importService", dataitem.getPSDEField().getId(), "")>
<#if dataitem.getPSDEField().isKeyDEField() == true>
{
name: '${ctrl.getPSAppDataEntity().getCodeName()?lower_case}',
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#if>
</#if>
</#list>
</#if>
</#if>
</#if>
</#list>
</#if>
<#if view.hasPSControl('searchform')>
......@@ -78,7 +78,7 @@ ${P.getCtrlCode('searchform', 'MODEL_CONTENT.ts').code}
name:'srfparentdata',
prop:'srfparentdata'
}
]
];
}
<#ibizinclude>
......
......@@ -28,11 +28,11 @@
#### 三、效果展示
1、列表视图(默认)、(无刷新)、(无滑动)
1、列表视图(默认)、(无刷新)、(无滑动)、长按多选、排序、批操工具栏
​ (1)、展示效果
![默认列表样式](./imgs/default-list-view.png)
![1589010711651](./imgs/each.png) ![默认列表样式](./imgs/default-list-view.png)
​ (2)、支持功能(刷新、滑动) ps:无刷新不支持刷新、无滑动不支持滑动
......
......@@ -2,7 +2,14 @@
<div class = "card-view ">
<#if view.getViewType?? && view.getViewType()?? && view.getViewType() == 'DEMOBDATAVIEW'>
<ion-row >
<ion-col :size="size" v-for="(item,index) in items" :key="index">
<ion-col size="12" v-show="showCheack">
<div class="selectall">
<ion-checkbox :checked="selectAllIschecked" v-show="showCheack" @ionChange="checkboxAll"></ion-checkbox>
<ion-label class="selectal-label" v-show="showCheack">全选</ion-label>
</div>
</ion-col>
<ion-col :size="size" v-for="(item,index) in items" :key="index" @touchstart="start" @touchend="end">
<ion-checkbox :checked="item.checked" v-show="showCheack" class="ionic-checkbox" @click.stop="checkboxSelect(item)"></ion-checkbox>
<ion-card :class="[size == '12'? 'ios hydrated ibz-card-12':' ios hydrated ibz-card-6']">
<div :class="{'line':size == '12'}">
<img class="cardimg" :style="{width :size == '6' ?'':'30%'}" src="assets/images/card.jpg" />
......@@ -19,7 +26,7 @@
</#if>
</div>
</div>
<ion-icon :style="{color :size == '6' ?'#fff':'#333'}" @click="remove([item])" class="card-delete" name="close-outline"></ion-icon>
<ion-icon v-show="!showCheack" :style="{color :size == '6' ?'#fff':'#333'}" @click="remove([item])" class="card-delete" name="close-outline"></ion-icon>
</ion-card>
</ion-col>
</ion-row>
......
......@@ -642,6 +642,91 @@
}
/**
* 是否展示多选
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
@Prop({default:false}) showCheack?: boolean;
/**
* 选中或取消事件
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public checkboxSelect(item:any){
let count = this.selectedArray.findIndex((i) => {
return i.${appde.getKeyPSAppDEField().getCodeName()?lower_case} == item.${appde.getKeyPSAppDEField().getCodeName()?lower_case};
});
let re = false;
if(count == -1){
re = true;
this.selectedArray.push(item);
}else{
this.selectedArray.splice(count,1);
}
this.items.forEach((_item: any, index: number) => {
if (_item.${appde.getKeyPSAppDEField().getCodeName()?lower_case} == item.${appde.getKeyPSAppDEField().getCodeName()?lower_case}) {
this.items[index].checked = re;
}
});
}
/**
* 长按定时器
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public loop :any;
/**
* 开始长按
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public start () {
      clearTimeout(this.loop); //再次清空定时器,防止重复注册定时器
      this.loop = setTimeout(() => {
this.$emit("showCheackChange", !this.showCheack);
      }, 1000);
    }
/**
* 结束长按
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public end () {
clearTimeout(this.loop); //清空定时器,防止重复注册定时器
}
/**
* 全选事件
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public checkboxAll(item:any) {
this.selectAllIschecked = item.detail.checked;
if(this.selectAllIschecked){
this.selectedArray = JSON.parse(JSON.stringify(this.items));
}else{
this.selectedArray = [];
}
this.items.forEach((item:any,index:number)=>{
this.items[index].checked = this.selectAllIschecked
});
this.$forceUpdate();
}
/**
* 全选按钮选中状态
*
* @memberof ${srfclassname('${ctrl.name}')}
*/
public selectAllIschecked = false;
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
......@@ -7,6 +7,8 @@
loadAction="<#if ctrl.getGetPSControlAction?? && ctrl.getGetPSControlAction()?? && ctrl.getGetPSControlAction().getPSAppDEMethod()??>${ctrl.getGetPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
createAction="<#if ctrl.getCreatePSControlAction?? && ctrl.getCreatePSControlAction()?? && ctrl.getCreatePSControlAction().getPSAppDEMethod()??>${ctrl.getCreatePSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
fetchAction="<#if ctrl.getFetchPSControlAction?? && ctrl.getFetchPSControlAction()?? && ctrl.getFetchPSControlAction().getPSAppDEMethod()??>${ctrl.getFetchPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
:showCheack="showCheack"
@showCheackChange="showCheackChange"
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
......
......@@ -21,12 +21,10 @@
font-size: 15px;
}
.ibz-card-12 {
margin: 12px;
margin-bottom: 0;
margin: 12px 12px 0 35px;
}
.ibz-card-6{
margin-bottom: 0;
margin: 5px 10px;
margin: 5px 10px 5px 30px;
}
.ibz-content {
padding: 10px;
......@@ -40,4 +38,15 @@
.cardimg{
height: auto;
}
.ionic-checkbox {
position: absolute;
top: calc(50% - 13px);
}
.selectall{
padding: 0;
display: flex;
}
.selectal-label{
padding-left: 15px;
}
}
\ No newline at end of file
## ibiz数据视图部件相关文档(移动端)
### 一、卡片视图
##### (1)支持功能:样式切换、排序、删除、长按多选、长按显示批操工具栏
##### (2)界面UI
<div style = "display:flex; overflow:hidden;">
<div>
<img src="images/README/card_list.png" ></img>
<img src="images/README/card_box.png" ></img>
</div>
<div>
<img src="images/README/each.png" ></img>
<img src="images/README/each_box.png" ></img>
</div>
</div>
......@@ -5,7 +5,7 @@
<#if item.render??>
${item.render.code}
<#else>
<app-form-item v-show="detailsModel.${item.name}.visible" name='${item.name}' :itemRules="this.rules.${item.name}" class='<#if item.getPSSysCss?? && item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>'<#if item.getLabelPSSysCss?? && item.getLabelPSSysCss()??> labelStyle="${item.getLabelPSSysCss().getCssName()}"</#if> :caption="<#if langbase??>$t('${langbase}.details.${item.name}')<#else>'${item.getCaption()}'</#if>" uiStyle="${item.getDetailStyle()}" :labelWidth="${item.getLabelWidth()?c}" :isShowCaption="${item.isShowCaption()?c}" :error="detailsModel.${item.name}.error" :isEmptyCaption="${item.isEmptyCaption()?c}" labelPos="${item.getLabelPos()}">
<app-form-item ref="${item.name}rules" :checkValue="this.data.${item.name}" v-show="detailsModel.${item.name}.visible" name='${item.name}' :itemRules="this.rules.${item.name}" class='<#if item.getPSSysCss?? && item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>'<#if item.getLabelPSSysCss?? && item.getLabelPSSysCss()??> labelStyle="${item.getLabelPSSysCss().getCssName()}"</#if> :caption="<#if langbase??>$t('${langbase}.details.${item.name}')<#else>'${item.getCaption()}'</#if>" uiStyle="${item.getDetailStyle()}" :labelWidth="${item.getLabelWidth()?c}" :isShowCaption="${item.isShowCaption()?c}" :error="detailsModel.${item.name}.error" :isEmptyCaption="${item.isEmptyCaption()?c}" labelPos="${item.getLabelPos()}">
<#if item.isCompositeItem()>
<#assign formitems=item.getPSDEFormItems()>
<app-range-editor v-model="data.${item.name}" :activeData="data" :disabled="detailsModel.${item.name}.disabled" name="${item.name}" editorType="${item.getEditorType()}" format="${item.getEditorParam("TIMEFMT","")}" :refFormItem="[<#list formitems as formitem><#if formitem_index gt 0>,</#if>'${formitem.name}'</#list>]" @formitemvaluechange="onFormItemValueChange" style="${item.getEditorCssStyle()}"></app-range-editor>
......
......@@ -473,12 +473,23 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected formValidateStatus(): boolean {
const form: any = this.$refs.${ctrl.name};
<#-- const form: any = this.$refs.${ctrl.name};
let validatestate: boolean = true;
<#-- form.validate((valid: boolean) => {
form.validate((valid: boolean) => {
validatestate = valid ? true : false;
}); -->
return validatestate
return this.cheackRules();
}
public cheackRules() :boolean{
let refArr: Array<string> = [<#list ctrl.getAllPSDEFormDetails() as formdetail><#if formdetail.getDetailType?? && formdetail.getDetailType() == 'FORMITEM'>"${formdetail.getName()}rules",</#if></#list>];
let falg = true ;
refArr.forEach((item:any) => {
if(this.$refs[item] && (this.$refs[item] as any).checkRule && !(this.$refs[item] as any).checkRule()){
falg = false;
}
});
return falg;
}
/**
......@@ -1268,6 +1279,8 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.$emit('load', this.data);
}
</#if>
</#if>
......
......@@ -3,7 +3,12 @@
</#ibizinclude>
.app-form {
<#if ctrl.getFormFuncMode?? && ctrl.getFormFuncMode()?? && ctrl.getFormFuncMode() == "WIZARDFORM">
height: calc(100vh - 105px - 52px);
overflow: auto;
<#else>
height: 100%;
</#if>
>.app-form-tabs {
height: 100%;
>.app-form-tab {
......
## ibiz表单部件相关文档(移动端)
### 一、动态标签位置
#### 1、 LEFT
##### 界面UI
<div style = "display : flex ; overflow: hidden; ">
<img src="images/README/left.png" ></img>
</div>
#### 2、RIGHT
##### 界面UI
<div style = "display : flex ; overflow: hidden; ">
<img src="images/README/right.png" ></img>
</div>
#### 3、 TOP
<div style = "display : flex ; overflow: hidden; ">
<img src="images/README/top.png" ></img>
</div>
### 二、表单项校验
<div style = "display : flex ; overflow: hidden; ">
<img src="images/README/jiaoyan.png" ></img>
</div>
\ No newline at end of file
......@@ -91,4 +91,20 @@ ${css.getCssStyle()}
}
}
</#if>
</#list>
\ No newline at end of file
</#list>
<#if view.hasPSControl('searchform')>
//搜索表单按钮
.search-btn{
display: flex;
margin-bottom: 15px;
.search-btn-item{
width: 50%;
}
}
</#if>
<#if view.isEnableQuickSearch?? && view.isEnableQuickSearch() == true>
.filter-btn{
position: relative;
top: 5px;
}
</#if>
\ No newline at end of file
......@@ -10,6 +10,7 @@
<#assign isStyleName = false/>
</#if>
<ion-page :className="{ 'view-container': true<#if !isStyleName>, 'default-mode-view': true</#if>, '${view.getViewType()?lower_case}': true, '${srffilepath2(view.getCodeName())}': true<#if view.getPSSysCss?? && view.getPSSysCss()??>, '${view.getPSSysCss().getCssName()}': true</#if> }">
<ion-header>
<ion-toolbar class="ionoc-view-header">
<ion-buttons slot="start">
......@@ -67,6 +68,9 @@
<#if view.isEnableQuickSearch?? && view.isEnableQuickSearch() == true>
<ion-toolbar>
<ion-searchbar style="height: 36px; padding-bottom: 0px;" :placeholder="$t('app.fastsearch')" debounce="500" @ionChange="quickValueChange($event)" show-cancel-button="focus" :cancel-button-text="$t('app.button.cancel')"></ion-searchbar>
<#if view.hasPSControl('searchform')>
<ion-button class="filter-btn" size="small" slot="end" @click="openSearchform"><ion-icon slot="end" name="filter-outline"></ion-icon>过滤</ion-button>
</#if>
</ion-toolbar>
</#if>
<#-- 输出快速搜索:END -->
......@@ -78,6 +82,29 @@
</#if>
<#-- 自定义头部按钮:END -->
</ion-header>
<#-- 搜索表单:BEGIN -->
<#if view.hasPSControl('searchform')>
<ion-menu side="start" content-id="searchform<#if view.getName()??>${view.getName()?lower_case}</#if>" ref='searchform<#if view.getName()??>${view.getName()?lower_case}</#if>'>
<ion-header>
<ion-toolbar translucent>
<ion-title>条件搜索</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
${P.getCtrlCode('searchform', 'CONTROL.html').code}
</ion-content>
<ion-footer>
<div class="search-btn">
<ion-button class="search-btn-item" shape="round" size="small" expand="full" color="light" @click="onReset">重置</ion-button>
<ion-button class="search-btn-item" shape="round" size="small" expand="full" @click="onSearch">搜索</ion-button>
</div>
</ion-footer>
</ion-menu>
<div id="searchform<#if view.getName()??>${view.getName()?lower_case}</#if>"></div>
</#if>
<#-- 搜索表单:END -->
<ion-content>
<#-- 视图是否支持下拉刷新:BEGIN -->
<#if view.isEnablePullDownRefresh?? && view.isEnablePullDownRefresh()>
......
<div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :dis-hover='true' :padding='0' :bordered='false'>
<ion-page class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<#if view.isShowCaptionBar()>
<p slot="title">
${view.getCaption()}
</p>
<ion-header>
<ion-toolbar class="ionoc-view-header">
<ion-buttons slot="start">
<ion-button v-show="isShowBackButton" @click="closeView">
<ion-icon name="chevron-back"></ion-icon>
{{$t('app.button.back')}}
</ion-button>
</ion-buttons>
<ion-title>{{$t(model.srfCaption)}}</ion-title>
</ion-toolbar>
</ion-header>
</#if>
<div class="content-container">
<ion-content class="content-container">
<@ibizindent blank=12>
<#if view.hasPSControl('wizardpanel')>
${P.getCtrlCode('wizardpanel', 'CONTROL.html').code}
</#if>
</@ibizindent>
</div>
</card>
</div>
\ No newline at end of file
</ion-content>
</ion-page>
\ No newline at end of file
......@@ -6,3 +6,7 @@
justify-content: space-between;
padding: 0 15px;
}
.batch_btn{
display: flex;
justify-content: center;
}
\ No newline at end of file
......@@ -15,7 +15,7 @@
<div class="view-tool-sorts">
<div class="view-tool-sorts">
<#list dataview.getPSDEDataViewItems() as item>
<#if item.isEnableSort() && !item.getPSCodeList()??>
<#if item.isEnableSort()>
<div class="view-tool-sorts-item">
<span class="text" @click="setSort('<#if item.getName()??>${item.getName()}</#if>')"><#if item.getCaption()??>${item.getCaption()}</#if></span>
<span class="sort-icon" @click="setSort('<#if item.getName()??>${item.getName()}</#if>')">
......@@ -41,6 +41,20 @@
<#assign view_content>
${P.getCtrlCode('dataview', 'CONTROL.html').code}
</#assign>
<#assign view_footer>
<#if dataview.getBatchPSDEToolbar?? && dataview.getBatchPSDEToolbar()??>
<#assign batchToolbar = dataview.getBatchPSDEToolbar()>
<div v-show="showCheack" class="batch_btn">
<@ibizindent blank=8>
${P.getCtrlCode(batchToolbar, 'CONTROL.html').code}
</@ibizindent>
<ion-button class="app-view-toolbar-button" @click="cancelSelect" >
<ion-icon name="arrow-undo-outline"></ion-icon>
{{$t('app.button.cancel')}}
</ion-button>
</div>
</#if>
</#assign>
</#if>
<#ibizinclude>
../@MACRO/VIEW_LAYOUT_BASE.ftl
......
<#if view.hasPSControl('wizardpanel')>
<#assign wizardpanel = view.getPSControl('wizardpanel')>
<#assign view_content>
<div>暂不支持</div>
${P.getCtrlCode('wizardpanel', 'CONTROL.html').code}
</#assign>
</#if>
<#ibizinclude>
../@MACRO/VIEW_LAYOUT_BASE.ftl
</#ibizinclude>
\ No newline at end of file
......@@ -18,4 +18,8 @@
text-align: center;
}
}
</#if>
\ No newline at end of file
</#if>
.batch_btn{
display: flex;
justify-content: center;
}
\ No newline at end of file
......@@ -25,34 +25,38 @@
</#if>
</#list>
</div>
<div class="view-tool-searchform">
<!-- <span>过滤<ion-icon name="filter-outline"></ion-icon></span> -->
</div>
</div>
<div class="code-box" style="display:flex; overflow: auto;">
</ion-toolbar>
<div style="display:flex;overflow: auto;">
<#list mdctrl.getPSListItems() as item>
<#if item.isEnableSort() && item.getPSCodeList?? && item.getPSCodeList()??>
<#assign codelist = item.getPSCodeList()>
<#if codelist.getCodeListType() == 'STATIC' && codelist.getAllPSCodeItems()??>
<ion-item class="ibz-item">
<ion-label style="margin:0"><#if item.getCaption()??>${item.getCaption()}</#if></ion-label>
<ion-select name="<#if item.getName()??>n_${item.getName()?lower_case}_eq</#if>" style="padding: 3px;" @ionChange="setQueryparam" interface="popover">
<#list codelist.getAllPSCodeItems() as codeitem>
<ion-select-option value="<#if codeitem.getValue()??>${codeitem.getValue()}</#if>"><#if codeitem.getName()??>${codeitem.getName()}</#if></ion-select-option>
</#list>
</ion-select>
</ion-item>
<app-van-select name="<#if item.getName()??>n_${item.getName()?lower_case}_eq</#if>" title="<#if item.getCaption()??>${item.getCaption()}</#if>" :items="[<#list codelist.getAllPSCodeItems() as codeitem>{value:'<#if codeitem.getValue()??>${codeitem.getValue()}</#if>',label:'<#if codeitem.getName()??>${codeitem.getName()}</#if>'},</#list>]"></app-van-select>
</#if>
</#if>
</#list>
</div>
</ion-toolbar>
</#assign>
</#if>
</#if>
<#assign view_content>
${P.getCtrlCode('mdctrl', 'CONTROL.html').code}
</#assign>
<#assign view_footer>
<#if mdctrl.getBatchPSDEToolbar?? && mdctrl.getBatchPSDEToolbar()??>
<#assign batchToolbar = mdctrl.getBatchPSDEToolbar()>
<div v-show="showCheack" class="batch_btn">
<@ibizindent blank=8>
${P.getCtrlCode(batchToolbar, 'CONTROL.html').code}
</@ibizindent>
<ion-button class="app-view-toolbar-button" @click="cancelSelect" >
<ion-icon name="arrow-undo-outline"></ion-icon>
{{$t('app.button.cancel')}}
</ion-button>
</div>
</#if>
</#assign>
</#if>
<#ibizinclude>
../@MACRO/VIEW_LAYOUT_BASE.ftl
......
<#if view.hasPSControl('mdctrl')>
<#assign mdctrl = view.getPSControl('mdctrl')>
<#assign view_content>
${P.getCtrlCode('mdctrl', 'CONTROL.html').code}
</#assign>
<#assign view_footer>
<#if mdctrl.getBatchPSDEToolbar?? && mdctrl.getBatchPSDEToolbar()??>
<#assign batchToolbar = mdctrl.getBatchPSDEToolbar()>
<div v-show="showCheack" >
<@ibizindent blank=8>
${P.getCtrlCode(batchToolbar, 'CONTROL.html').code}
</@ibizindent>
</div>
</#if>
</#assign>
</#if>
<#ibizinclude>
../@MACRO/EMBED_VIEW_LAYOUT_BASE.ftl
......
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
</#ibizinclude>
.batch_btn{
display: flex;
justify-content: center;
}
\ No newline at end of file
<#if view.hasPSControl('calendar')>
<#assign calendar = view.getPSControl('calendar')>
<#assign view_content>
${P.getCtrlCode('calendar', 'CONTROL.html').code}
</#assign>
<#assign view_footer>
<#if calendar.getBatchPSDEToolbar?? && calendar.getBatchPSDEToolbar()??>
<#assign batchToolbar = calendar.getBatchPSDEToolbar()>
<div v-show="showCheack" class="batch_btn">
<@ibizindent blank=8>
${P.getCtrlCode(batchToolbar, 'CONTROL.html').code}
</@ibizindent>
<ion-button class="app-view-toolbar-button" @click="cancelSelect" >
<ion-icon name="arrow-undo-outline"></ion-icon>
{{$t('app.button.cancel')}}
</ion-button>
</div>
</#if>
</#assign>
</#if>
<#ibizinclude>
../@MACRO/VIEW_LAYOUT_BASE.ftl
......
<app-mob-input class="app-form-item-input" @change="($event)=>this.data.${editor.name} = $event" :type="'text'" :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" <#if editor.getPlaceHolder()??> placeholder="${editor.getPlaceHolder()}"</#if>></app-mob-input>
\ No newline at end of file
<app-mob-input class="app-form-item-input" @change="($event)=>this.data.${editor.name} = $event" :type="'text'" :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" <#if editor.getPlaceHolder()??> placeholder="${editor.getPlaceHolder()}"</#if>></app-mob-input>
\ No newline at end of file
......@@ -16,7 +16,7 @@ protected click${item.codeName}(item: any = {}) {
<#if item.getOpenViewParam?? && item.getOpenViewParam()??>
Object.assign(params, ${item.getOpenViewParam()});
</#if>
<#if dataview.getOpenMode() == 'POPUPMODAL' || dataview.getOpenMode() == 'POPUPAPP' || dataview.getOpenMode() == 'POPOVER'>
<#if dataview.getOpenMode() == 'POPUPMODAL' || dataview.getOpenMode() == 'POPUPAPP' || dataview.getOpenMode() == 'POPOVER' || dataview.getOpenMode()?index_of('DRAWER') == 0 >
<@outPutViewInfo dataview/>
</#if>
<#if dataview.getOpenMode() == 'INDEXVIEWTAB' || dataview.getOpenMode() == ''>
......
......@@ -134,7 +134,7 @@
openPopupModal(view, data);
<#elseif dataview.getOpenMode()?index_of('DRAWER') == 0>
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = actionContext.$appdrawer.openDrawer(view, data, deResParameters, parameters, _args, data);
let container: Subject<any> = await actionContext.$appdrawer.openDrawer(view, data, deResParameters, parameters, _args, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
......
......@@ -140,7 +140,7 @@
width: ${frontview.getWidth()?c},
placement: '${frontview.getOpenMode()}'
};
const appdrawer = actionContext.$appdrawer.openDrawer(view, data);
const appdrawer = await actionContext.$appdrawer.openDrawer(view, data);
appdrawer.subscribe((result: any) => {
if (result && Object.is(result.ret, 'OK')) {
Object.assign(data, { srfactionparam: result.datas });
......
......@@ -17,7 +17,7 @@
if (container.newRow && container.newRow instanceof Function) {
container.newRow(args, contextJO, paramJO, $event, xData, container, srfParentDeName);
} else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData);
xData.newRow([{ ...data }], paramJO, $event, xData);
}else{
this.notice.error('newdata 视图处理逻辑不存在,请添加!');
}
......
......@@ -40,6 +40,7 @@
if (form) {
form.onSearch();
}
this.closeSearchform();
}
/**
......@@ -54,6 +55,7 @@
if (form) {
form.onReset();
}
this.closeSearchform();
}
</#if>
<#-- 输出快速搜索:BEGIN -->
......@@ -187,6 +189,67 @@
}
}
/**
* 打开搜索表单
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public openSearchform() {
let search :any = this.$refs.searchform<#if view.getName()??>${view.getName()?lower_case}</#if>;
if(search){
search.open();
}
}
/**
* 关闭搜索表单
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public closeSearchform(){
let search :any = this.$refs.searchform<#if view.getName()??>${view.getName()?lower_case}</#if>;
if(search){
search.close();
}
}
/**
* 多选状态改变事件
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public showCheackChange(value:any){
this.showCheack = value;
}
/**
* 多选状态
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public showCheack = false;
/**
* 取消选择状态
* @memberof ${srfclassname('${view.name}')}Base
*/
public cancelSelect() {
this.showCheackChange(false);
}
<#if view.hasPSControl('mdctrl')>
<#assign mdctrl = view.getPSControl('mdctrl')>
<#if mdctrl.getBatchPSDEToolbar?? && mdctrl.getBatchPSDEToolbar()??>
<#assign batchToolbar = mdctrl.getBatchPSDEToolbar()>
public <#if batchToolbar.getName()??> ${batchToolbar.getName()}_click</#if>(tag:string,event:any) {
let mdctrl: any = this.$refs.mdctrl;
if(mdctrl && mdctrl.<#if batchToolbar.getName()??> ${batchToolbar.getName()}_click</#if> instanceof Function){
mdctrl.<#if batchToolbar.getName()??> ${batchToolbar.getName()}_click</#if>(tag,event);
}
}
</#if>
</#if>
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
......@@ -74,6 +74,67 @@
}
}
/**
* 打开搜索表单
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public openSearchform() {
let search :any = this.$refs.searchform<#if view.getName()??>${view.getName()?lower_case}</#if>;
if(search){
search.open();
}
}
/**
* 关闭搜索表单
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public closeSearchform(){
let search :any = this.$refs.searchform<#if view.getName()??>${view.getName()?lower_case}</#if>;
if(search){
search.close();
}
}
/**
* 多选状态改变事件
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public showCheackChange(value:any){
this.showCheack = value;
}
/**
* 多选状态
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public showCheack = false;
/**
* 取消选择状态
* @memberof ${srfclassname('${view.name}')}Base
*/
public cancelSelect() {
this.showCheackChange(false);
}
<#if view.hasPSControl('dataview')>
<#assign dataview = view.getPSControl('dataview')>
<#if dataview.getBatchPSDEToolbar?? && dataview.getBatchPSDEToolbar()??>
<#assign batchToolbar = dataview.getBatchPSDEToolbar()>
public <#if batchToolbar.getName()??> ${batchToolbar.getName()}_click</#if>(tag:string,event:any) {
let dataview: any = this.$refs.dataview;
if(dataview && dataview.<#if batchToolbar.getName()??> ${batchToolbar.getName()}_click</#if> instanceof Function){
dataview.<#if batchToolbar.getName()??> ${batchToolbar.getName()}_click</#if>(tag,event);
}
}
</#if>
</#if>
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
......@@ -38,7 +38,20 @@
refs.chart.refresh({});
}
}
<#if view.hasPSControl('searchform')>
<#assign searchform = view.getPSControl('searchform')>
/**
* 重置搜索表单
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public onReset(): void {
const form: any = this.$refs.searchform;
if (form) {
form.onReset();
}
}
</#if>
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
......@@ -10,6 +10,43 @@
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
/**
* 多选状态改变事件
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public showCheackChange(value:any){
this.showCheack = value;
}
/**
* 多选状态
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public showCheack = false;
/**
* 取消选择状态
* @memberof ${srfclassname('${view.name}')}Base
*/
public cancelSelect() {
this.showCheackChange(false);
}
<#if view.hasPSControl('calendar')>
<#assign calendar = view.getPSControl('calendar')>
<#if calendar.getBatchPSDEToolbar?? && calendar.getBatchPSDEToolbar()??>
<#assign batchToolbar = calendar.getBatchPSDEToolbar()>
public <#if batchToolbar.getName()??> ${batchToolbar.getName()}_click</#if>(tag:string,event:any) {
let calendar: any = this.$refs.calendar;
if(calendar && calendar.<#if batchToolbar.getName()??> ${batchToolbar.getName()}_click</#if> instanceof Function){
calendar.<#if batchToolbar.getName()??> ${batchToolbar.getName()}_click</#if>(tag,event);
}
}
</#if>
</#if>
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
......@@ -31,6 +31,13 @@ import router from './router';
import { Interceptors } from '@/utils';
import { ViewOpenService } from '@/utils/view-open-service/view-open-service';
// 第三方登登录认证获取用户信息
// import { ThirdPartyService } from '@/ibiz-core/third-party-service/ThirdPartyService';
// const thirdPartyAuth = async () => {
// await ThirdPartyService.getInstance().login();
// };
// thirdPartyAuth();
Vue.config.errorHandler = function (err: any, vm: any, info: any) {
console.log(err);
}
......
......@@ -2,7 +2,7 @@
TARGET=PSSYSAPP
</#ibiztemplate>
<template>
<ion-app>
<ion-app id="app">
<#if app.getAllRefPSAppViews()??>
<#list app.getAllRefPSAppViews() as view>
<#if view.getViewType() == "APPSTARTVIEW" >
......
......@@ -14,7 +14,7 @@ export const Environment = {
SysName: '${sys.getCodeName()}',
// 远程登录地址,本地开发调试使用
// RemoteLogin: 'ibizutil/login',
RemoteLogin: 'v7/login',
RemoteLogin: '/v7/login',
// 文件导出
ExportFile: 'ibizutil/download',
// 文件上传
......
## v7.0.0-alpha.2 [2020-5-7]
# v7.0.0-alpha.3
## 2020-5-28
### Bug修复&优化
#### 模板
- 去掉日历部件相关依赖
- 修复视图默认打开模式为抽屉会报错的bug
#### 基础文件
- 优化开关编辑器样式
- 优化多数据选择编辑器样式
## 2020-5-27
### 视图新增&Bug修复&优化
#### 模板
- 新增视图:向导视图
- 修复bug:表单值规则提交校验未生效
#### 基础文件
- 优化:日历组件收缩样式
## 2020-5-24
### 功能新增
#### 基础文件
- 新增组件:抽屉组件
## 2020-5-19
### 优化视图逻辑
#### 模板
- 图表视图:提供新的图表视图逻辑
## 2020-5-18
### 功能新增
#### 模板
- 编辑视图:提供表单校验功能
## 2020-5-14
### 功能新增
#### 模板
- 日历视图项:日程长按显示批操工具栏
- 多数据视图:数据项长按显示批操工具栏
- 卡片视图:数据项长按显示批操工具栏
## 2020-5-11
### 功能新增
#### 模板
- 搜索表单:提供多数据视图搜索表单条件过滤操作
## 2020-5-9
### 功能新增
#### 模板
- 日历视图项:提供日程长按多选操作
- 多数据视图:提供数据项长按多选操作
- 卡片视图:提供数据项长按多选操作
# v7.0.0-alpha.2
## 2020-5-7
### 功能新增及优化
......@@ -8,6 +92,8 @@
Android Studio 打包初始化
## v7.0.0-alpha.1 [2020-4-29]
# v7.0.0-alpha.1
## 2020-4-29
初始化文件
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册