workflowMenu

This commit is contained in:
shijing 2021-09-24 15:32:30 +08:00
parent 142bd0a8d0
commit 767c20bc90
2 changed files with 163 additions and 59 deletions

View File

@ -257,42 +257,34 @@ export const asyncRoutes = [
}
]
},
{
path: '/workflow',
component: Layout,
redirect: '/workflow/index',
name: 'workflow',
meta: { title: '工作流管理', icon: 'example', perms: ['workflow_set'] },
children: [
{
path: 'index',
name: 'index',
component: () => import('@/views/workflow/index'),
meta: { title: '工作流配置', icon: 'example', perms: ['workflow_manage'] }
},
{
path: '/workflow',
component: Layout,
redirect: '/workflow/index',
name: 'workflow',
meta: { title: '工作流', icon: 'example', perms: ['workflow_set'] },
children: [
{
path: 'configuration',
name: 'configuration',
component: () => import('@/views/workflow/configuration'),
meta: { title: '人员信息详情', icon: 'example', perms: ['configuration_manage'] },
hidden: true
path: 'index',
name: 'index',
component: () => import('@/views/workflow/index'),
meta: { title: '工作流配置', icon: 'example', perms: ['workflow_manage'] }
},
{
path: 'ticket',
name: 'ticket',
component: () => import('@/views/workflow/ticket'),
meta: { title: '工单列表', icon: 'example', perms: ['ticket_manage'] },
hidden: true
},{
path: 'test',
name: 'test',
component: () => import('@/views/workflow/test'),
meta: { title: '工单', icon: 'example', perms: ['test_manage'] },
meta: { title: '工单管理', icon: 'example', perms: ['workflow_manage'] },
},
{
path: 'configuration',
name: 'configuration',
component: () => import('@/views/workflow/configuration'),
meta: { title: '人员信息详情', icon: 'example', perms: ['workflow_manage'] },
hidden: true
},
]
},
]
},
{
path: '/system',
component: Layout,

View File

@ -1,36 +1,130 @@
<template>
<div class="app-container">
<el-card style="margin-top: 10px">
<el-table v-loading="listLoading" :data="tickets" border fit stripe highlight-current-row max-height="600">
<el-table-column type="index" width="50" />
<el-table-column label="工单标题">
<template slot-scope="scope">{{ scope.row.title }}</template>
</el-table-column>
<el-table-column label="当前状态">
<template slot-scope="scope">
<span v-if="scope.row.act_state===1">已提交</span>
<span v-else-if="scope.row.act_state===4">已完成</span>
<span v-else>审批中</span>
</template>
</el-table-column>
<el-table-column width="180" label="创建时间">
<template slot-scope="scope">{{ scope.row.create_time }}</template>
</el-table-column>
<el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
<el-link v-if="stateSteps==scope.row.act_state" type="danger" @click="handlePicture(scope)">查看流程图</el-link>
<el-link v-else type="danger" @click="handleDetail(scope)">工单详情</el-link>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="pageForm.page"
:limit.sync="pageForm.page_size"
@pagination="getList"
/>
</el-card>
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
<el-tab-pane label="待处理" name="first">
<el-table :data="tickets" border fit stripe style="width: 100%" >
<el-table-column label="工单标题" min-width="100" prop="title">
</el-table-column>
<el-table-column label="当前状态" min-width="100">
<template slot-scope="scope">
<span v-if="scope.row.act_state===1">已提交</span>
<span v-else-if="scope.row.act_state===4">已完成</span>
<span v-else>审批中</span>
</template>
</el-table-column>
<el-table-column label="类型" min-width="100">
<template slot-scope="scope">{{ scope.row.workflow_.name }}</template>
</el-table-column>
<el-table-column label="创建时间" min-width="100" prop="create_time">
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-link v-if="stateSteps==scope.row.act_state" type="danger" @click="handlePicture(scope)">查看流程图</el-link>
<el-link v-else type="danger" @click="handleDetail(scope)">处理</el-link>
<!--<el-link type="danger" @click="handleDetail(scope)">处理</el-link>-->
</template>
</el-table-column>
</el-table>
<pagination
:total="total"
:page.sync="pageForm.page"
:limit.sync="pageForm.page_size"
@pagination="getList"
/>
</el-tab-pane>
<el-tab-pane label="已处理" name="second">
<el-table :data="tickets" border fit stripe style="width: 100%" >
<el-table-column label="工单标题" min-width="100" prop="title">
</el-table-column>
<el-table-column label="当前状态" min-width="100">
<template slot-scope="scope">
<span v-if="scope.row.act_state===1">已提交</span>
<span v-else-if="scope.row.act_state===4">已完成</span>
<span v-else>审批中</span>
</template>
</el-table-column>
<el-table-column label="类型" min-width="100">
<template slot-scope="scope">{{ scope.row.workflow_.name }}</template>
</el-table-column>
<el-table-column label="创建时间" min-width="100" prop="create_time">
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-link v-if="stateSteps==scope.row.act_state" type="danger" @click="handlePicture(scope)">查看流程图</el-link>
<el-link v-else type="danger" @click="handleDetail(scope)">处理</el-link>
</template>
</el-table-column>
</el-table>
<pagination
:total="total"
:page.sync="pageForm.page"
:limit.sync="pageForm.page_size"
@pagination="getList"
/>
</el-tab-pane>
<el-tab-pane label="已发起" name="third">
<!--<el-button type="primary" icon="el-icon-plus" @click="handleusedstepCreate"-->
<!--&gt;新增</el-button>-->
<el-table :data="tickets" border fit stripe style="width: 100%" >
<el-table-column label="工单标题" min-width="100" prop="title">
</el-table-column>
<el-table-column label="当前状态" min-width="100">
<template slot-scope="scope">
<span v-if="scope.row.act_state===1">已提交</span>
<span v-else-if="scope.row.act_state===4">已完成</span>
<span v-else>审批中</span>
</template>
</el-table-column>
<el-table-column label="类型" min-width="100">
<template slot-scope="scope">{{ scope.row.workflow_.name }}</template>
</el-table-column>
<el-table-column label="创建时间" min-width="100" prop="create_time">
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-link type="danger" @click="handleDetail(scope)">处理</el-link>
</template>
</el-table-column>
</el-table>
<pagination
:total="total"
:page.sync="pageForm.page"
:limit.sync="pageForm.page_size"
@pagination="getList"
/>
</el-tab-pane>
<el-tab-pane label="抄送我" name="fourth">
<el-table :data="tickets" border fit stripe style="width: 100%" >
<el-table-column label="工单标题" min-width="100" prop="title">
</el-table-column>
<el-table-column label="当前状态" min-width="100">
<template slot-scope="scope">
<span v-if="scope.row.act_state===1">已提交</span>
<span v-else-if="scope.row.act_state===4">已完成</span>
<span v-else>审批中</span>
</template>
</el-table-column>
<el-table-column label="类型" min-width="100">
<template slot-scope="scope">{{ scope.row.workflow_.name }}</template>
</el-table-column>
<el-table-column label="创建时间" min-width="100" prop="create_time">
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-link v-if="stateSteps==scope.row.act_state" type="danger" @click="handlePicture(scope)">查看流程图</el-link>
<el-link v-else type="danger" @click="handleDetail(scope)">处理</el-link>
<!--<el-link type="danger" @click="handleDetail(scope)">处理</el-link>-->
</template>
</el-table-column>
</el-table>
<pagination
:total="total"
:page.sync="pageForm.page"
:limit.sync="pageForm.page_size"
@pagination="getList"
/>
</el-tab-pane>
</el-tabs>
<div class="svgMark" v-if="dialogVisible" @click="closeMark">
<div class="svgWrapper">
<div class="svgItem">工单流程图<i class="el-dialog__close el-icon el-icon-close" @click="closeMark"></i></div>
@ -96,6 +190,7 @@
},
workflow:0,
stateSteps:0,
activeName:'first',
keyword:'',
tickets:[],
ticketDetail:{},
@ -152,11 +247,28 @@
this.listLoading = true;
getTickets( this.pageForm).then((res)=>{
if(res.data.results){
this.total = res.data.count;
this.tickets = res.data.results;
this.listLoading = false;
}
})
},
handleClick(tab, event) {
console.log(tab, event);
debugger;
//pagepageSizetotaltickets都要发生变化
let paneName = tab.paneName;
this.activeName = paneName;
if(paneName=='first'){
}else if(paneName=='second'){
}else if(paneName=='third'){
}else if(paneName=='fourth'){
}
},
getStates(){
getWfStateList(this.workflow).then((response) => {
if (response.data) {