提交 f912516c 编写于 作者: Mosher's avatar Mosher

init: 同步op仓库

上级 9c713316
<#macro initControlEvents ctrl view>
/**
* 处理部件事件
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public async handleCtrlEvents(eventName: string, args: any = {}): Promise<boolean> {
const actionData = {
data: this.getData() || {},
context: Util.deepCopy(this.context),
viewparams: Util.deepCopy(this.viewparams),
xData: this
}
let result: boolean = true;
Object.assign(actionData, args);
<#if ctrl.getPSControlLogics?? && ctrl.getPSControlLogics()??>
<#list ctrl.getPSControlLogics() as logic>
<#if logic.getLogicType() != 'APPVIEWLOGIC' && logic.getLogicType() != 'APPVIEWENGINE' && logic.getTriggerType() == 'CTRLEVENT'>
if ('${logic.getEventNames()?lower_case}'.indexOf(eventName) !== -1) {
result = await this.execute_${logic.name}_ctrl_logic(actionData) && result;
}
</#if>
</#list>
</#if>
if (!result) {
return false;
}
this.$emit(eventName, actionData);
return true;
}
<#if ctrl.getPSControlLogics?? && ctrl.getPSControlLogics()??>
<#list ctrl.getPSControlLogics() as logic>
<#if logic.getLogicType() != 'APPVIEWLOGIC' && logic.getLogicType() != 'APPVIEWENGINE' && logic.getTriggerType() == 'CTRLEVENT'>
/**
* 部件逻辑 -- ${logic.name}
*
* @param {string} eventName 部件事件名称
* @param {any[]} data 数据
* @param {*} event 源事件对象
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public async execute_${logic.name}_ctrl_logic(actionData: any): Promise<boolean> {
<#-- 实体处理逻辑 -->
<#if logic.getLogicType() == 'DEUILOGIC'>
<#if logic.getPSAppDEUILogic?? && logic.getPSAppDEUILogic()??>
try {
const uiService = await window.uiServiceRegister.getService('${logic.getPSAppDEUILogic().getPSAppDataEntity().getCodeName()?lower_case}');
if (uiService) {
const { data, context, viewparams } = actionData;
const result = await uiService.executeUILogic(
'${logic.getPSAppDEUILogic().codeName}',
data,
context,
viewparams,
actionData.event ? actionData.event : {},
this,
this,
context.srfparentdename ? context.srfparentdename : ''
);
if (result && result.hasOwnProperty('srfret') && (result.srfret === 'false' || result.srfret === false)) {
return false;
}
}
} catch (error: any) {
}
</#if>
<#elseif logic.getLogicType() == 'SCRIPT'>
console.log('暂未支持 SCRIPT 类型');
<#elseif logic.getLogicType() == 'PFPLUGIN'>
console.log('暂未支持 PFPLUGIN 类型');
<#else>
console.log('暂未支持 ${logic.getLogicType()} 类型');
</#if>
return true;
}
</#if>
</#list>
</#if>
</#macro>
......@@ -19,6 +19,9 @@ import layout_${panel.getName()} from '@widgets/${srffilepath2(panel.getPSAppDat
</#list>
</#if>
<#if import_block??>${import_block}</#if>
<#if generateTip??>
${generateTip}
</#if>
@Component({
components: {
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
......
......@@ -77,6 +77,33 @@ export default class ${srfclassname('${ctrl.codeName}')}Base extends Vue impleme
*/
@Prop() public viewparams!: any;
/**
* 视图操作参数(父级)
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop() public pViewCtx!: any;
/**
* 视图操作参数
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public viewCtx: any = {};
/**
* 监听视图操作参数变化
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Watch('pViewCtx', { immediate: true })
public onViewCtxChange(newVal: any, oldVal: any) {
Object.assign(this.viewCtx, newVal, { xData: this, ctrl: this });
}
/**
* 视图状态事件
*
......@@ -110,7 +137,7 @@ export default class ${srfclassname('${ctrl.codeName}')}Base extends Vue impleme
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({$store: this.$store,context:this.context,viewparams:this.viewparams});
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({context:this.context,viewparams:this.viewparams});
</#if>
</#list>
......@@ -176,7 +203,7 @@ export default class ${srfclassname('${ctrl.codeName}')}Base extends Vue impleme
</#list>
</#if>
<#if ctrl.getPSAppViewLogics?? && ctrl.getPSAppViewLogics()??>
<#if ctrl.getControlType() != 'PANEL' && ctrl.getPSAppViewLogics?? && ctrl.getPSAppViewLogics()??>
<#list ctrl.getPSAppViewLogics() as logic>
<#if logic.getLogicTrigger() == "CUSTOM" || logic.getLogicTrigger() == "CTRLEVENT">
......@@ -185,7 +212,7 @@ ${P.getLogicCode(logic, "LOGIC.vue").code}
</#list>
</#if>
<#if ctrl.getPSUIActions?? && ctrl.getPSUIActions()??>
<#if ctrl.getControlType() != 'PANEL' && ctrl.getPSUIActions?? && ctrl.getPSUIActions()??>
<#list ctrl.getPSUIActions() as uiAction>
<#if !uiAction.getPSAppDataEntity()??>
${P.getLogicCode(uiAction, "LOGIC.vue").code}
......@@ -234,6 +261,12 @@ ${P.getLogicCode(uiAction, "LOGIC.vue").code}
})
}
}
<#ibizinclude>
./@MACRO/CONTROL-LOGIC-EVENT.ftl
</#ibizinclude>
<#-- START: 部件事件 -->
<@initControlEvents ctrl view/>
<#-- END: 部件事件 -->
<#if ctrl.render?? && ctrl.render.code2??>
${ctrl.render.code2}
......
......@@ -77,6 +77,14 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get
*/
@Prop() public viewparams!: any;
/**
* 视图操作参数
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop() public viewCtx!: any;
/**
* 视图状态事件
*
......@@ -110,7 +118,7 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({$store: this.$store,context:this.context,viewparams:this.viewparams});
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({context:this.context,viewparams:this.viewparams});
</#if>
</#list>
......@@ -146,7 +154,7 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get
* @type {${srfclassname('${appde.getCodeName()}')}UIService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService(this.$store);
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService();
</#if>
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as childCtrl>
......
......@@ -4,15 +4,15 @@
<#assign layout = LayoutPos.getLayout()/>
</#if>
<#if layout == 'TABLE_24COL' && LayoutPos??>
<i-col v-show="detailsModel.${formmenber.name}.visible" :style="{<#if (formmenber.getHeight?? && formmenber.getHeight() gt 0)>'height': '${formmenber.getHeight()?c}px !important',</#if><#if (formmenber.getWidth?? && formmenber.getWidth() gt 0)>'width':'${formmenber.getWidth()?c}px !important'</#if>}" <#if LayoutPos.getColXS() != -1> :sm="{ span: ${LayoutPos.getColXS()}, offset: <#if LayoutPos.getColXSOffset() != -1>${LayoutPos.getColXSOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColSM() != -1> :md="{ span: ${LayoutPos.getColSM()}, offset: <#if LayoutPos.getColSMOffset() != -1>${LayoutPos.getColSMOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColMD() != -1> :lg="{ span: ${LayoutPos.getColMD()}, offset: <#if LayoutPos.getColMDOffset() != -1>${LayoutPos.getColMDOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColLG() != -1> :xl="{ span: ${LayoutPos.getColLG()}, offset: <#if LayoutPos.getColLGOffset() != -1>${LayoutPos.getColLGOffset()}<#else>0</#if> }"</#if>>
<i-col <#if formmenber.getDetailType?? && formmenber.getDetailType()?? && formmenber.getDetailType() == 'DRUIPART'>v-if="detailsModel.${formmenber.name}.visible"<#else>v-show="detailsModel.${formmenber.name}.visible"</#if> :style="{<#if (formmenber.getHeight?? && formmenber.getHeight() gt 0)>'height': '${formmenber.getHeight()?c}px !important',</#if><#if (formmenber.getWidth?? && formmenber.getWidth() gt 0)>'width':'${formmenber.getWidth()?c}px !important'</#if>}" <#if LayoutPos.getColXS() != -1> :sm="{ span: ${LayoutPos.getColXS()}, offset: <#if LayoutPos.getColXSOffset() != -1>${LayoutPos.getColXSOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColSM() != -1> :md="{ span: ${LayoutPos.getColSM()}, offset: <#if LayoutPos.getColSMOffset() != -1>${LayoutPos.getColSMOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColMD() != -1> :lg="{ span: ${LayoutPos.getColMD()}, offset: <#if LayoutPos.getColMDOffset() != -1>${LayoutPos.getColMDOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColLG() != -1> :xl="{ span: ${LayoutPos.getColLG()}, offset: <#if LayoutPos.getColLGOffset() != -1>${LayoutPos.getColLGOffset()}<#else>0</#if> }"</#if>>
${P.getPartCode(formmenber).code}
</i-col>
<#elseif layout == 'FLEX'>
<div v-show="detailsModel.${formmenber.name}.visible" :style="{<#if LayoutPos.getGrow() != -1>'flex-grow': '${LayoutPos.getGrow()?c}',<#if !LayoutPos.getHeight()??>'height': 0,</#if></#if><#if LayoutPos.getWidth()??>'width': '${LayoutPos.getWidth()?c}px',</#if><#if LayoutPos.getHeight()??>'height':'${LayoutPos.getHeight()?c}px'</#if>}">
<div <#if formmenber.getDetailType?? && formmenber.getDetailType()?? && formmenber.getDetailType() == 'DRUIPART'>v-if="detailsModel.${formmenber.name}.visible"<#else>v-show="detailsModel.${formmenber.name}.visible"</#if> :style="{<#if LayoutPos.getGrow() != -1>'flex-grow': '${LayoutPos.getGrow()?c}',<#if !LayoutPos.getHeight()??>'height': 0,</#if></#if><#if LayoutPos.getWidth()??>'width': '${LayoutPos.getWidth()?c}px',</#if><#if LayoutPos.getHeight()??>'height':'${LayoutPos.getHeight()?c}px'</#if>}">
${P.getPartCode(formmenber).code}
</div>
<#else>
<div v-show="detailsModel.${formmenber.name}.visible">
<div <#if formmenber.getDetailType?? && formmenber.getDetailType()?? && formmenber.getDetailType() == 'DRUIPART'>v-if="detailsModel.${formmenber.name}.visible"<#else>v-show="detailsModel.${formmenber.name}.visible"</#if>>
${P.getPartCode(formmenber).code}
</div>
</#if>
\ No newline at end of file
......@@ -2,12 +2,13 @@
<view_${ctrl.getName()}
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:context="context"
:pViewCtx="viewCtx"
<#if content??>
${content}<#t>
</#if>
</#if>
name="${ctrl.name}"
ref='${ctrl.name}'
ref="${ctrl.name}"
<#if ctrl.getHookEventNames()??>
<#list ctrl.getHookEventNames() as eventName>
@${eventName?lower_case}="${ctrl.name}_${eventName?lower_case}($event)"
......
......@@ -7,7 +7,7 @@
:context="context"
<#if ctrl.getPSAppDataEntity()??>parentName = "${ctrl.getPSAppDataEntity().getCodeName()}"</#if>
<#if view.getViewType() == 'DEEDITVIEW4'>
:isShowSlot="false"
:selectDefault="true"
</#if>
<#if ctrl.getHookEventNames()??>
<#list ctrl.getHookEventNames() as eventName>
......@@ -15,7 +15,4 @@
</#list>
</#if>
@closeview='closeView($event)'>
<#if view.getViewType() != 'DEEDITVIEW4' && view.hasPSControl('form')>
${P.getCtrlCode('form', 'CONTROL.html').code}
</#if>
</view_${ctrl.getName()}>
\ No newline at end of file
......@@ -10,7 +10,7 @@
createAction="<#if ctrl.getCreatePSControlAction()?? && ctrl.getCreatePSControlAction().getPSAppDEMethod()??>${ctrl.getCreatePSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
WFSubmitAction="<#if ctrl.getWFSubmitPSControlAction()?? && ctrl.getWFSubmitPSControlAction().getPSAppDEMethod()??>${ctrl.getWFSubmitPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
WFStartAction="<#if ctrl.getWFStartPSControlAction()?? && ctrl.getWFStartPSControlAction().getPSAppDEMethod()??>${ctrl.getWFStartPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
style="<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()?c}px</#if><#if ctrl.getHeight() gt 0>height: ${ctrl.getHeight()?c}px</#if>"
style="<#if ctrl.getWidth()?? && ctrl.getWidth() gt 0>width: ${ctrl.getWidth()?c}px</#if><#if ctrl.getHeight() gt 0>height: ${ctrl.getHeight()?c}px</#if>"
</#assign>
<#ibizinclude>
./DEFAULT.html.ftl
......
<#-- content -->
<#assign content>
<#if view.getViewType() != 'DECUSTOMVIEW'>
:isSingleSelect="isSingleSelect"
</#if>
<#if view.getViewType() == 'DEPICKUPGRIDVIEW'>
:selectedData="selectedData"
</#if>
......
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import UtilService from '@/utilservice/util-service';
<#if appde??>
import ${srfclassname('${appde.getCodeName()}')}Service from '@/service/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-service';
</#if>
......@@ -22,7 +21,7 @@ export default class ${srfclassname('${ctrl.codeName}')}Service extends ControlS
* @type {${srfclassname('${appde.getCodeName()}')}Service}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public appEntityService: ${srfclassname('${appde.getCodeName()}')}Service = new ${srfclassname('${appde.getCodeName()}')}Service({ $store: this.getStore() });
public appEntityService: ${srfclassname('${appde.getCodeName()}')}Service = new ${srfclassname('${appde.getCodeName()}')}Service();
</#if>
<#if view.isPSDEView()??>
......@@ -37,15 +36,6 @@ export default class ${srfclassname('${ctrl.codeName}')}Service extends ControlS
}
</#if>
/**
* 工具服务对象
*
* @protected
* @type {UtilService}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
protected utilService: UtilService = new UtilService();
/**
* Creates an instance of ${srfclassname('${ctrl.codeName}')}Service.
*
......
......@@ -43,6 +43,7 @@
</div>
</#if>
</template>
// 基于 @CONTROL/分页导航面板/CONTROL-BASE.vue.ftl 生成
<#assign import_block>
import ${srfclassname('${appde.getCodeName()}')}AuthService from '@/authservice/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-auth-service';
import { Environment } from '@/environments/environment';
......@@ -64,7 +65,7 @@ import { Environment } from '@/environments/environment';
* @type {${srfclassname('${appde.getCodeName()}')}UIService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService(this.$store);
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService();
/**
* 是否初始化
......
// 基于 @CONTROL/分页导航面板/CONTROL.less.ftl 生成
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
......
<#assign generateTip>
// 基于 @CONTROL/分页导航面板/CONTROL.vue.ftl 生成
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/分页导航面板/MODEL.ts.ftl 生成
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/分页导航面板/SERVICE.ts.ftl 生成
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
......@@ -14,6 +14,7 @@
</div>
</#if>
</template>
// 基于 @CONTROL/分页视图面板/CONTROL-BASE.vue.ftl 生成
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
......
// 基于 @CONTROL/分页视图面板/CONTROL.less.ftl 生成
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
......
<#assign generateTip>
// 基于 @CONTROL/分页视图面板/CONTROL.vue.ftl 生成
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/分页视图面板/MODEL.ts.ftl 生成
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/分页视图面板/SERVICE.ts.ftl 生成
<#ibizinclude>
../@MACRO/SERVICE/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/列表/CONTROL.less.ftl 生成
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
......
<#assign generateTip>
// 基于 @CONTROL/列表/CONTROL.vue.ftl 生成
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/列表/MODEL.ts.ftl 生成
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
......
// 基于 @CONTROL/列表/SERVICE.ts.ftl 生成
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
......
// 基于 @CONTROL/列表导航/CONTROL.less.ftl 生成
.app-list-exp-bar {
> .ivu-split-horizontal {
> .ivu-split-trigger-con {
height: 100%;
width: 1px;
}
> .ivu-split-pane {
> div {
height: 100%;
overflow: auto;
display: flex;
flex-direction: column;
.list-exp-bar-header {
line-height: 50px;
border-bottom: 1px solid #ddd;
.list-exp-bar-title {
font-size: 18px;
padding-left: 8px;
i {
font-size: 20px;
margin-top: -2px;
}
}
}
.container-header{
display: flex;
justify-content: flex-start;
align-items: center;
flex-wrap: wrap;
.search-container {
width: 30%;
height: 48px;
padding: 10px 10px 10px 0;
min-width: 200px;
max-width: 400px;
}
.toolbar-container{
padding: 4px;
display: flex;
flex-wrap: wrap;
align-items: center;
}
.quick-group-container {
padding-top: 8px;
padding-right: 20px;
}
}
.list-exp-bar-content {
<#-- 计算高度 -->
<#if ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 88px);
<#elseif ctrl.isShowTitleBar() && !ctrl.isEnableSearch()>
height: calc(100% - 40px);
<#elseif !ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 38px);
<#else>
height: 100%;
</#if>
overflow: auto;
padding: 16px 0;
margin-bottom: 10px;
}
.list-exp-bar-content2 {
height: 100%;
overflow: auto;
flex-grow: 1;
}
height: 100%;
display: flex;
flex-direction: column;
.list-exp-bar-header {
line-height: 50px;
border-bottom: 1px solid #ddd;
.list-exp-bar-title {
font-size: 18px;
padding-left: 8px;
i {
font-size: 20px;
margin-top: -2px;
}
}
}
.exp-bar-action-container {
display: flex;
justify-content: flex-start;
align-items: center;
flex-wrap: wrap;
.search-container {
width: 30%;
height: 48px;
padding: 10px 10px 10px 0;
min-width: 200px;
max-width: 400px;
}
> .right-pane.ivu-split-pane {
> div {
padding-left: 10px;
}
.toolbar-container{
padding: 4px;
}
> .left-pane.ivu-split-pane {
padding-right: 10px;
.quick-group-container {
padding-top: 8px;
padding-right: 20px;
}
}
> .ivu-split-vertical{
> .ivu-split-pane {
> div {
height: 100%;
overflow: auto;
display: flex;
flex-direction: column;
.list-exp-bar-header {
line-height: 50px;
border-bottom: 1px solid #ddd;
.list-exp-bar-title {
font-size: 18px;
padding-left: 8px;
i {
font-size: 20px;
margin-top: -2px;
}
}
}
.container-header{
display: flex;
justify-content: space-between;
align-items: center;
.search-container {
width: 30%;
height: 48px;
padding: 10px 10px 10px 0;
min-width: 200px;
max-width: 400px;
}
.toolbar-container{
padding: 4px;
}
}
.list-exp-bar-content {
<#-- 计算高度 -->
<#if ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 88px);
<#elseif ctrl.isShowTitleBar() && !ctrl.isEnableSearch()>
height: calc(100% - 40px);
<#elseif !ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 38px);
<#else>
height: 100%;
</#if>
overflow: auto;
margin-bottom: 10px;
}
.list-exp-bar-content2 {
height: 100%;
overflow: auto;
flex-grow: 1;
}
}
}
> .top-pane.ivu-split-pane {
> div {
padding-bottom: 10px;
}
}
> .bottom-pane.ivu-split-pane {
padding-top: 10px;
}
.list-exp-bar-content {
flex-grow: 1;
overflow: auto;
}
}
......
<#assign generateTip>
// 基于 @CONTROL/列表导航/CONTROL.vue.ftl 生成
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/列表导航/MODEL.ts.ftl 生成
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
......
// 基于 @CONTROL/列表导航/SERVICE.ts.ftl 生成
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
......
// 基于 @CONTROL/卡片视图导航/CONTROL.less.ftl 生成
.app-dataview-exp-bar {
> .ivu-split-horizontal {
> .ivu-split-trigger-con {
height: 100%;
width: 1px;
}
> .ivu-split-pane {
> div {
height: 100%;
overflow: auto;
display: flex;
flex-direction: column;
.dataview-exp-bar-header {
line-height: 50px;
border-bottom: 1px solid #ddd;
.dataview-exp-bar-title {
font-size: 18px;
padding-left: 8px;
i {
font-size: 20px;
margin-top: -2px;
}
}
}
.container-header{
display: flex;
justify-content: flex-start;
align-items: center;
flex-wrap: wrap;
.quick-group-container {
padding-top: 8px;
padding-right: 20px;
}
.search-container {
width: 30%;
height: 48px;
padding: 10px 10px 10px 0;
min-width: 200px;
max-width: 400px;
}
.toolbar-container{
padding: 4px;
display: flex;
flex-wrap: wrap;
align-items: center;
}
}
.dataview-exp-bar-content {
<#-- 计算高度 -->
<#if ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 88px);
<#elseif ctrl.isShowTitleBar() && !ctrl.isEnableSearch()>
height: calc(100% - 40px);
<#elseif !ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 38px);
<#else>
height: 100%;
</#if>
overflow: auto;
padding: 16px 0;
margin-bottom: 10px;
}
.dataview-exp-bar-content2 {
height: 100%;
overflow: auto;
flex-grow: 1;
}
}
}
> .right-pane.ivu-split-pane {
> div {
padding-left: 10px;
height: 100%;
display: flex;
flex-direction: column;
.dataview-exp-bar-header {
line-height: 50px;
border-bottom: 1px solid #ddd;
.dataview-exp-bar-title {
font-size: 18px;
padding-left: 8px;
i {
font-size: 20px;
margin-top: -2px;
}
}
> .left-pane.ivu-split-pane {
padding-right: 10px;
}
}
}
> .ivu-split-vertical{
> .ivu-split-pane {
> div {
height: 100%;
.dataview-exp-bar-header {
line-height: 50px;
border-bottom: 1px solid #ddd;
.dataview-exp-bar-title {
font-size: 18px;
padding-left: 8px;
i {
font-size: 20px;
margin-top: -2px;
}
}
}
.container-header{
display: flex;
justify-content: flex-start;
align-items: center;
flex-wrap: wrap;
.search-container {
width: 30%;
height: 48px;
padding: 10px 10px 10px 0;
min-width: 200px;
max-width: 400px;
}
.toolbar-container{
padding: 4px;
}
.quick-group-container{
padding-top: 8px;
padding-right: 20px;
}
}
.dataview-exp-bar-content {
<#-- 计算高度 -->
<#if ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 88px);
<#elseif ctrl.isShowTitleBar() && !ctrl.isEnableSearch()>
height: calc(100% - 40px);
<#elseif !ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 38px);
<#else>
height: 100%;
</#if>
overflow: auto;
margin-bottom: 10px;
}
.dataview-exp-bar-content2 {
height: 100%;
overflow: auto;
flex-grow: 1;
}
}
.exp-bar-action-container {
display: flex;
justify-content: flex-start;
align-items: center;
flex-wrap: wrap;
.search-container {
width: 30%;
height: 48px;
padding: 10px 10px 10px 0;
min-width: 200px;
max-width: 400px;
}
> .top-pane.ivu-split-pane {
> div {
padding-bottom: 10px;
}
.toolbar-container{
padding: 4px;
}
> .bottom-pane.ivu-split-pane {
padding-top: 10px;
.quick-group-container {
padding-top: 8px;
padding-right: 20px;
}
}
.dataview-exp-bar-content {
flex-grow: 1;
overflow: auto;
}
}
<#ibizinclude>
......
<#assign generateTip>
// 基于 @CONTROL/卡片视图导航/CONTROL.vue.ftl 生成
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/卡片视图导航/MODEL.ts.ftl 生成
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
......
// 基于 @CONTROL/卡片视图导航/SERVICE.ts.ftl 生成
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
......
......@@ -19,6 +19,7 @@ ${ctrl.render.code}
:key="'${form.name}'"
:viewState='wizardState'
:context="context"
:viewtag="viewtag"
: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>"
......@@ -42,6 +43,7 @@ ${ctrl.render.code}
</layout>
</#if>
</template>
// 基于 @CONTROL/向导面板/CONTROL-BASE.vue.ftl 生成
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
......@@ -70,6 +72,14 @@ ${ctrl.render.code}
*/
@Prop({ default: true }) public showBusyIndicator?: boolean;
/**
* 视图标识
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop() public viewtag!: string;
/**
* 状态属性
*
......@@ -331,6 +341,9 @@ ${ctrl.render.code}
public ${ctrl.name}_formload(args: any, name: string, $event2?: any) {
if(args) {
Object.assign(this.formParam, args);
if (Object.is(this.curState, 'NEXT') || Object.is(this.curState, 'PREV')) {
this.$store.commit('viewaction/setViewDataChange', { viewtag: this.viewtag, viewdatachange: true });
}
}
}
......
<#assign content>
:showBusyIndicator="${ctrl.isShowBusyIndicator()?c}"
:viewtag="viewtag"
<#if ctrl.getPSControlActions()??>
<#list ctrl.getPSControlActions() as action>
<#if action.getPSAppDEMethod?? && action.getPSAppDEMethod()??>
......
// 基于 @CONTROL/向导面板/CONTROL.less.ftl 生成
.app-wizard {
background: #fff;
height: 100%;
......
<#assign generateTip>
// 基于 @CONTROL/向导面板/CONTROL.vue.ftl 生成
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/向导面板/MODEL.ts.ftl 生成
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
......
// 基于 @CONTROL/向导面板/SERVICE.ts.ftl 生成
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
......
......@@ -7,7 +7,7 @@
</div>
</#if>
</template>
// 基于 @CONTROL/地图/CONTROL-BASE.vue.ftl 生成
<#assign import_block>
import echarts from 'echarts';
import 'echarts/map/js/china.js'
......@@ -349,18 +349,33 @@ import { Http } from "@/utils";
let tempViewParams: any = parentData.viewparams ? parentData.viewparams : {};
Object.assign(tempViewParams, JSON.parse(JSON.stringify(this.viewparams)));
Object.assign(data, { viewparams: tempViewParams });
this.service.search(this.fetchAction, this.context, data, isloadding).then((response: any) => {
if(!response || response.status !== 200) {
this.$notify.warning({
title: '警告',
message: response.error.message
})
this.handleCtrlEvents('onbeforeload', { viewparams: data }).then((beforeLoadRes: boolean) => {
if (!beforeLoadRes) {
return;
}
this.$emit('load', response.data ? response.data : []);
this.items = response.data;
this.handleOptions(response.data);
this.setOptions();
});
this.service.search(this.fetchAction, this.context, data, isloadding).then((response: any) => {
if(!response || response.status !== 200) {
this.handleCtrlEvents('onloaderror', { viewparams: data }).then((loadErrorRes: boolean) => {
if (!loadErrorRes) {
return;
}
this.$notify.warning({
title: '警告',
message: response.error.message
})
})
}
this.handleCtrlEvents('onloadsuccess', { data: response.data ? response.data : [] }).then((loadSuccessRes: boolean) => {
if (!loadSuccessRes) {
return;
}
this.$emit('load', response.data ? response.data : []);
this.items = response.data;
this.handleOptions(response.data);
this.setOptions();
})
});
})
}
/**
......
// 基于 @CONTROL/地图/CONTROL.less.ftl 生成
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
......
<#assign generateTip>
// 基于 @CONTROL/地图/CONTROL.vue.ftl 生成
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/地图/MODEL.ts.ftl 生成
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
......
// 基于 @CONTROL/地图/SERVICE.ts.ftl 生成
<#assign import_block>
<#if ctrl.getPSSysMapItems?? && ctrl.getPSSysMapItems()??>
<#list ctrl.getPSSysMapItems() as mapitem>
......
......@@ -7,8 +7,8 @@
<#if ctrl.getEmbeddedPSAppView()??>
<${srffilepath2(ctrl.getEmbeddedPSAppView().getCodeName())}
class="viewcontainer2"
:viewdata="toString(item.viewdata)"
:viewparam="toString(item.viewparam)"
:viewdata="JSON.stringify(item.viewdata)"
:viewparam="JSON.stringify(item.viewparam)"
:viewDefaultUsage="false"
:panelState="panelState"
@viewdataschange="viewDataChange"
......@@ -26,7 +26,7 @@
</div>
</#if>
</template>
// 基于 @CONTROL/多编辑视图面板/CONTROL-BASE.vue.ftl 生成
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
......@@ -128,16 +128,6 @@
this.$emit('drdatasaved', false);
}
}
/**
* 对象转字符串
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public toString(item:any): string{
return JSON.stringify(item);
}
/**
......
// 基于 @CONTROL/多编辑视图面板/CONTROL.less.ftl 生成
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
......
<#assign generateTip>
// 基于 @CONTROL/多编辑视图面板/CONTROL.vue.ftl 生成
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/多编辑视图面板/MODEL.ts.ftl 生成
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/多编辑视图面板/SERVICE.ts.ftl 生成
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
......
......@@ -21,7 +21,7 @@ ${item.render.code}
<#assign counter = uiaction.getPSAppCounter() />
<Badge type="primary" v-show="${ModelsName}.${item.name}.visabled" :count="${counter.getCodeName()?lower_case}counterservice.counterData.<#if uiaction.getCounterId()??>${uiaction.getCounterId()}</#if>">
</#if>
<i-button v-show="${ModelsName}.${item.name}.visabled" :disabled="${ModelsName}.${item.name}.disabled" class='<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' v-loading:i-button @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)">
<i-button v-show="${ModelsName}.${item.name}.visabled" :disabled="${ModelsName}.${item.name}.disabled" class='<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' v-button-loading:i-button @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)">
<#if item.isShowIcon()><i class='<#if item.getPSSysImage()??><#assign img=item.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i></#if>
<#if item.isShowCaption()><span class='caption'>{{<#if langbase??>$t('${langbase}.${item.name}.caption')<#else>'${item.getCaption()}'</#if>}}</span></#if>
</i-button>
......@@ -40,7 +40,7 @@ ${item.render.code}
<#assign counter = uiaction.getPSAppCounter() />
<Badge type="primary" v-show="${ModelsName}.${item.name}.visabled" :count="${counter.getCodeName()?lower_case}counterservice.counterData.<#if uiaction.getCounterId()??>${uiaction.getCounterId()}</#if>">
</#if>
<i-button v-show="${ModelsName}.${item.name}.visabled" :disabled="${ModelsName}.${item.name}.disabled" class='<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' v-loading:i-button @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)">
<i-button v-show="${ModelsName}.${item.name}.visabled" :disabled="${ModelsName}.${item.name}.disabled" class='<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' v-button-loading:i-button @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)">
<#if item.isShowIcon()><i class='<#if item.getPSSysImage()??><#assign img=item.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i></#if>
<#if item.isShowCaption()><span class='caption'>{{<#if langbase??>$t('${langbase}.${item.name}.caption')<#else>'${item.getCaption()}'</#if>}}</span></#if>
</i-button>
......
......@@ -27,9 +27,10 @@
<i :class="[item0.iconcls, 'app-menu-icon']"></i>
</template>
<template v-else>
<i class='fa fa-cogs app-menu-icon'></i>
<i class='app-menu-icon'></i>
<#-- <i class='fa fa-cogs app-menu-icon'></i> -->
</template>
<span class='text' :title="$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item0.name.toLowerCase())">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item0.name.toLowerCase())}}</span>
<span class='text' :title="$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item0.name)">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item0.name)}}</span>
</template>
<template v-for="item1 in item0.items">
<template v-if="item1.items && Array.isArray(item1.items) && item1.items.length > 0">
......@@ -41,7 +42,7 @@
<template v-else-if="item1.iconcls && item1.iconcls != ''">
<i :class="[item1.iconcls, 'app-menu-icon']"></i>
</template>
<span class='text' :title="$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item1.name.toLowerCase())">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item1.name.toLowerCase())}}</span>
<span class='text' :title="$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item1.name)">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item1.name)}}</span>
</template>
<template v-for="item2 in item1.items">
<template v-if="item2.type =='MENUITEM'">
......@@ -53,7 +54,7 @@
<i :class="[item2.iconcls, 'app-menu-icon']"></i>
</template>
<template slot="title">
<span class="text" :title="$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item2.name.toLowerCase())">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item2.name.toLowerCase())}}</span>
<span class="text" :title="$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item2.name)">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item2.name)}}</span>
<template v-if="counterdata && counterdata[item2.counterid] && counterdata[item2.counterid] > 0">
<span class="pull-right">
<badge :count="counterdata[item2.counterid]" :overflow-count="9999"></badge>
......@@ -75,7 +76,7 @@
<i :class="[item1.iconcls, 'app-menu-icon']"></i>
</template>
<template slot="title">
<span class="text" :title="$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item1.name.toLowerCase())">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item1.name.toLowerCase())}} </span>
<span class="text" :title="$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item1.name)">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item1.name)}} </span>
<template v-if="counterdata && counterdata[item1.counterid] && counterdata[item1.counterid] > 0">
<span class="pull-right">
<badge :count="counterdata[item1.counterid]" :overflow-count="9999"></badge>
......@@ -98,10 +99,11 @@
<i :class="[item0.iconcls, 'app-menu-icon']"></i>
</template>
<template v-else>
<i class='fa fa-cogs app-menu-icon'></i>
<i class='app-menu-icon'></i>
<#-- <i class='fa fa-cogs app-menu-icon'></i> -->
</template>
<template slot="title">
<span class="text" :title="$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item0.name.toLowerCase())">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item0.name.toLowerCase())}}</span>
<span class="text" :title="$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item0.name)">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item0.name)}}</span>
<template v-if="counterdata && counterdata[item0.counterid] && counterdata[item0.counterid] > 0">
<span class="pull-right">
<badge :count="counterdata[item0.counterid]" :overflow-count="9999"></badge>
......@@ -120,7 +122,7 @@
</div>
</#if>
</template>
// 基于 @CONTROL/应用菜单/CONTROL-BASE.vue.ftl 生成
<#assign import_block>
import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-model';
import { Environment } from '@/environments/environment';
......@@ -301,7 +303,7 @@ import AuthService from '@/authservice/auth-service';
* @type {AuthService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public authService:AuthService = new AuthService({ $store: this.$store });
public authService:AuthService = new AuthService();
/**
* vue 生命周期
......@@ -500,24 +502,29 @@ import AuthService from '@/authservice/auth-service';
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public click(item: any) {
if (item) {
let navDataService = NavDataService.getInstance(this.$store);
if(Object.is(this.navModel,"route")){
navDataService.removeNavData(this.viewtag);
this.handleCtrlEvents('onselectionchange', { data: item }).then((res: boolean) => {
if (!res) {
return;
}
switch (item.appfunctag) {
<#if ctrl.getPSAppFuncs()??>
<#assign appFuncs = ctrl.getPSAppFuncs()>
<#list appFuncs as singFuncs>
case '${singFuncs.getCodeName()}':
this.click${singFuncs.codeName}(item);
return;
</#list>
</#if>
default:
console.warn('未指定应用功能');
if (item) {
let navDataService = NavDataService.getInstance();
if(Object.is(this.navModel,"route")){
navDataService.removeNavData(this.viewtag);
}
switch (item.appfunctag) {
<#if ctrl.getPSAppFuncs()??>
<#assign appFuncs = ctrl.getPSAppFuncs()>
<#list appFuncs as singFuncs>
case '${singFuncs.getCodeName()}':
this.click${singFuncs.codeName}(item);
return;
</#list>
</#if>
default:
console.warn('未指定应用功能');
}
}
}
})
}
<#if ctrl.getPSAppFuncs()??>
......
// 基于 @CONTROL/应用菜单/CONTROL.less.ftl 生成
/*** BRGIN:菜单样式 ***/
.app-app-menu {
overflow-y: auto;
......
<#assign generateTip>
// 基于 @CONTROL/应用菜单/CONTROL.vue.ftl 生成
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/应用菜单/MODEL.ts.ftl 生成
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
......
// 基于 @CONTROL/应用菜单/SERVICE.ts.ftl 生成
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
......
......@@ -9,7 +9,7 @@
<img :src="item.iconcls" v-else-if="!Object.is(item.iconcls, '')"/>
<i class='fa fa-cogs' v-else></i>
</span>
<span>{{$t('app.menus.${ctrl.codeName?lower_case}.' + item.name.toLowerCase())}}</span>
<span>{{$t('app.menus.${ctrl.codeName?lower_case}.' + item.name)}}</span>
<span class="line"></span>
</p>
<p style=" display: 'flex' ">
......
// 基于 @CONTROL/应用菜单(快捷菜单)/CONTROL.less.ftl 生成
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
......
<#assign generateTip>
// 基于 @CONTROL/应用菜单(快捷菜单)/CONTROL.vue.ftl 生成
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
......@@ -43,6 +43,7 @@ ${ctrl.render.code}
</div>
</#if>
</template>
// 基于 @CONTROL/搜索栏/CONTROL-BASE.vue.ftl 生成
<#assign import_block>
import FilterTree from '@components/filter-tree/filter-tree.vue';
import moment from 'moment';
......
// 基于 @CONTROL/搜索栏/CONTROL.less.ftl 生成
.search-bar-footer {
height: 32px;
margin-bottom: 6px;
......
<#assign generateTip>
// 基于 @CONTROL/搜索栏/CONTROL.vue.ftl 生成
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/搜索栏/MODEL.ts.ftl 生成
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
......
// 基于 @CONTROL/搜索栏/SERVICE.ts.ftl 生成
<#assign import_block>
import UtilService from '@/utilservice/util-service';
</#assign>
......
......@@ -4,7 +4,7 @@
<#if item.render??>
${item.render.code}
<#else>
<app-form-group layoutType="<#if item.getPSLayoutPos()??>${item.getPSLayoutPos().getLayout()}</#if>" titleStyle="<#if item.getLabelPSSysCss?? && item.getLabelPSSysCss()??>${item.getLabelPSSysCss().getCssName()}</#if>" class='<#if item.getPSSysCss?? && item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' uiActionGroup="detailsModel.${item.name}.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="<#if langbase??>$t('${langbase}.details.${item.name}')<#else>'${item.getCaption()}'</#if>" :isShowCaption="${item.isShowCaption()?c}" uiStyle="${item.getDetailStyle()}" :titleBarCloseMode="${item.getTitleBarCloseMode()}" :isInfoGroupMode="${item.isInfoGroupMode()?c}">
<app-form-group layoutType="<#if item.getPSLayoutPos()??>${item.getPSLayoutPos().getLayout()}</#if>" titleStyle="<#if item.getLabelPSSysCss?? && item.getLabelPSSysCss()??>${item.getLabelPSSysCss().getCssName()}</#if>" class='<#if item.getPSSysCss?? && item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' uiActionGroup="detailsModel.${item.name}.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" @collapseChange="($event)=>{formDetailGroupChange('${item.name}',$event)}" :caption="<#if langbase??>$t('${langbase}.details.${item.name}')<#else>'${item.getCaption()}'</#if>" :isShowCaption="${item.isShowCaption()?c}" uiStyle="${item.getDetailStyle()}" :titleBarCloseMode="${item.getTitleBarCloseMode()}" :isInfoGroupMode="${item.isInfoGroupMode()?c}">
<#assign content>
<#list item.getPSDEFormDetails() as formmenber>
<#if !(formmenber.isHidden?? && formmenber.isHidden())>
......
......@@ -4,6 +4,7 @@
<template>
${P.getPartCode(item,'FORM').code}
</template>
// 基于 @CONTROL/搜索表单/CONTROL-BASE.vue.ftl 生成
<#assign import_block>
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
......@@ -689,22 +690,30 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
* @param {*} [opt={}]
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public loadDraft(opt: any = {},mode?:string): void {
public async loadDraft(opt: any = {},mode?:string): Promise<any> {
if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return;
}
const arg: any = { ...opt } ;
Object.assign(arg,{viewparams:this.viewparams});
let post: Promise<any> = this.service.loadDraft(this.loaddraftAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
Object.assign(arg, { viewparams:this.viewparams });
if (!(await this.handleCtrlEvents('onbeforeloaddraft', { data: arg }))) {
return;
}
try {
const response = await this.service.loadDraft(this.loaddraftAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
if (!response.status || response.status !== 200) {
if (!(await this.handleCtrlEvents('onloaddrafterror', { data: response && response.data ? response.data : arg }))) {
return;
}
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return response;
}
if (!(await this.handleCtrlEvents('onloaddraftsuccess', { data: response.data }))) {
return;
}
const data = response.data;
this.resetDraftFormStates();
this.onFormLoad(data,'loadDraft');
......@@ -727,7 +736,11 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.$nextTick(() => {
this.formState.next({ type: 'load', data: data });
});
}).catch((response: any) => {
return response;
} catch(response: any) {
if (!(await this.handleCtrlEvents('onloaddrafterror', { data: response && response.data ? response.data : arg }))) {
return;
}
if (response && response.status === 401) {
return;
}
......@@ -738,7 +751,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
const { data: _data } = response;
this.$Notice.error({ title: _data.title, desc: _data.message });
});
}
}
/**
......@@ -782,7 +795,11 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
if (!this.formValidateStatus()) {
return;
}
this.$emit('search', this.data);
this.handleCtrlEvents('onsearch', { }).then((result: boolean) => {
if (result) {
this.$emit('search', this.data);
}
})
}
/**
......@@ -791,7 +808,11 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onReset() {
this.loadDraft({},'RESET');
this.handleCtrlEvents('onreset', { }).then((result: boolean) => {
if (result) {
this.loadDraft({},'RESET');
}
})
}
</#if>
<#if ctrl.getSearchButtonStyle() == 'SEARCHONLY'>
......@@ -805,7 +826,11 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
if (!this.formValidateStatus()) {
return;
}
this.$emit('search', this.data);
this.handleCtrlEvents('onsearch', { }).then((result: boolean) => {
if (result) {
this.$emit('search', this.data);
}
})
}
</#if>
</#if>
......
<#-- content -->
<#assign content>
:showBusyIndicator="${ctrl.isShowBusyIndicator()?c}"
<#if view.isExpandSearchForm??>
<#if view.getPSViewLayoutPanel()?? && view.getPSViewLayoutPanel().isUseDefaultLayout() && view.isExpandSearchForm??>
v-show="<#if ctrl.getFormStyle() == "SEARCHBAR">true<#else>isExpandSearchForm</#if>"
</#if>
loaddraftAction="<#if ctrl.getGetDraftPSControlAction()?? && ctrl.getGetDraftPSControlAction().getPSAppDEMethod()??>${ctrl.getGetDraftPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
......
// 基于 @CONTROL/搜索表单/CONTROL.less.ftl 生成
.ivu-tabs-no-animation>.ivu-tabs-content{
padding: 0 16px;
}
......
<#assign generateTip>
// 基于 @CONTROL/搜索表单/CONTROL.vue.ftl 生成
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/搜索表单/MODEL.ts.ftl 生成
<#ibizinclude>
../@MACRO/MODEL/FORM.ts.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/搜索表单/SERVICE.ts.ftl 生成
<#ibizinclude>
../@MACRO/SERVICE/FORM.ts.ftl
</#ibizinclude>
\ No newline at end of file
.drtab{
height:100%;
overflow: auto;
.app-dr-tab {
height: 100%;
>.ivu-tabs-bar {
margin-bottom: 0px;
}
>.ivu-tabs-content {
height: calc(100% - 36px);
padding: 0px !important;
.ivu-tabs-tabpane {
height: 100%;
.main-data {
width: 100%;
height: 100%;
}
}
}
}
// 基于 @CONTROL/数据关系分页部件/CONTROL.less.ftl 生成
.app-dr-tab {
.dr-tab-item {
cursor: pointer;
padding: 0 16px;
&.is-active,
&:hover {
color: #2d8cf0;
}
&.is-active {
position: relative;
}
&.is-active::after {
content: '';
width: 100%;
height: 2px;
background: #2d8cf0;
position: absolute;
left: 0px;
bottom: 0px;
}
}
}
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<#assign generateTip>
// 基于 @CONTROL/数据关系分页部件/CONTROL.vue.ftl 生成
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/数据关系分页部件/MODEL.ts.ftl 生成
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/数据关系分页部件/SERVICE.ts.ftl 生成
<#ibizinclude>
../@MACRO/SERVICE/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
......@@ -13,7 +13,4 @@
</#list>
</#if>
@closeview="closeView($event)">
<#if view.hasPSControl('form')>
${P.getCtrlCode('form', 'CONTROL.html').code}
</#if>
</view_${ctrl.getName()}>
\ No newline at end of file
// 基于 @CONTROL/数据关系栏/CONTROL.less.ftl 生成
.app-dr-bar {
height: 100%;
width: 100%;
background: white;
>.ivu-layout-sider {
background: white;
border-right: solid 1px #e6e6e6;
margin-bottom: 10px;
>.ivu-layout-sider-children {
overflow: auto;
>.el-menu {
height: 100%;
border-right: solid 0px #e6e6e6;
> .el-menu {
height: 100%;
border-right: solid 0px #e6e6e6;
}
> .el-menu {
margin-top: -1px;
border-right: 0;
.el-submenu__title i,
.el-menu-item i {
font-size: 14px;
width: 14px;
}
.el-menu-item,
.el-submenu__title {
height: 36px;
font-size: 14px;
line-height: 32px;
> img {
height: 18px;
width: 18px;
margin-top: -2px;
margin-right: 5px;
}
}
.el-menu-item,
.el-submenu,
.el-menu {
border-top: 1px solid #fff;
}
.el-menu-item,
.el-submenu > .el-submenu__title {
height: 40px;
line-height: 36px;
border-left: 3px solid transparent;
}
.el-menu-item.is-active {
background: #e9e9e9 !important;
color: #666666 !important;
border-left: 3px solid #3fd5c0;
i {
color: #666666;
}
}
// .app-menu-icon {
// margin-right: 3px;
// }
> .el-submenu {
> .el-menu {
margin-top: -1px;
border-right: 0;
.el-submenu__title i, .el-menu-item i {
font-size: 14px;
width: 14px;
}
.el-menu-item, .el-submenu__title {
height: 36px;
font-size: 14px;
line-height: 32px;
> img {
height: 18px;
width: 18px;
margin-top: -2px;
margin-right: 5px;
}
}
.el-menu-item, .el-submenu, .el-menu {
border-top: 1px solid #fff;
}
.el-menu-item, .el-submenu > .el-submenu__title {
height: 40px;
line-height: 36px;
border-left: 3px solid transparent;
padding-left: 16px !important;
}
.el-menu-item.is-active {
background: #e9e9e9 !important;
color: #666666 !important;
border-left: 3px solid #3fd5c0;
i {
color: #666666;
}
> .el-menu-item,
> .el-submenu > .el-submenu__title {
padding-left: 38px !important;
}
// .app-menu-icon {
// margin-right: 3px;
// }
> .el-submenu {
> .el-menu {
> .el-menu-item, > .el-submenu > .el-submenu__title {
padding-left: 38px !important;
}
> .el-submenu {
> .el-menu {
> .el-menu-item, > .el-submenu > .el-submenu__title {
padding-left: 58px !important;
}
}
> .el-menu-item,
> .el-submenu > .el-submenu__title {
padding-left: 58px !important;
}
}
}
}
}
}
>content {
height: 100%;
.main-data {
width: 100%;
height: 100%;
padding: 0 15px;
}
}
}
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<#assign generateTip>
// 基于 @CONTROL/数据关系栏/CONTROL.vue.ftl 生成
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/数据关系栏/MODEL.ts.ftl 生成
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/数据关系栏/SERVICE.ts.ftl 生成
<#ibizinclude>
../@MACRO/SERVICE/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
......@@ -7,11 +7,11 @@
<#else>
<div class="app-data-chart<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<div v-show="isNoData" class="chart-no-data"><i class="el-icon-data-analysis"></i>{{$t('<#if langbase??>${langbase}.nodata</#if>')}}</div>
<div v-show="!isNoData" class="app-charts" :id="chartId" style="<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()?c}px;</#if>height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()?c}px<#else>100%</#if>;padding: 6px 0;"></div>
<div v-show="!isNoData" class="app-charts" :id="chartId" style="<#if ctrl.getWidth()?? && ctrl.getWidth() gt 0>width: ${ctrl.getWidth()?c}px;</#if>height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()?c}px<#else>100%</#if>;padding: 6px 0;"></div>
</div>
</#if>
</template>
// 基于 @CONTROL/数据图表 (新)/CONTROL-BASE.vue.ftl 生成
<#assign import_block>
import echarts from 'echarts';
import moment from "moment";
......@@ -143,7 +143,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
* @type {CodeListService}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
public codeListService:CodeListService = new CodeListService();
/**
* 序列模型
......
// 基于 @CONTROL/数据图表 (新)/CONTROL.less.ftl 生成
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
......
<#assign generateTip>
// 基于 @CONTROL/数据图表 (新)/CONTROL.vue.ftl 生成
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/数据图表 (新)/MODEL.ts.ftl 生成
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
......
// 基于 @CONTROL/数据图表 (新)/SERVICE.ts.ftl 生成
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
......
......@@ -7,11 +7,11 @@
<#else>
<div class="app-data-chart<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<div v-show="isNoData" class="chart-no-data"><i class="el-icon-data-analysis"></i>{{$t('<#if langbase??>${langbase}.nodata</#if>')}}</div>
<div v-show="!isNoData" class="app-charts" :id="chartId" style="<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()?c}px;</#if>height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()?c}px<#else>100%</#if>;padding: 6px 0;"></div>
<div v-show="!isNoData" class="app-charts" :id="chartId" style="<#if ctrl.getWidth()?? && ctrl.getWidth() gt 0>width: ${ctrl.getWidth()?c}px;</#if>height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()?c}px<#else>100%</#if>;padding: 6px 0;"></div>
</div>
</#if>
</template>
// 基于 @CONTROL/数据图表/CONTROL-BASE.vue.ftl 生成
<#assign import_block>
import echarts from 'echarts';
import moment from "moment";
......@@ -143,7 +143,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
* @type {CodeListService}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
public codeListService:CodeListService = new CodeListService();
/**
* 序列模型
......@@ -313,13 +313,36 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
Object.assign(arg,{size:${appDataSet.getPageSize()?c}});
</#if>
</#if>
this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)),arg,this.showBusyIndicator).then((res) => {
if (res) {
this.transformToBasicChartSetData(res.data,(codelist:any) =>{_this.drawCharts(codelist)});
this.handleCtrlEvents('onbeforeload', { viewparams: arg }).then((beforeLoadRes: boolean) => {
if (!beforeLoadRes) {
return;
}
}).catch((error) => {
console.error(error);
});
this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)),arg,this.showBusyIndicator).then((res) => {
if (res) {
this.handleCtrlEvents('onloadsuccess', { data: res.data }).then((loadSuccessRes: boolean) => {
if (!loadSuccessRes) {
return;
}
this.transformToBasicChartSetData(res.data,(codelist:any) =>{_this.drawCharts(codelist)});
})
} else {
this.handleCtrlEvents('onloaderror').then((loadErrorRes: boolean) => {
if (!loadErrorRes) {
return;
}
// 加载失败逻辑
});
}
}).catch((error) => {
this.handleCtrlEvents('onloaderror').then((loadErrorRes: boolean) => {
if (!loadErrorRes) {
return;
}
// 加载失败逻辑
console.error(error);
});
});
})
}
/**
......
// 基于 @CONTROL/数据图表/CONTROL.less.ftl 生成
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
......
<#assign generateTip>
// 基于 @CONTROL/数据图表/CONTROL.vue.ftl 生成
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/数据图表/MODEL.ts.ftl 生成
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
......
// 基于 @CONTROL/数据图表/SERVICE.ts.ftl 生成
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
......
......@@ -104,6 +104,7 @@
</div>
</#if>
</template>
// 基于 @CONTROL/数据看板/CONTROL-BASE.vue.ftl 生成
<#assign import_block>
import UtilService from '@/utilservice/util-service';
</#assign>
......
// 基于 @CONTROL/数据看板/CONTROL.less.ftl 生成
.dashboard {
flex-grow: 1;
height: 100%;
......
......@@ -19,6 +19,7 @@ import layout_${panel.getName()} from '@widgets/${srffilepath2(panel.getPSAppDat
</#list>
</#if>
<#if import_block??>${import_block}</#if>
// 基于 @CONTROL/数据关系栏/CONTROL.vue.ftl 生成
@Component({
components: {
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
......
// 基于 @CONTROL/数据看板/MODEL.ts.ftl 生成
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/数据看板/SERVICE.ts.ftl 生成
<#ibizinclude>
../@MACRO/SERVICE/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
// 基于 @CONTROL/数据视图/CONTROL.less.ftl 生成
<#assign hasSortBar = false />
<#if ctrl.getPSDEDataViewDataItems?? && ctrl.getPSDEDataViewDataItems()??>
<#list ctrl.getPSDEDataViewDataItems() as dataItem>
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册