feat: 优化操作按钮组件命名;操作按钮固定在整个页面下方逻辑完成

pull/537/MERGE
GoldenZqqq 2024-09-02 09:35:37 +08:00
parent 632dea08c0
commit fb68dc2bfa
3 changed files with 15 additions and 15 deletions

View File

@ -36,7 +36,7 @@ provide('reload', reload)
<template> <template>
<section <section
:class="[ :class="[
'p-[var(--app-content-padding)] w-full bg-[var(--app-content-bg-color)] dark:bg-[var(--el-bg-color)]', 'p-[var(--app-content-padding)] w-full bg-[var(--app-content-bg-color)] dark:bg-[var(--el-bg-color)] section-container',
{ {
'!min-h-[calc(100vh-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))] pb-0': '!min-h-[calc(100vh-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))] pb-0':
footer footer

View File

@ -1,8 +1,7 @@
<template> <template>
<el-affix target=".formCol" position="bottom" class="h-50px" v-if="runningTask?.id"> <Teleport v-if="runningTask?.id" to=".section-container">
<el-divider class="!mb-8px !mt-0" />
<div <div
class="pl-50px text-14px flex items-center color-#32373c dark:color-#fff font-bold btn-container" class="h-50px position-fixed bottom-10 pl-50px text-14px flex items-center color-#32373c dark:color-#fff font-bold btn-container"
> >
<el-popover :visible="passVisible" placement="top-end" :width="500" trigger="click"> <el-popover :visible="passVisible" placement="top-end" :width="500" trigger="click">
<template #reference> <template #reference>
@ -126,7 +125,7 @@
<div @click="handleSign"> <Icon :size="14" icon="ep:plus" />&nbsp;加签 </div> <div @click="handleSign"> <Icon :size="14" icon="ep:plus" />&nbsp;加签 </div>
<div @click="handleBack"> <Icon :size="14" icon="fa:mail-reply" />&nbsp;退回 </div> <div @click="handleBack"> <Icon :size="14" icon="fa:mail-reply" />&nbsp;退回 </div>
</div> </div>
</el-affix> </Teleport>
<!-- 弹窗转派审批人 --> <!-- 弹窗转派审批人 -->
<TaskTransferForm ref="taskTransferFormRef" @success="getDetail" /> <TaskTransferForm ref="taskTransferFormRef" @success="getDetail" />
<!-- 弹窗回退节点 --> <!-- 弹窗回退节点 -->

View File

@ -46,14 +46,6 @@
<BusinessFormComponent :id="processInstance.businessKey" /> <BusinessFormComponent :id="processInstance.businessKey" />
</div> </div>
</div> </div>
<!-- 操作栏按钮 -->
<!-- TODO @GoldenZqqqProcessInstanceOperationButton操作按钮不叫 Container 会好点点和后端也更统一 -->
<ProcessInstanceBtnConatiner
ref="processInstanceBtnRef"
:processInstance="processInstance"
:userOptions="userOptions"
@success="getDetail"
/>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<!-- TODO @GoldenZqqq后续这个也拆个小组件出来 --> <!-- TODO @GoldenZqqq后续这个也拆个小组件出来 -->
@ -126,6 +118,14 @@
<!-- 流转评论 --> <!-- 流转评论 -->
<el-tab-pane label="流转评论"> 流转评论 </el-tab-pane> <el-tab-pane label="流转评论"> 流转评论 </el-tab-pane>
</el-tabs> </el-tabs>
<!-- 操作栏按钮 -->
<ProcessInstanceOperationButton
ref="operationButtonRef"
:processInstance="processInstance"
:userOptions="userOptions"
@success="getDetail"
/>
</ContentWrap> </ContentWrap>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -138,6 +138,7 @@ import * as ProcessInstanceApi from '@/api/bpm/processInstance'
import * as TaskApi from '@/api/bpm/task' import * as TaskApi from '@/api/bpm/task'
import ProcessInstanceBpmnViewer from './ProcessInstanceBpmnViewer.vue' import ProcessInstanceBpmnViewer from './ProcessInstanceBpmnViewer.vue'
import ProcessInstanceTaskList from './ProcessInstanceTaskList.vue' import ProcessInstanceTaskList from './ProcessInstanceTaskList.vue'
import ProcessInstanceOperationButton from './ProcessInstanceOperationButton.vue'
import { registerComponent } from '@/utils/routerHelper' import { registerComponent } from '@/utils/routerHelper'
import * as UserApi from '@/api/system/user' import * as UserApi from '@/api/system/user'
import audit1 from '@/assets/svgs/bpm/audit1.svg' import audit1 from '@/assets/svgs/bpm/audit1.svg'
@ -151,7 +152,7 @@ const message = useMessage() // 消息弹窗
const id = query.id as unknown as string // const id = query.id as unknown as string //
const processInstanceLoading = ref(false) // const processInstanceLoading = ref(false) //
const processInstance = ref<any>({}) // const processInstance = ref<any>({}) //
const processInstanceBtnRef = ref() const operationButtonRef = ref()
const bpmnXml = ref('') // BPMN XML const bpmnXml = ref('') // BPMN XML
const tasksLoad = ref(true) // const tasksLoad = ref(true) //
const tasks = ref<any[]>([]) // const tasks = ref<any[]>([]) //
@ -244,7 +245,7 @@ const getTaskList = async () => {
}) })
// //
processInstanceBtnRef.value.loadRunningTask(tasks.value) operationButtonRef.value?.loadRunningTask(tasks.value)
} finally { } finally {
tasksLoad.value = false tasksLoad.value = false
} }