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

update: 更新

上级 a1b27ced
{{#each items as | formDetail |}} {{#each items as | formDetail |}}
{ {
caption: '{{formDetail.caption}}', caption: '{{formDetail.caption}}',
codeName: '{{formDetail.codeName}}', codeName: '{{formDetail.codeName}}',
name: '{{formDetail.name}}', name: '{{formDetail.name}}',
{{#if (eq formDetail.detailType "FORMITEM")}} {{#if (eq formDetail.detailType "FORMITEM")}}
dataType: '{{formDetail.dataType}}', dataType: '{{formDetail.dataType}}',
detailStyle: '{{formDetail.detailStyle}}', detailStyle: '{{formDetail.detailStyle}}',
{{#formDetail.resetItemName}}
resetItemName: '{{formDetail.resetItemName}}', resetItemName: '{{formDetail.resetItemName}}',
{{/formDetail.resetItemName}}
{{#formDetail.valueItemName}}
valueItemName: '{{formDetail.valueItemName}}', valueItemName: '{{formDetail.valueItemName}}',
{{/formDetail.valueItemName}}
{{#each formDetail.psDEFDGroupLogics as | groupLogic |}} {{#each formDetail.psDEFDGroupLogics as | groupLogic |}}
groupOP: {{groupLogic.groupOP}}, groupLogics: {
relatedDetailNames: {{groupLogic.relatedDetailNames}}, name: '{{groupLogic.name}}',
logicCat: {{groupLogic.logicCat}}, groupOP: '{{groupLogic.groupOP}}',
logicType: {{groupLogic.logicType}}, relatedDetailNames: '{{groupLogic.relatedDetailNames}}',
notMode: {{groupLogic.notMode}}, logicCat: '{{groupLogic.logicCat}}',
Logics: [], 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}} {{/each}}
{{/if}} {{/if}}
}, },
{{#if formDetail.psDEFormDetails}} {{#if formDetail.psDEFormDetails}}
{{>(lookup 'FORMDETAILSMODEL') items=formDetail.psDEFormDetails}} {{>(lookup 'FORMDETAILSMODEL') items=formDetail.psDEFormDetails}}
{{/if}} {{/if}}
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
{{#if item.psSysImage.imagePath}} {{#if item.psSysImage.imagePath}}
imgPath: "{{item.psSysImage.imagePath}}", imgPath: "{{item.psSysImage.imagePath}}",
{{/if}} {{/if}}
{{else}}
iconClass: "fa fa-cogs",
{{/if}} {{/if}}
{{#if item.psNavigateContexts}} {{#if item.psNavigateContexts}}
navContext: {{item.psNavigateContexts}}, navContext: {{item.psNavigateContexts}},
......
...@@ -17,7 +17,7 @@ const props = withDefaults(defineProps<LayoutProps>(), { ...@@ -17,7 +17,7 @@ const props = withDefaults(defineProps<LayoutProps>(), {
</script> </script>
<template> <template>
<IbizIndexViewBaseLayout :collapsed="collapsed"> <IbizIndexViewBaseLayout class="ibiz-default-index-view">
<template v-slot:header-left> <template v-slot:header-left>
<slot name="caption"></slot> <slot name="caption"></slot>
</template> </template>
...@@ -38,25 +38,13 @@ const props = withDefaults(defineProps<LayoutProps>(), { ...@@ -38,25 +38,13 @@ const props = withDefaults(defineProps<LayoutProps>(), {
</a-layout-sider> </a-layout-sider>
</template> </template>
<template v-slot:content> <template v-slot:content>
<!-- <div class="ibiz-page-tag"></div> -->
<slot name="router" /> <slot name="router" />
</template> </template>
</IbizIndexViewBaseLayout> </IbizIndexViewBaseLayout>
</template> </template>
<style lang="scss"> <style lang="scss">
.app-index-view { .ibiz-default-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;
}
} }
</style> </style>
\ No newline at end of file
...@@ -36,5 +36,8 @@ ...@@ -36,5 +36,8 @@
.ant-layout-sider { .ant-layout-sider {
overflow-y: auto; overflow-y: auto;
} }
.ant-layout-footer {
padding: 0;
}
} }
</style> </style>
\ No newline at end of file
...@@ -28,21 +28,31 @@ ...@@ -28,21 +28,31 @@
<style lang="scss"> <style lang="scss">
.ibiz-view-layout { .ibiz-view-layout {
padding: 0 24px 24px; padding: 8px 12px 10px;
display: flex;
flex-direction: column;
.ibiz-view-layout__header { .ibiz-view-layout__header {
flex: none; flex: none;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 16px 0; background: #fff;
.ibiz-view-layout__header-content { .ibiz-view-layout__header-content {
height: 48px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin: 0 10px;
border-bottom: 1px solid #E4E4E4;
.ibiz-view__caption {
font-size: 18px;
}
} }
} }
.ibiz-view-layout__body { .ibiz-view-layout__body {
flex: auto; flex: auto;
height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow: auto;
} }
.ibiz-view-footer { .ibiz-view-footer {
flex: none; flex: none;
......
...@@ -35,7 +35,7 @@ const itemClick = (item: IParam) => { ...@@ -35,7 +35,7 @@ const itemClick = (item: IParam) => {
</script> </script>
<template> <template>
<div class="toolbar"> <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"> <template v-for="(item, index) in items" :key="index">
<a-tooltip <a-tooltip
v-if="Object.is(item.itemType, 'DEUIACTION')" v-if="Object.is(item.itemType, 'DEUIACTION')"
...@@ -46,7 +46,6 @@ const itemClick = (item: IParam) => { ...@@ -46,7 +46,6 @@ const itemClick = (item: IParam) => {
v-show="item.visible" v-show="item.visible"
:class="['toolbar-item', item.class]" :class="['toolbar-item', item.class]"
:disabled="item.disabled" :disabled="item.disabled"
type="primary"
@click="itemClick(item)" @click="itemClick(item)"
> >
<IbizIconText <IbizIconText
...@@ -66,7 +65,6 @@ const itemClick = (item: IParam) => { ...@@ -66,7 +65,6 @@ const itemClick = (item: IParam) => {
v-show="childItem.visible" v-show="childItem.visible"
:class="['toolbar-item', item.class]" :class="['toolbar-item', item.class]"
:disabled="childItem.disabled" :disabled="childItem.disabled"
type="primary"
@click="itemClick(childItem)" @click="itemClick(childItem)"
> >
<IbizIconText <IbizIconText
...@@ -104,6 +102,8 @@ const itemClick = (item: IParam) => { ...@@ -104,6 +102,8 @@ const itemClick = (item: IParam) => {
<style lang='scss'> <style lang='scss'>
.toolbar { .toolbar {
display: flex;
align-items: center;
.toolbar-link { .toolbar-link {
gap: 0 !important; gap: 0 !important;
display: flex; display: flex;
...@@ -124,6 +124,7 @@ const itemClick = (item: IParam) => { ...@@ -124,6 +124,7 @@ const itemClick = (item: IParam) => {
} }
} }
.toolbar-item { .toolbar-item {
border-radius: 4px;
.ibiz-icon-text__icon { .ibiz-icon-text__icon {
vertical-align: unset; vertical-align: unset;
} }
......
...@@ -40,7 +40,7 @@ export class FormControl extends MainControl { ...@@ -40,7 +40,7 @@ export class FormControl extends MainControl {
* @memberof FormControl * @memberof FormControl
*/ */
public resetFormData(name: string) { public resetFormData(name: string) {
const formItems: any[] = this.controlState.itemsModel; const formItems: any[] = this.controlState.formDetails;
if (formItems && formItems.length > 0) { if (formItems && formItems.length > 0) {
for (const item of formItems) { for (const item of formItems) {
if (item.resetItemName && item.resetItemName == name) { if (item.resetItemName && item.resetItemName == name) {
...@@ -53,6 +53,38 @@ export class FormControl extends MainControl { ...@@ -53,6 +53,38 @@ 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;
// }
// }
// })
// })
}
/** /**
* 在表单执行某些行为能力后,表单整体数据发生改变后被调用。会依次执行以下逻辑: * 在表单执行某些行为能力后,表单整体数据发生改变后被调用。会依次执行以下逻辑:
* 1. * 1.
......
...@@ -38,7 +38,7 @@ const collapsedChange = () => { ...@@ -38,7 +38,7 @@ const collapsedChange = () => {
</script> </script>
<template> <template>
<IbizIndexViewLayout class="ibiz-index-view" :menuAlign="state.menuAlign" :collapsed="collapsed"> <IbizDefaultIndexViewLayout class="ibiz-index-view" :menuAlign="state.menuAlign" :collapsed="collapsed">
<template #caption> <template #caption>
<div class="index-view-header"> <div class="index-view-header">
\{{state.viewCaption}} \{{state.viewCaption}}
...@@ -66,7 +66,7 @@ const collapsedChange = () => { ...@@ -66,7 +66,7 @@ const collapsedChange = () => {
<template #router> <template #router>
<router-view /> <router-view />
</template> </template>
</IbizIndexViewLayout> </IbizDefaultIndexViewLayout>
</template> </template>
<style lang="scss"> <style lang="scss">
......
...@@ -8,3 +8,21 @@ body{ ...@@ -8,3 +8,21 @@ body{
} }
// 滚动条样式 // 滚动条样式
::-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 = { ...@@ -52,7 +52,7 @@ export const CtrlConfig = {
controlName: '{{ctrl.name}}', controlName: '{{ctrl.name}}',
controlService: new EditFormService<ControlVO>(ControlVO, new {{pascalCase ctrl.psAppDataEntity.codeName}}Service() ), controlService: new EditFormService<ControlVO>(ControlVO, new {{pascalCase ctrl.psAppDataEntity.codeName}}Service() ),
data: new ControlVO({}), data: new ControlVO({}),
itemsModel: [ formDetails: [
{{#each ctrl.psDEFormPages as | FormPage | }} {{#each ctrl.psDEFormPages as | FormPage | }}
{{>(lookup 'FORMDETAILSMODEL') items=FormPage.psDEFormDetails}} {{>(lookup 'FORMDETAILSMODEL') items=FormPage.psDEFormDetails}}
{{/each}} {{/each}}
...@@ -65,13 +65,13 @@ export const CtrlConfig = { ...@@ -65,13 +65,13 @@ export const CtrlConfig = {
{{#each ruleItem.psDEFVRGroupCondition as | condition |}} {{#each ruleItem.psDEFVRGroupCondition as | condition |}}
{trigger: ['change', 'blur'], {trigger: ['change', 'blur'],
validator: (_rule: RuleObject, value: string) => verifyRules(_rule,value,{ validator: (_rule: RuleObject, value: string) => verifyRules(_rule,value,{
{{#condition.condType}}type: {{condition.condType}},{{/condition.condType}} {{#condition.condType}}type: '{{condition.condType}}',{{/condition.condType}}
{{#condition.name}}name: {{condition.name}},{{/condition.name}} {{#condition.name}}name: '{{condition.name}}',{{/condition.name}}
{{#condition.maxValue}}maxValue: {{condition.maxValue}},{{/condition.maxValue}} {{#condition.maxValue}}maxValue: '{{condition.maxValue}}',{{/condition.maxValue}}
{{#condition.minValue}}minValue: {{condition.minValue}},{{/condition.minValue}} {{#condition.minValue}}minValue: '{{condition.minValue}}',{{/condition.minValue}}
{{#condition.ruleInfo}}ruleInfo: {{condition.ruleInfo}},{{/condition.ruleInfo}} {{#condition.ruleInfo}}ruleInfo: '{{condition.ruleInfo}}',{{/condition.ruleInfo}}
{{#condition.includeMaxValue}}includeMaxValue: {{condition.includeMaxValue}},{{/condition.includeMaxValue}} {{#condition.includeMaxValue}}includeMaxValue: '{{condition.includeMaxValue}}',{{/condition.includeMaxValue}}
{{#condition.includeMinValue}}includeMinValue: {{condition.includeMinValue}},{{/condition.includeMinValue}} {{#condition.includeMinValue}}includeMinValue: '{{condition.includeMinValue}}',{{/condition.includeMinValue}}
}) } }) }
{{/each}} {{/each}}
] ]
......
...@@ -51,4 +51,10 @@ const { state, handleEditorEvent } = new FormControl(CtrlConfig).moduleInstall(p ...@@ -51,4 +51,10 @@ const { state, handleEditorEvent } = new FormControl(CtrlConfig).moduleInstall(p
</a-form> </a-form>
</template> </template>
<style lang="scss"> <style lang="scss">
.ibiz-form {
.ant-card-head {
padding: 0;
margin: 0 10px;
}
}
</style> </style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册