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