Skip to content

Commit

Permalink
工作流
Browse files Browse the repository at this point in the history
  • Loading branch information
forezp committed Sep 4, 2019
1 parent 010ae34 commit 7b351fc
Show file tree
Hide file tree
Showing 15 changed files with 1,252 additions and 26 deletions.
25 changes: 25 additions & 0 deletions matrix-web-admin/src/api/workflow/task.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import request from '@/utils/request'

export function todoTaskList(params) {
return request({
url: '/task/todo',
method: 'get',
params
})
}

export function myTaskList(params) {
return request({
url: '/task/starter',
method: 'get',
params
})
}

export function finishTaskList(params) {
return request({
url: '/task/finish',
method: 'get',
params
})
}
5 changes: 4 additions & 1 deletion matrix-web-admin/src/lang/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ export default {
categoryMgr: '分类管理',
processMgr: '流程管理',
newProcessMgr: '新建流程',
vactionApplyMgr: '休假申请'
vactionApplyMgr: '休假申请',
myprocessMgr: '我的申请',
todpprocessMgr: '我的代办',
finishprocessMgr: '我的已办'
},
navbar: {
logOut: '退出登录',
Expand Down
18 changes: 18 additions & 0 deletions matrix-web-admin/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,24 @@ export const asyncRouterMap = [
component: () => import('@/views/workflow/biz/vacation/index'),
hidden: true,
meta: { title: 'vactionApplyMgr' }
},
{
path: 'myprocess',
name: 'myprocess',
component: () => import('@/views/workflow/myprocess/index'),
meta: { title: 'myprocessMgr' }
},
{
path: 'todoprocess',
name: 'todoprocess',
component: () => import('@/views/workflow/todoprocess/index'),
meta: { title: 'todpprocessMgr' }
},
{
path: 'finishprocess',
name: 'finishprocess',
component: () => import('@/views/workflow/finishprocess/index'),
meta: { title: 'finishprocessMgr' }
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default {
education: [],
form: {
name: '',
userId: '',
reason: '',
remarks: '',
nextUserId: '',
Expand Down Expand Up @@ -90,6 +91,7 @@ export default {
this.form.step = step
this.form.startTime = startTime
this.form.endTime = endTime
this.form.userId = this.currentUser.userId
if (step) {
console.info(step)
} else {
Expand All @@ -98,6 +100,7 @@ export default {
message: '提交成功',
type: 'success'
})
this.$router.back()
})
}
},
Expand Down
129 changes: 129 additions & 0 deletions matrix-web-admin/src/views/workflow/finishprocess/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<template>
<div class="app-container">
<div class="block">
<el-row :gutter="20">
<el-col :span="6">
<el-input v-model="listQuery.category" placeholder="请输入分类名称"></el-input>
</el-col>
<el-col :span="6">
<el-button type="success" icon="el-icon-search" @click.native="search">{{ $t('button.search') }}</el-button>
<el-button type="primary" icon="el-icon-refresh" @click.native="reset">{{ $t('button.reset') }}</el-button>
</el-col>
</el-row>
<br>
<el-row>
<el-col :span="24">
<el-button type="primary" icon="el-icon-edit" @click.native="edit">{{ $t('button.edit') }}</el-button>
<el-button type="primary" icon="el-icon-edit" @click.native="transferModel"> 转模型 </el-button>
<el-button type="danger" icon="el-icon-edit" @click.native="remove">{{ $t('button.delete') }}</el-button>
</el-col>
</el-row>
</div>

<el-table :data="list" v-loading="listLoading" element-loading-text="Loading" border fit highlight-current-row
@current-change="handleCurrentChange">

<el-table-column label="任务ID">
<template slot-scope="scope">
{{scope.row.taskId}}
</template>
</el-table-column>
<el-table-column label="名称">
<template slot-scope="scope">
{{scope.row.title}}
</template>
</el-table-column>
<el-table-column label="分类">
<template slot-scope="scope">
{{scope.row.pdName}}
</template>
</el-table-column>
<el-table-column label="流程key">
<template slot-scope="scope">
{{scope.row.nodeKey}}
</template>
</el-table-column>
<el-table-column label="版本">
<template slot-scope="scope">
{{scope.row.version}}
</template>
</el-table-column>
<el-table-column label="流程定义ID">
<template slot-scope="scope">
{{scope.row.processDefKey}}
</template>
</el-table-column>
<el-table-column label="状态">
<template slot-scope="scope">
{{scope.row.status}}
</template>
</el-table-column>

<el-table-column label="发布时间">
<template slot-scope="scope">
{{scope.row.time}}
</template>
</el-table-column>

<el-table-column label="流程ID">
<template slot-scope="scope">
{{scope.row.processInstanceId}}
</template>
</el-table-column>


</el-table>

<el-dialog
:title="formTitle"
:visible.sync="formVisible"
width="70%">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="12">
<el-form-item label="流程分类">
<el-input
placeholder="请选择流程分类"
v-model="form.category"
@click.native="showTree = !showTree"
>
</el-input>
<el-tree v-if="showTree"
empty-text="暂无数据"
:expand-on-click-node="false"
:data="categoryData"
:props="defaultProps"
@node-click="handleNodeClick"
class="input-tree">
</el-tree>
</el-form-item>
</el-col>
</el-row>
<el-form-item>
<el-button type="primary" @click="updateCategoryVue">{{ $t('button.submit') }}</el-button>
<el-button @click.native="formVisible = false">{{ $t('button.cancel') }}</el-button>
</el-form-item>
</el-form>
</el-dialog>

<el-pagination
background
layout="total, sizes, prev, pager, next, jumper"
:page-sizes="[10, 20, 50, 100,500]"
:page-size="listQuery.pageSize"
:total="totalCount"
@size-change="changeSize"
@current-change="fetchPage"
@prev-click="fetchPrev"
@next-click="fetchNext">
</el-pagination>
</div>
</template>

<script src="./process.js"></script>


<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/common.scss";
</style>

Loading

0 comments on commit 7b351fc

Please sign in to comment.