初始代码
This commit is contained in:
60
TemplateCodeVue3/TemplateCode5/app/index.vue.vm
Normal file
60
TemplateCodeVue3/TemplateCode5/app/index.vue.vm
Normal file
@@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<view class="zero-wrap zero-wrap-form">
|
||||
<FlowBox v-if="flowVisible" ref="FlowBox" ></FlowBox>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FlowBox from '@/pages/workFlow/flowBefore/index.vue'
|
||||
import {
|
||||
getFlowStartFormId
|
||||
} from "@/api/workFlow/flowEngine";
|
||||
export default {
|
||||
components: {
|
||||
FlowBox,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
flowId : '',//请在此处填写流程id
|
||||
flowVisible:false,
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.getFlowId()
|
||||
},
|
||||
methods: {
|
||||
getFlowId(){
|
||||
if(!this.flowId)return this.$u.toast("流程模板的flowId未填写")
|
||||
getFlowStartFormId(this.flowId).then(res=>{
|
||||
this.flow()
|
||||
}).catch(()=>{
|
||||
})
|
||||
},
|
||||
flow() {
|
||||
const config = {
|
||||
flowId: this.flowId,
|
||||
opType: '-1',
|
||||
hideSaveBtn: true,
|
||||
}
|
||||
if (!this.flowId) return this.$u.toast("该功能未配置流程不可用!")
|
||||
this.flowVisible = true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.FlowBox.handleCodeGeneration(config)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #f0f2f6;
|
||||
height: 100%;
|
||||
/* #ifdef MP-ALIPAY */
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
/* #endif */
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user