添加项目文件。

This commit is contained in:
2023-03-13 15:00:34 +08:00
parent 42bf06ca3e
commit 1d73df3235
1205 changed files with 185078 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
<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>

View File

@@ -0,0 +1,51 @@
@*本模板只适用于纯表单带流程*@
<template>
<div class="JNPF-common-layout">
<FlowBox ref="FlowBox" @@close="closeFlow" />
</div>
</template>
<script>
import FlowBox from '@@/views/workFlow/components/FlowBox'
import { getFormById } from '@@/api/workFlow/FormDesign'
export default {
components: { FlowBox },
data() {
return {
formFlowId: ""
}
},
created() {
this.getFormById();
},
methods: {
getFormById() {
getFormById("@(Model.FormId)").then(res => {
const flowId = res.data && res.data.id
this.formFlowId = flowId;
this.init(flowId)
})
},
init(flowId) {
// 纯流程带流程
let data = {
id: '',//写死
enCode: '',
flowId: flowId,
formType: 1, //写死
type: 1, //写死
opType: '-1', //写死
modelId: '@(Model.FormId)', //模板ID
fromForm: 1, //写死
hideCancelBtn: true //写死
}
if (!data.flowId) return this.$message.error("该功能未配置流程不可用!")
this.$nextTick(() => {
this.$refs.FlowBox.init(data)
})
},
closeFlow(isRefresh) {
if (isRefresh) this.init(this.formFlowId)
},
}
}
</script>