Browse Source

chore: work form fixe

master
wangxiang 2 years ago
parent
commit
38f8b9445b
No known key found for this signature in database
GPG Key ID: 1BA7946AB6B232E4
  1. 2
      src/components/AMap/src/AMapDesigner/index.vue
  2. 50
      src/views/workflow/task/TaskForm.vue

2
src/components/AMap/src/AMapDesigner/index.vue

@ -879,7 +879,7 @@
// //
.amap-designer { .amap-designer {
@toolbarHeight: v-bind('mapState.toggleOperatePanelClass.toolbarHeight + "px"');; @toolbarHeight: v-bind('mapState.toggleOperatePanelClass.toolbarHeight + "px"');
@siderWidth: v-bind('mapState.toggleOperatePanelClass.siderWidth + "px"'); @siderWidth: v-bind('mapState.toggleOperatePanelClass.siderWidth + "px"');
@borderColor: #e0e0e0; @borderColor: #e0e0e0;

50
src/views/workflow/task/TaskForm.vue

@ -36,14 +36,17 @@
<a-card v-if="!state.processInsId || state.taskId || state.status === 'reStart'" style="margin-top:10px;margin-bottom:66px;"> <a-card v-if="!state.processInsId || state.taskId || state.status === 'reStart'" style="margin-top:10px;margin-bottom:66px;">
<AForm <AForm
ref="auditForm" ref="auditForm"
:labelCol="{ style: { width: '120px' } }" :labelCol="{ style: { width: '90px' } }"
:wrapperCol="{ style: { width: '100%' } }" :wrapperCol="{ style: { width: '100%' } }"
:model="state.auditForm" :model="state.auditForm"
:scrollToFirstError="true" :scrollToFirstError="true"
> >
<ACol :span="16">
<AFormItem v-if="!state.processInsId || state.status === 'reStart'" label="流程标题" name="formTitle"> <AFormItem v-if="!state.processInsId || state.status === 'reStart'" label="流程标题" name="formTitle">
<a-input v-model:value="state.formTitle" placeholder="请输入流程标题"/> <a-input v-model:value="state.formTitle" placeholder="请输入流程标题"/>
</AFormItem> </AFormItem>
</ACol>
<ACol :span="16">
<AFormItem v-if="state.taskId" label="审批信息" name="message"> <AFormItem v-if="state.taskId" label="审批信息" name="message">
<ATextarea <ATextarea
v-model:value="state.auditForm.message" v-model:value="state.auditForm.message"
@ -52,9 +55,13 @@
allowClear allowClear
/> />
</AFormItem> </AFormItem>
<AFormItem name="isCC"> </ACol>
<ACol :span="16">
<AFormItem label=" " :colon="false" name="isCC">
<a-checkbox v-model:checked="state.isCC">是否抄送</a-checkbox> <a-checkbox v-model:checked="state.isCC">是否抄送</a-checkbox>
</AFormItem> </AFormItem>
</ACol>
<ACol :span="16">
<AFormItem v-if="state.isCC" <AFormItem v-if="state.isCC"
label="抄送给" label="抄送给"
name="userIds" name="userIds"
@ -62,9 +69,13 @@
> >
<a-select v-model:value="state.auditForm.userIds" allowClear/> <a-select v-model:value="state.auditForm.userIds" allowClear/>
</AFormItem> </AFormItem>
<AFormItem name="isAssign"> </ACol>
<ACol :span="16">
<AFormItem label=" " :colon="false" name="isAssign">
<a-checkbox v-model:checked="state.isAssign">指定下一步处理者(不设置就使用默认处理人)</a-checkbox> <a-checkbox v-model:checked="state.isAssign">指定下一步处理者(不设置就使用默认处理人)</a-checkbox>
</AFormItem> </AFormItem>
</ACol>
<ACol :span="16">
<AFormItem v-if="state.isAssign" <AFormItem v-if="state.isAssign"
label="指定" label="指定"
name="assignee" name="assignee"
@ -72,10 +83,11 @@
> >
<a-select v-model:value="state.auditForm.userIds" allowClear/> <a-select v-model:value="state.auditForm.userIds" allowClear/>
</AFormItem> </AFormItem>
</ACol>
</AForm> </AForm>
</a-card> </a-card>
</ALayoutContent> </ALayoutContent>
<footer class="workflow-form__footer"> <footer class="workflow-form__footer" :style="getWrapFormFooterStyle">
<a-button size="large" type="primary">审批</a-button> <a-button size="large" type="primary">审批</a-button>
<a-button size="large" type="primary" danger>驳回</a-button> <a-button size="large" type="primary" danger>驳回</a-button>
</footer> </footer>
@ -88,8 +100,8 @@
* Copyright © 2023-2023 <a href="https://godolphinx.org">海豚生态开源社区</a> All rights reserved. * Copyright © 2023-2023 <a href="https://godolphinx.org">海豚生态开源社区</a> All rights reserved.
* author wangxiang4 * author wangxiang4
*/ */
import { reactive, onActivated, unref, nextTick, ref } from 'vue'; import { reactive, onActivated, unref, nextTick, ref, computed, CSSProperties } from 'vue';
import { Input, LayoutContent, Tabs, Form, Row, Col } from 'ant-design-vue'; import { Input, LayoutContent, Tabs, Form, Col } from 'ant-design-vue';
import type { FormProperty } from '/@/api/platform/workflow/entity/formProperty'; import type { FormProperty } from '/@/api/platform/workflow/entity/formProperty';
import type { Workflow } from '/@/api/platform/workflow/entity/workflow'; import type { Workflow } from '/@/api/platform/workflow/entity/workflow';
import type { WorkflowButton } from '/@/api/platform/workflow/extension/entity/workflowButton'; import type { WorkflowButton } from '/@/api/platform/workflow/extension/entity/workflowButton';
@ -105,7 +117,8 @@
import { getProcessStartEventFormData, getTaskFormData } from '/@/api/platform/workflow/controller/form'; import { getProcessStartEventFormData, getTaskFormData } from '/@/api/platform/workflow/controller/form';
import { findByDefIdAndTaskId } from '/@/api/platform/workflow/extension/controller/activityExtensionData'; import { findByDefIdAndTaskId } from '/@/api/platform/workflow/extension/controller/activityExtensionData';
import { useDesign } from '/@/hooks/web/useDesign'; import { useDesign } from '/@/hooks/web/useDesign';
import { usePageContext } from '/@/hooks/component/usePageContext'; import { useAppInject } from '/@/hooks/web/useAppInject';
import { useMenuSetting } from '/@/hooks/setting/useMenuSetting';
/** 类型规范统一声明定义区域 */ /** 类型规范统一声明定义区域 */
interface WindowState { interface WindowState {
@ -166,12 +179,12 @@
const ATabPane = Tabs.TabPane; const ATabPane = Tabs.TabPane;
const AForm = Form; const AForm = Form;
const AFormItem = Form.Item; const AFormItem = Form.Item;
const ARow = Row;
const ACol = Col; const ACol = Col;
const ATextarea = Input.TextArea; const ATextarea = Input.TextArea;
const { prefixCls } = useDesign('task-form'); const { prefixCls } = useDesign('task-form');
const { contentHeight } = usePageContext(); const { getIsMobile } = useAppInject();
const { getCalcContentWidth } = useMenuSetting();
const state = reactive<WindowState>({ const state = reactive<WindowState>({
formTitle: '', formTitle: '',
formKey: '', formKey: '',
@ -528,15 +541,17 @@
} }
} }
const getWrapFormFooterStyle = computed((): CSSProperties | Recordable => {
return {
width: unref(getIsMobile) ? '100%' : unref(getCalcContentWidth)
};
});
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@prefix-cls: ~'@{namespace}-task-form'; @prefix-cls: ~'@{namespace}-task-form';
.@{prefix-cls} { .@{prefix-cls} {
display: flex;
width: 100%;
min-height: 100%;
flex-direction: column;
.workflow-form { .workflow-form {
&__footer{ &__footer{
height: 66px; height: 66px;
@ -550,7 +565,16 @@
box-shadow: 0 -3px 5px 0 rgba(0,0,0,.12); box-shadow: 0 -3px 5px 0 rgba(0,0,0,.12);
-webkit-transition: inline-block 0.3s, left 0.3s, width 0.3s, margin-left 0.3s, font-size 0.3s; -webkit-transition: inline-block 0.3s, left 0.3s, width 0.3s, margin-left 0.3s, font-size 0.3s;
transition: inline-block 0.3s, left 0.3s, width 0.3s, margin-left 0.3s, font-size 0.3s; transition: inline-block 0.3s, left 0.3s, width 0.3s, margin-left 0.3s, font-size 0.3s;
position: fixed;
bottom: 0;
z-index: @page-footer-z-index;
} }
} }
} }
.ant-form {
.ant-form-item {
margin-bottom: 15px;
}
}
</style> </style>

Loading…
Cancel
Save