添加项目文件。
This commit is contained in:
51
apihost/Tnb.API.Entry/wwwroot/Template/PureForm/index.vue.vm
Normal file
51
apihost/Tnb.API.Entry/wwwroot/Template/PureForm/index.vue.vm
Normal 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>
|
||||
Reference in New Issue
Block a user