提交 5d65ef61 编写于 作者: RedPig97's avatar RedPig97

update: 更新

上级 a1b27ced
{{#each items as | formDetail |}}
{
caption: '{{formDetail.caption}}',
codeName: '{{formDetail.codeName}}',
name: '{{formDetail.name}}',
{{#if (eq formDetail.detailType "FORMITEM")}}
dataType: '{{formDetail.dataType}}',
detailStyle: '{{formDetail.detailStyle}}',
resetItemName: '{{formDetail.resetItemName}}',
valueItemName: '{{formDetail.valueItemName}}',
{{#each formDetail.psDEFDGroupLogics as | groupLogic |}}
groupOP: {{groupLogic.groupOP}},
relatedDetailNames: {{groupLogic.relatedDetailNames}},
logicCat: {{groupLogic.logicCat}},
logicType: {{groupLogic.logicType}},
notMode: {{groupLogic.notMode}},
Logics: [],
{{/each}}
{{/if}}
},
{
caption: '{{formDetail.caption}}',
codeName: '{{formDetail.codeName}}',
name: '{{formDetail.name}}',
{{#if (eq formDetail.detailType "FORMITEM")}}
dataType: '{{formDetail.dataType}}',
detailStyle: '{{formDetail.detailStyle}}',
{{#formDetail.resetItemName}}
resetItemName: '{{formDetail.resetItemName}}',
{{/formDetail.resetItemName}}
{{#formDetail.valueItemName}}
valueItemName: '{{formDetail.valueItemName}}',
{{/formDetail.valueItemName}}
{{#each formDetail.psDEFDGroupLogics as | groupLogic |}}
groupLogics: {
name: '{{groupLogic.name}}',
groupOP: '{{groupLogic.groupOP}}',
relatedDetailNames: '{{groupLogic.relatedDetailNames}}',
logicCat: '{{groupLogic.logicCat}}',
logicType: '{{groupLogic.logicType}}',
notMode: '{{groupLogic.notMode}}',
Logics: [
{{#each groupLogic.psDEFDLogics as | logic |}}
{condOP: '{{logic.condOP}}',dEFDName: '{{logic.dEFDName}}',logicType: '{{logic.logicType}}',name: '{{logic.name}}',}
{{/each}}
],
}
{{/each}}
{{/if}}
},
{{#if formDetail.psDEFormDetails}}
{{>(lookup 'FORMDETAILSMODEL') items=formDetail.psDEFormDetails}}
{{/if}}
......
......@@ -20,6 +20,8 @@
{{#if item.psSysImage.imagePath}}
imgPath: "{{item.psSysImage.imagePath}}",
{{/if}}
{{else}}
iconClass: "fa fa-cogs",
{{/if}}
{{#if item.psNavigateContexts}}
navContext: {{item.psNavigateContexts}},
......
......@@ -17,7 +17,7 @@ const props = withDefaults(defineProps<LayoutProps>(), {
</script>
<template>
<IbizIndexViewBaseLayout :collapsed="collapsed">
<IbizIndexViewBaseLayout class="ibiz-default-index-view">
<template v-slot:header-left>
<slot name="caption"></slot>
</template>
......@@ -38,25 +38,13 @@ const props = withDefaults(defineProps<LayoutProps>(), {
</a-layout-sider>
</template>
<template v-slot:content>
<!-- <div class="ibiz-page-tag"></div> -->
<slot name="router" />
</template>
</IbizIndexViewBaseLayout>
</template>
<style lang="scss">
.app-index-view {
width: 100%;
height: 100%;
.ant-layout-header {
display: flex;
background-color: #fff;
justify-content: space-between;
}
.ant-layout-sider {
overflow-y: auto;
}
.ant-layout-footer {
padding: 0;
}
.ibiz-default-index-view {
}
</style>
\ No newline at end of file
......@@ -36,5 +36,8 @@
.ant-layout-sider {
overflow-y: auto;
}
.ant-layout-footer {
padding: 0;
}
}
</style>
\ No newline at end of file
......@@ -28,21 +28,31 @@
<style lang="scss">
.ibiz-view-layout {
padding: 0 24px 24px;
padding: 8px 12px 10px;
display: flex;
flex-direction: column;
.ibiz-view-layout__header {
flex: none;
display: flex;
flex-direction: column;
padding: 16px 0;
background: #fff;
.ibiz-view-layout__header-content {
height: 48px;
display: flex;
justify-content: space-between;
margin: 0 10px;
border-bottom: 1px solid #E4E4E4;
.ibiz-view__caption {
font-size: 18px;
}
}
}
.ibiz-view-layout__body {
flex: auto;
height: 100%;
display: flex;
flex-direction: column;
overflow: auto;
}
.ibiz-view-footer {
flex: none;
......
......@@ -35,7 +35,7 @@ const itemClick = (item: IParam) => {
</script>
<template>
<div class="toolbar">
<a-space v-if="Object.is(mode,'button')" class="toolbar-button">
<a-space v-if="Object.is(mode,'button')" class="toolbar-button" style="gap: 4px;">
<template v-for="(item, index) in items" :key="index">
<a-tooltip
v-if="Object.is(item.itemType, 'DEUIACTION')"
......@@ -46,7 +46,6 @@ const itemClick = (item: IParam) => {
v-show="item.visible"
:class="['toolbar-item', item.class]"
:disabled="item.disabled"
type="primary"
@click="itemClick(item)"
>
<IbizIconText
......@@ -66,7 +65,6 @@ const itemClick = (item: IParam) => {
v-show="childItem.visible"
:class="['toolbar-item', item.class]"
:disabled="childItem.disabled"
type="primary"
@click="itemClick(childItem)"
>
<IbizIconText
......@@ -104,6 +102,8 @@ const itemClick = (item: IParam) => {
<style lang='scss'>
.toolbar {
display: flex;
align-items: center;
.toolbar-link {
gap: 0 !important;
display: flex;
......@@ -124,6 +124,7 @@ const itemClick = (item: IParam) => {
}
}
.toolbar-item {
border-radius: 4px;
.ibiz-icon-text__icon {
vertical-align: unset;
}
......
......@@ -40,7 +40,7 @@ export class FormControl extends MainControl {
* @memberof FormControl
*/
public resetFormData(name: string) {
const formItems: any[] = this.controlState.itemsModel;
const formItems: any[] = this.controlState.formDetails;
if (formItems && formItems.length > 0) {
for (const item of formItems) {
if (item.resetItemName && item.resetItemName == name) {
......@@ -50,7 +50,39 @@ export class FormControl extends MainControl {
}
}
}
}
}
/**
* @description 动态显示逻辑
* @memberof FormControl
*/
public displayLogic(name: string) {
const formItems: any[] = this.controlState.formDetails;
// 表单动态逻辑
// allFormDetails?.forEach((detail: IPSDEFormDetail) => {
// detail.getPSDEFDGroupLogics()?.forEach((logic: IPSDEFDCatGroupLogic) => {
// // todo lxm 缺少getRelatedDetailNames
// let relatedNames = logic.getRelatedDetailNames() || [];
// if (Object.is(name, '') || relatedNames.indexOf(name) != -1) {
// let ret = this.verifyGroupLogic(this.data, logic);
// switch (logic.logicCat) {
// // 动态空输入,不满足则必填
// case 'ITEMBLANK':
// this.detailsModel[detail.name].required = !ret;
// break;
// // 动态启用,满足则启用
// case 'ITEMENABLE':
// this.detailsModel[detail.name].setDisabled(!ret);
// break;
// // 动态显示,满足则显示
// case 'PANELVISIBLE':
// this.detailsModel[detail.name].setVisible(ret);
// break;
// }
// }
// })
// })
}
/**
......
......@@ -38,7 +38,7 @@ const collapsedChange = () => {
</script>
<template>
<IbizIndexViewLayout class="ibiz-index-view" :menuAlign="state.menuAlign" :collapsed="collapsed">
<IbizDefaultIndexViewLayout class="ibiz-index-view" :menuAlign="state.menuAlign" :collapsed="collapsed">
<template #caption>
<div class="index-view-header">
\{{state.viewCaption}}
......@@ -66,7 +66,7 @@ const collapsedChange = () => {
<template #router>
<router-view />
</template>
</IbizIndexViewLayout>
</IbizDefaultIndexViewLayout>
</template>
<style lang="scss">
......
......@@ -7,4 +7,22 @@ body{
margin: 0;
}
// 滚动条样式
\ No newline at end of file
// 滚动条样式
::-webkit-scrollbar {
background: transparent;
width: 4px;
height: 4px;
}
::-webkit-scrollbar-thumb {
border-radius: 0;
box-shadow: none;
border: 0;
background-color: #d6d6d6;
}
::-webkit-scrollbar-track {
border-radius: 0;
box-shadow: none;
border: 0;
}
\ No newline at end of file
......@@ -52,7 +52,7 @@ export const CtrlConfig = {
controlName: '{{ctrl.name}}',
controlService: new EditFormService<ControlVO>(ControlVO, new {{pascalCase ctrl.psAppDataEntity.codeName}}Service() ),
data: new ControlVO({}),
itemsModel: [
formDetails: [
{{#each ctrl.psDEFormPages as | FormPage | }}
{{>(lookup 'FORMDETAILSMODEL') items=FormPage.psDEFormDetails}}
{{/each}}
......@@ -65,13 +65,13 @@ export const CtrlConfig = {
{{#each ruleItem.psDEFVRGroupCondition as | condition |}}
{trigger: ['change', 'blur'],
validator: (_rule: RuleObject, value: string) => verifyRules(_rule,value,{
{{#condition.condType}}type: {{condition.condType}},{{/condition.condType}}
{{#condition.name}}name: {{condition.name}},{{/condition.name}}
{{#condition.maxValue}}maxValue: {{condition.maxValue}},{{/condition.maxValue}}
{{#condition.minValue}}minValue: {{condition.minValue}},{{/condition.minValue}}
{{#condition.ruleInfo}}ruleInfo: {{condition.ruleInfo}},{{/condition.ruleInfo}}
{{#condition.includeMaxValue}}includeMaxValue: {{condition.includeMaxValue}},{{/condition.includeMaxValue}}
{{#condition.includeMinValue}}includeMinValue: {{condition.includeMinValue}},{{/condition.includeMinValue}}
{{#condition.condType}}type: '{{condition.condType}}',{{/condition.condType}}
{{#condition.name}}name: '{{condition.name}}',{{/condition.name}}
{{#condition.maxValue}}maxValue: '{{condition.maxValue}}',{{/condition.maxValue}}
{{#condition.minValue}}minValue: '{{condition.minValue}}',{{/condition.minValue}}
{{#condition.ruleInfo}}ruleInfo: '{{condition.ruleInfo}}',{{/condition.ruleInfo}}
{{#condition.includeMaxValue}}includeMaxValue: '{{condition.includeMaxValue}}',{{/condition.includeMaxValue}}
{{#condition.includeMinValue}}includeMinValue: '{{condition.includeMinValue}}',{{/condition.includeMinValue}}
}) }
{{/each}}
]
......
......@@ -51,4 +51,10 @@ const { state, handleEditorEvent } = new FormControl(CtrlConfig).moduleInstall(p
</a-form>
</template>
<style lang="scss">
.ibiz-form {
.ant-card-head {
padding: 0;
margin: 0 10px;
}
}
</style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册