Files
2023-03-13 15:00:34 +08:00

47 lines
1.4 KiB
Plaintext

<template>
<view class="jnpf-wrap jnpf-wrap-form">
<FlowBox ref="FlowBox"></FlowBox>
</view>
</template>
<script>
import FlowBox from '@@/pages/workFlow/flowBefore/index.vue'
import {getFormById} from '@@/api/workFlow/workFlowForm'
export default {
components: {
FlowBox
},
data() {
return {
menuId: '',
enCode: '@(Model.EnCode)',
formId: '@(Model.FormId)',
flowId: '',
}
},
onLoad(e) {
this.menuId = e.menuId
this.getFormById()
},
methods: {
getFormById() {
getFormById(this.formId).then(res => {
this.flowId = res.data && res.data.id
this.enCode = res.data && res.data.enCode
this.flow()
})
},
flow() {
const config = {
enCode: this.enCode,
flowId: this.flowId,
menuId: this.menuId,
formType: 1,
opType: '-1',
}
if (!this.flowId) return this.$message.error("该功能未配置流程不可用!")
this.$refs.FlowBox.handleCodeGeneration(config)
},
},
}
</script>