fix -- 重构前端任务模块,改为work模块。
This commit is contained in:
@@ -82,40 +82,33 @@ export const constantRoutes = [
|
||||
{
|
||||
path: 'designer',
|
||||
component: () => import('@/views/workflow/definition/designer'),
|
||||
name: 'WorkflowDesigner',
|
||||
name: 'Designer',
|
||||
meta: { title: '流程设计', icon: '' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/process',
|
||||
path: '/work',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: 'start',
|
||||
component: () => import('@/views/workflow/process/start'),
|
||||
name: 'StartProcess',
|
||||
component: () => import('@/views/workflow/work/start'),
|
||||
name: 'start',
|
||||
meta: { title: '发起流程', icon: '' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/task',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
},
|
||||
{
|
||||
path: 'process/index',
|
||||
component: () => import('@/views/workflow/task/process/index'),
|
||||
name: 'Record',
|
||||
path: 'own',
|
||||
component: () => import('@/views/workflow/work/own'),
|
||||
name: 'own',
|
||||
meta: { title: '我的流程', icon: '' }
|
||||
},
|
||||
{
|
||||
path: 'record/index',
|
||||
component: () => import('@/views/workflow/task/record/index'),
|
||||
name: 'Record',
|
||||
meta: { title: '流程处理', icon: '' }
|
||||
path: 'detail',
|
||||
component: () => import('@/views/workflow/work/detail'),
|
||||
name: 'Detail',
|
||||
meta: { title: '流程详情', icon: '' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -15,7 +15,7 @@ import { readXml, saveXml } from "@/api/workflow/definition";
|
||||
import ProcessDesigner from '@/components/ProcessDesigner';
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
name: 'Designer',
|
||||
components: { ProcessDesigner },
|
||||
data () {
|
||||
return {
|
||||
|
||||
@@ -82,56 +82,56 @@
|
||||
|
||||
<!--审批正常流程-->
|
||||
<el-dialog :title="completeTitle" :visible.sync="completeOpen" width="60%" append-to-body>
|
||||
<!-- <el-row :gutter="20">-->
|
||||
<!-- <!–部门数据–>-->
|
||||
<!-- <el-col :span="4" :xs="24">-->
|
||||
<!-- <h6>部门列表</h6>-->
|
||||
<!-- <div class="head-container">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="deptName"-->
|
||||
<!-- placeholder="请输入部门名称"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- prefix-icon="el-icon-search"-->
|
||||
<!-- style="margin-bottom: 20px"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="head-container">-->
|
||||
<!-- <el-tree-->
|
||||
<!-- :data="deptOptions"-->
|
||||
<!-- :props="defaultProps"-->
|
||||
<!-- :expand-on-click-node="false"-->
|
||||
<!-- :filter-node-method="filterNode"-->
|
||||
<!-- ref="tree"-->
|
||||
<!-- default-expand-all-->
|
||||
<!-- @node-click="handleNodeClick"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12" :xs="24">-->
|
||||
<!-- <h6>待选人员</h6>-->
|
||||
<!-- <el-table-->
|
||||
<!-- ref="singleTable"-->
|
||||
<!-- :data="userList"-->
|
||||
<!-- border-->
|
||||
<!-- style="width: 100%"-->
|
||||
<!-- @selection-change="handleSelectionChange">-->
|
||||
<!-- <el-table-column type="selection" width="50" align="center" />-->
|
||||
<!-- <el-table-column label="用户名" align="center" prop="nickName" />-->
|
||||
<!-- <el-table-column label="部门" align="center" prop="dept.deptName" />-->
|
||||
<!-- </el-table>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="8" :xs="24">-->
|
||||
<!-- <h6>已选人员</h6>-->
|
||||
<!-- <el-tag-->
|
||||
<!-- v-for="tag in userData"-->
|
||||
<!-- :key="tag.nickName"-->
|
||||
<!-- closable-->
|
||||
<!-- @close="handleClose(tag)">-->
|
||||
<!-- {{tag.nickName}} {{tag.dept.deptName}}-->
|
||||
<!-- </el-tag>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- <el-row :gutter="20">-->
|
||||
<!-- <!–部门数据–>-->
|
||||
<!-- <el-col :span="4" :xs="24">-->
|
||||
<!-- <h6>部门列表</h6>-->
|
||||
<!-- <div class="head-container">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="deptName"-->
|
||||
<!-- placeholder="请输入部门名称"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- prefix-icon="el-icon-search"-->
|
||||
<!-- style="margin-bottom: 20px"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="head-container">-->
|
||||
<!-- <el-tree-->
|
||||
<!-- :data="deptOptions"-->
|
||||
<!-- :props="defaultProps"-->
|
||||
<!-- :expand-on-click-node="false"-->
|
||||
<!-- :filter-node-method="filterNode"-->
|
||||
<!-- ref="tree"-->
|
||||
<!-- default-expand-all-->
|
||||
<!-- @node-click="handleNodeClick"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12" :xs="24">-->
|
||||
<!-- <h6>待选人员</h6>-->
|
||||
<!-- <el-table-->
|
||||
<!-- ref="singleTable"-->
|
||||
<!-- :data="userList"-->
|
||||
<!-- border-->
|
||||
<!-- style="width: 100%"-->
|
||||
<!-- @selection-change="handleSelectionChange">-->
|
||||
<!-- <el-table-column type="selection" width="50" align="center" />-->
|
||||
<!-- <el-table-column label="用户名" align="center" prop="nickName" />-->
|
||||
<!-- <el-table-column label="部门" align="center" prop="dept.deptName" />-->
|
||||
<!-- </el-table>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="8" :xs="24">-->
|
||||
<!-- <h6>已选人员</h6>-->
|
||||
<!-- <el-tag-->
|
||||
<!-- v-for="tag in userData"-->
|
||||
<!-- :key="tag.nickName"-->
|
||||
<!-- closable-->
|
||||
<!-- @close="handleClose(tag)">-->
|
||||
<!-- {{tag.nickName}} {{tag.dept.deptName}}-->
|
||||
<!-- </el-tag>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-input style="width: 50%;margin-right: 34%" type="textarea" v-model="taskForm.comment" placeholder="请输入处理意见"/>
|
||||
<el-button @click="completeOpen = false">取 消</el-button>
|
||||
@@ -141,21 +141,21 @@
|
||||
|
||||
<!--退回流程-->
|
||||
<el-dialog :title="returnTitle" :visible.sync="returnOpen" width="40%" append-to-body>
|
||||
<el-form ref="taskForm" :model="taskForm" label-width="80px" >
|
||||
<el-form-item label="退回节点" prop="targetKey">
|
||||
<el-radio-group v-model="taskForm.targetKey">
|
||||
<el-radio-button
|
||||
v-for="item in returnTaskList"
|
||||
:key="item.id"
|
||||
:label="item.id"
|
||||
>{{item.name}}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="退回意见" prop="comment" :rules="[{ required: true, message: '请输入意见', trigger: 'blur' }]">
|
||||
<el-input style="width: 50%" type="textarea" v-model="taskForm.comment" placeholder="请输入意见"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-form ref="taskForm" :model="taskForm" label-width="80px" >
|
||||
<el-form-item label="退回节点" prop="targetKey">
|
||||
<el-radio-group v-model="taskForm.targetKey">
|
||||
<el-radio-button
|
||||
v-for="item in returnTaskList"
|
||||
:key="item.id"
|
||||
:label="item.id"
|
||||
>{{item.name}}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="退回意见" prop="comment" :rules="[{ required: true, message: '请输入意见', trigger: 'blur' }]">
|
||||
<el-input style="width: 50%" type="textarea" v-model="taskForm.comment" placeholder="请输入意见"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="returnOpen = false">取 消</el-button>
|
||||
<el-button type="primary" @click="taskReturn">确 定</el-button>
|
||||
</span>
|
||||
@@ -188,7 +188,7 @@ import Treeselect from '@riophae/vue-treeselect'
|
||||
import { listUser } from '@/api/system/user'
|
||||
|
||||
export default {
|
||||
name: "Record",
|
||||
name: "Detail",
|
||||
components: {
|
||||
ProcessViewer,
|
||||
Parser,
|
||||
@@ -499,7 +499,7 @@ export default {
|
||||
formData.formBtns = false;
|
||||
if (this.taskForm.definitionId) {
|
||||
variables.variables = formData;
|
||||
// 启动流程并将表单数据加入流程变量
|
||||
// 启动流程并将表单数据加入流程变量
|
||||
definitionStart(this.taskForm.definitionId, JSON.stringify(variables)).then(res => {
|
||||
this.$modal.msgSuccess(res.msg);
|
||||
this.goBack();
|
||||
@@ -533,7 +533,7 @@ export default {
|
||||
})
|
||||
},
|
||||
/** 提交退回任务 */
|
||||
taskReturn() {
|
||||
taskReturn() {
|
||||
this.$refs["taskForm"].validate(valid => {
|
||||
if (valid) {
|
||||
returnTask(this.taskForm).then(res => {
|
||||
@@ -60,7 +60,7 @@
|
||||
icon="el-icon-tickets"
|
||||
@click="handleFlowRecord(scope.row)"
|
||||
>流转记录</el-button>
|
||||
<el-button
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-tickets"
|
||||
@@ -82,10 +82,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { finishedList, getDeployment, delDeployment, addDeployment, updateDeployment, exportDeployment, revokeProcess } from "@/api/workflow/finished";
|
||||
import { finishedList, delDeployment, revokeProcess } from "@/api/workflow/finished";
|
||||
|
||||
export default {
|
||||
name: "Deploy",
|
||||
name: "Finished",
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
@@ -204,14 +204,14 @@ export default {
|
||||
},
|
||||
/** 流程流转记录 */
|
||||
handleFlowRecord(row){
|
||||
this.$router.push({ path: '/task/record/index',
|
||||
this.$router.push({ path: '/work/detail',
|
||||
query: {
|
||||
definitionId: row.procDefId,
|
||||
procInsId: row.procInsId,
|
||||
deployId: row.deployId,
|
||||
taskId: row.taskId,
|
||||
finished: false
|
||||
}})
|
||||
}})
|
||||
},
|
||||
/** 撤回任务 */
|
||||
handleRevoke(row){
|
||||
@@ -223,36 +223,6 @@ export default {
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getDeployment(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改流程定义";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateDeployment(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addDeployment(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
@@ -266,21 +236,7 @@ export default {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有流程定义数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return exportDeployment(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -87,7 +87,7 @@ import { readXml } from '@/api/workflow/definition'
|
||||
import ProcessViewer from '@/components/ProcessViewer'
|
||||
|
||||
export default {
|
||||
name: 'Process',
|
||||
name: 'WorkProcess',
|
||||
components: {
|
||||
ProcessViewer
|
||||
},
|
||||
@@ -162,7 +162,7 @@ export default {
|
||||
},
|
||||
handleStart(row) {
|
||||
this.$router.push({
|
||||
path: '/process/start',
|
||||
path: '/work/start',
|
||||
query: {
|
||||
definitionId: row.definitionId,
|
||||
deployId: row.deploymentId,
|
||||
@@ -25,15 +25,6 @@
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增流程</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
@@ -115,55 +106,14 @@
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 发起流程 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="60%" append-to-body>
|
||||
<el-table v-loading="processLoading" fit :data="definitionList" border >
|
||||
<el-table-column label="流程名称" align="center" prop="processName" />
|
||||
<el-table-column label="流程版本" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="medium" >v{{ scope.row.version }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="流程分类" align="center" prop="category">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ categoryOptions.find(k => k.code === scope.row.category).categoryName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit-outline"
|
||||
@click="handleStartProcess(scope.row)"
|
||||
>发起流程</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="processTotal>0"
|
||||
:total="processTotal"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="listDefinition"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getDeployment,
|
||||
addDeployment,
|
||||
updateDeployment,
|
||||
exportDeployment,
|
||||
} from "@/api/workflow/finished";
|
||||
import { myProcessList, stopProcess, delProcess } from "@/api/workflow/process";
|
||||
import {listDefinition} from "@/api/workflow/definition";
|
||||
import { listCategory } from '@/api/workflow/category';
|
||||
export default {
|
||||
name: "Deploy",
|
||||
name: "Own",
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
@@ -265,30 +215,6 @@ export default {
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.open = true;
|
||||
this.title = "发起流程";
|
||||
this.listDefinition();
|
||||
},
|
||||
listDefinition(){
|
||||
listDefinition(this.queryParams).then(response => {
|
||||
this.definitionList = response.rows;
|
||||
this.processTotal = response.total;
|
||||
this.processLoading = false;
|
||||
});
|
||||
},
|
||||
/** 发起流程申请 */
|
||||
handleStartProcess(row){
|
||||
this.$router.push({
|
||||
path: '/task/record/index',
|
||||
query: {
|
||||
definitionId: row.definitionId,
|
||||
deployId: row.deploymentId,
|
||||
finished: true
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 取消流程申请 */
|
||||
handleStop(row){
|
||||
const params = {
|
||||
@@ -301,44 +227,14 @@ export default {
|
||||
},
|
||||
/** 流程流转记录 */
|
||||
handleFlowRecord(row){
|
||||
this.$router.push({ path: '/task/record/index',
|
||||
this.$router.push({ path: '/work/detail',
|
||||
query: {
|
||||
definitionId: row.procDefId,
|
||||
procInsId: row.procInsId,
|
||||
deployId: row.deployId,
|
||||
taskId: row.taskId,
|
||||
finished: false
|
||||
}})
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getDeployment(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改流程定义";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateDeployment(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addDeployment(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
@@ -362,7 +258,7 @@ export default {
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return exportDeployment(queryParams);
|
||||
// return exportDeployment(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
@@ -370,4 +266,3 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -20,7 +20,7 @@ import { startProcess } from '@/api/workflow/process'
|
||||
import Parser from '@/utils/generator/parser'
|
||||
|
||||
export default {
|
||||
name: 'StartProcess',
|
||||
name: 'Start',
|
||||
components: {
|
||||
Parser
|
||||
},
|
||||
@@ -79,7 +79,7 @@ export default {
|
||||
startProcess(this.definitionId, JSON.stringify(variables)).then(res => {
|
||||
this.$modal.msgSuccess(res.msg);
|
||||
this.$router.push({
|
||||
path: '/task/process/index'
|
||||
path: '/work/own'
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -85,13 +85,12 @@ import {
|
||||
returnList,
|
||||
returnTask,
|
||||
rejectTask,
|
||||
getDeployment,
|
||||
delDeployment,
|
||||
exportDeployment
|
||||
} from "@/api/workflow/todo";
|
||||
|
||||
export default {
|
||||
name: "Deploy",
|
||||
name: "Todo",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
@@ -142,7 +141,7 @@ export default {
|
||||
// 跳转到处理页面
|
||||
handleProcess(row) {
|
||||
this.$router.push({
|
||||
path: '/task/record/index',
|
||||
path: '/work/detail',
|
||||
query: {
|
||||
definitionId: row.procDefId,
|
||||
procInsId: row.procInsId,
|
||||
@@ -195,16 +194,6 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加流程定义";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getDeployment(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改流程定义";
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
@@ -235,4 +224,3 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user