edrp.cn的Blog

学习,需要交流,欢迎大家和我共同来学习C#,ASP.NET,MS SQL Server开发Web项目,欢迎大家和我交流

博客园 首页 新随笔 联系 订阅 管理

一:增加对应的工作流文件,详细,表单和
views/work/process
aacrmbiz(增加自己的leave及文件)
detail.vue
form.vue
handle.vue

二:增加API
api/work/process.js文件中增加如下内容:
// =====================业务申请流程===========================
///blade-flow/biz/process后端Controller地址
export const bizleaveProcess = (data) => {
return request({
url: '/api/blade-flow/biz/process/start-process',
method: 'post',
data
})
}

export const bizleaveDetail = (businessId) => {
return request({
url: '/api/blade-flow/biz/process/detail',
method: 'get',
params: {
businessId
}
})
}

三:在步骤一中的三个文件中设置对应的名称
在form.vue中import一下
<script>
import {bizleaveProcess} from "@/api/work/process";
方法中设置一下(methods):
methods: {
handleSubmit() {
const params = {
processDefinitionId: this.$route.params.processDefinitionId,
...this.form,
};
bizleaveProcess(params).then(resp => {

四:在router/views/index.js中增加:
{
path: '/work/process/aacrmbiz',
component: Layout,
redirect: '/work/process/aacrmbiz/form',
children: [{
path: 'form/:processDefinitionId',
name: '业务申请流程',
meta: {
i18n: 'work'
},
component: () =>
import( /* webpackChunkName: "views" */ '@/views/work/process/aacrmbiz/form')
}, {
path: 'handle/:taskId/:processInstanceId/:businessId',
name: '处理业务申请流程',
meta: {
i18n: 'work'
},
component: () =>
import( /* webpackChunkName: "views" */ '@/views/work/process/aacrmbiz/handle')
}, {
path: 'detail/:processInstanceId/:businessId',
name: '业务申请流程详情',
meta: {
i18n: 'work'
},
component: () =>
import( /* webpackChunkName: "views" */ '@/views/work/process/aacrmbiz/detail')
}]
}

五:建立字典时要注意,字典备注的内容一定要与前端的文件夹名(生成VUE页面的)一致aacrmbiz

posted on 2019-11-26 16:34  edrp.cn  阅读(184)  评论(0编辑  收藏  举报