Vue3 重构:流程实例的创建的目录调整

This commit is contained in:
YunaiV 2023-03-28 07:51:46 +08:00
parent 7587acedb0
commit ddd6bbbee1
3 changed files with 9 additions and 33 deletions

View File

@ -37,31 +37,20 @@
/> />
</el-col> </el-col>
</el-card> </el-card>
<el-card class="box-card"> <!-- 流程图预览 -->
<div class="clearfix"> <ProcessInstanceBpmnViewer :bpmn-xml="bpmnXML" />
<span class="el-icon-picture-outline">流程图</span>
</div>
<!-- TODO 芋艿待完成 -->
<my-process-viewer
key="designer"
v-model="bpmnXML"
:value="bpmnXML"
v-bind="bpmnControlForm"
:prefix="bpmnControlForm.prefix"
/>
</el-card>
</div> </div>
</ContentWrap> </ContentWrap>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { DICT_TYPE } from '@/utils/dict'
// import // import
import { allSchemas } from './process.create' import { allSchemas } from './process.create'
import * as DefinitionApi from '@/api/bpm/definition' import * as DefinitionApi from '@/api/bpm/definition'
import * as ProcessInstanceApi from '@/api/bpm/processInstance' import * as ProcessInstanceApi from '@/api/bpm/processInstance'
import { setConfAndFields2 } from '@/utils/formCreate' import { setConfAndFields2 } from '@/utils/formCreate'
import type { ApiAttrs } from '@form-create/element-ui/types/config' import type { ApiAttrs } from '@form-create/element-ui/types/config'
import { DICT_TYPE } from '@/utils/dict' import ProcessInstanceBpmnViewer from '../detail/ProcessInstanceBpmnViewer.vue'
const router = useRouter() // const router = useRouter() //
const message = useMessage() // const message = useMessage() //
@ -126,7 +115,6 @@ const submitForm = async (formData) => {
}) })
// //
message.success('发起流程成功') message.success('发起流程成功')
// this.$tab.closeOpenPage();
router.go(-1) router.go(-1)
} finally { } finally {
fApi.value.btn.loading(false) fApi.value.btn.loading(false)
@ -137,18 +125,4 @@ const submitForm = async (formData) => {
// // BPMN // // BPMN
const bpmnXML = ref(null) const bpmnXML = ref(null)
const bpmnControlForm = ref({
prefix: 'flowable'
})
</script> </script>
<style lang="scss">
.my-process-designer {
height: calc(100vh - 200px);
}
.box-card {
width: 100%;
margin-bottom: 20px;
}
</style>

View File

@ -40,9 +40,11 @@ const activityList = ref([]) // 任务列表
/** 初始化 */ /** 初始化 */
onMounted(async () => { onMounted(async () => {
if (props.id) {
activityList.value = await ActivityApi.getActivityList({ activityList.value = await ActivityApi.getActivityList({
processInstanceId: props.id processInstanceId: props.id
}) })
}
}) })
</script> </script>
<style> <style>