流程更新
This commit is contained in:
parent
0bc50e710a
commit
f5a309dcd2
2462
sql/tansci_boot.sql
2462
sql/tansci_boot.sql
File diff suppressed because one or more lines are too long
75
tansci-boot-ui/src/api/work/model.ts
Normal file
75
tansci-boot-ui/src/api/work/model.ts
Normal file
@ -0,0 +1,75 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分页
|
||||
export function page(params:any){
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: '/tansci/system/work/model/page',
|
||||
method: 'get',
|
||||
params: params
|
||||
}).then((res:any) => {
|
||||
resolve(res.data)
|
||||
}).catch((e:any) => {
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 详情
|
||||
export function details(params:any){
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: '/tansci/system/work/model/details',
|
||||
method: 'get',
|
||||
params: params
|
||||
}).then((res:any) => {
|
||||
resolve(res.data)
|
||||
}).catch((e:any) => {
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 添加
|
||||
export function save(data:any){
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: '/tansci/system/work/model/save',
|
||||
method: 'post',
|
||||
data: data
|
||||
}).then((res:any) => {
|
||||
resolve(res.data)
|
||||
}).catch((e:any) => {
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function del(id:String){
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: '/tansci/system/work/model/delete/' + id,
|
||||
method: 'get'
|
||||
}).then((res:any) => {
|
||||
resolve(res.data)
|
||||
}).catch((e:any) => {
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function update(data:any){
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: '/tansci/system/work/model/update',
|
||||
method: 'post',
|
||||
data: data
|
||||
}).then((res:any) => {
|
||||
resolve(res.data)
|
||||
}).catch((e:any) => {
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
}
|
||||
@ -1,10 +1,10 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分页
|
||||
export function page(params:any){
|
||||
// 查询分配给指定用户的任务
|
||||
export function getTaskByAssignee(params:any){
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: '/tansci/system/workflow/page',
|
||||
url: '/tansci/system/work/workflow/getTaskByAssignee',
|
||||
method: 'get',
|
||||
params: params
|
||||
}).then((res:any) => {
|
||||
@ -15,26 +15,11 @@ export function page(params:any){
|
||||
})
|
||||
}
|
||||
|
||||
// 详情
|
||||
export function details(params:any){
|
||||
// 部署流程模型
|
||||
export function deployProcess(data:any){
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: '/tansci/system/workflow/details',
|
||||
method: 'get',
|
||||
params: params
|
||||
}).then((res:any) => {
|
||||
resolve(res.data)
|
||||
}).catch((e:any) => {
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 添加
|
||||
export function save(data:any){
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: '/tansci/system/workflow/save',
|
||||
url: '/tansci/system/work/workflow/deployProcess',
|
||||
method: 'post',
|
||||
data: data
|
||||
}).then((res:any) => {
|
||||
@ -45,25 +30,43 @@ export function save(data:any){
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function del(id:String){
|
||||
// 启动流程
|
||||
export function startProcessInstance(data:any){
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: '/tansci/system/workflow/delete/' + id,
|
||||
method: 'get'
|
||||
}).then((res:any) => {
|
||||
resolve(res.data)
|
||||
}).catch((e:any) => {
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function update(data:any){
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: '/tansci/system/workflow/update',
|
||||
url: '/tansci/system/work/workflow/startProcessInstance',
|
||||
method: 'post',
|
||||
data: data
|
||||
}).then((res:any) => {
|
||||
resolve(res.data)
|
||||
}).catch((e:any) => {
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 任务审批通过
|
||||
export function approveTask(data:any){
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: '/tansci/system/work/workflow/approveTask',
|
||||
method: 'post',
|
||||
data: data
|
||||
}).then((res:any) => {
|
||||
resolve(res.data)
|
||||
}).catch((e:any) => {
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 任务被拒绝
|
||||
export function rejectTask(data:any){
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: '/tansci/system/work/workflow/rejectTask',
|
||||
method: 'post',
|
||||
data: data
|
||||
}).then((res:any) => {
|
||||
|
||||
@ -17,6 +17,14 @@
|
||||
const bpmnProperties = ref();
|
||||
const bpmnModeler = ref();
|
||||
const props = defineProps({
|
||||
code: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
xmlStr: {
|
||||
type: String,
|
||||
default: null
|
||||
@ -61,7 +69,7 @@
|
||||
if(!props.xmlStr){
|
||||
xmlStr = `xml <?xml version="1.0" encoding="UTF-8"?>
|
||||
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="sid-38422fae-e03e-43a3-bef4-bd33b32041b2" targetNamespace="http://bpmn.io/bpmn" exporter="bpmn-js (https://demo.bpmn.io)" exporterVersion="5.1.2">
|
||||
<process id="Process" name="默认模板" isExecutable="true" camunda:versionTag="0.0.1">
|
||||
<process id="${props.code}" name="${props.name}" isExecutable="true" camunda:versionTag="0.0.1">
|
||||
</process>
|
||||
<bpmndi:BPMNDiagram id="BpmnDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BpmnPlane_1" bpmnElement="Process">
|
||||
|
||||
@ -16,7 +16,6 @@
|
||||
})
|
||||
|
||||
function onViewerInit() {
|
||||
console.log(1111111)
|
||||
// 初始时清除图层
|
||||
if(bpmnViewer && bpmnViewer.value){
|
||||
bpmnViewer && bpmnViewer.value.destroy();
|
||||
|
||||
178
tansci-boot-ui/src/views/work/Model.vue
Normal file
178
tansci-boot-ui/src/views/work/Model.vue
Normal file
@ -0,0 +1,178 @@
|
||||
<script setup lang="ts">
|
||||
import {onMounted, reactive, ref} from 'vue'
|
||||
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||
import type {FormInstance} from 'element-plus'
|
||||
import Table from '@/components/Table.vue'
|
||||
import BpmnViewer from "@/components/bpmn/BpmnViewer.vue"
|
||||
import {useRouter} from 'vue-router'
|
||||
import {page,update,del} from '@/api/work/model'
|
||||
import { deployProcess } from '@/api/work/workflow'
|
||||
|
||||
const router = useRouter()
|
||||
const searchForm = reactive({
|
||||
name: null
|
||||
})
|
||||
|
||||
const table = reactive({
|
||||
loading: false,
|
||||
page: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 1,
|
||||
},
|
||||
operation:{
|
||||
isShow: true,
|
||||
width: '240'
|
||||
},
|
||||
tableTitle: [
|
||||
{prop:'code',label:'流程编码'},
|
||||
{prop:'name',label:'流程名称'},
|
||||
{prop:'status',label:'是否部署',type:'switch',
|
||||
option:{
|
||||
activeValue:0,activeColor:'#ff4949',activeText:'未部署',
|
||||
inactiveValue:1,inactiveColor:'#13ce66',inactiveText:'已部署',
|
||||
inlinePrompt: false
|
||||
}
|
||||
},
|
||||
{prop:'updateTime',label:'更新时间'},
|
||||
{prop:'remarks',label:'描述'}
|
||||
],
|
||||
tableData:[],
|
||||
})
|
||||
|
||||
onMounted(()=>{
|
||||
onPage()
|
||||
})
|
||||
|
||||
function onPage(){
|
||||
table.loading = true;
|
||||
page(Object.assign(table.page, searchForm)).then((res:any)=>{
|
||||
if(res){
|
||||
table.loading = false;
|
||||
table.tableData = res.result.records;
|
||||
table.page.current = res.result.current;
|
||||
table.page.size = res.result.size;
|
||||
table.page.total = res.result.total;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function onSizeChange(e){
|
||||
table.page.size = e;
|
||||
onPage();
|
||||
}
|
||||
function onCurrentChange(e){
|
||||
table.page.current = e;
|
||||
onPage();
|
||||
}
|
||||
function onRefresh(){
|
||||
searchForm.name = null
|
||||
onPage();
|
||||
}
|
||||
function onSearch(){
|
||||
onPage();
|
||||
}
|
||||
|
||||
// 添加
|
||||
function onAdd(){
|
||||
router.push({
|
||||
path: '/work/ModelAdd',
|
||||
query: { id: null }
|
||||
});
|
||||
}
|
||||
|
||||
// 编辑
|
||||
function onEdit(val:any){
|
||||
router.push({
|
||||
path: '/work/ModelAdd',
|
||||
query: { id: val.column.row.id }
|
||||
});
|
||||
}
|
||||
|
||||
// 删除
|
||||
function onDelete(val:any){
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
del(val.column.row.id).then(res=>{
|
||||
if(res){
|
||||
ElMessage.success('删除成功!');
|
||||
onPage();
|
||||
}
|
||||
})
|
||||
}).catch(e=>{
|
||||
console.log(e)
|
||||
})
|
||||
}
|
||||
|
||||
// 预览
|
||||
const viewer = reactive({
|
||||
viewerVisible: false,
|
||||
xmlStr: ''
|
||||
})
|
||||
|
||||
function onViewer(val:any){
|
||||
viewer.xmlStr = val.column.row.content;
|
||||
viewer.viewerVisible = true;
|
||||
}
|
||||
|
||||
// 部署模型
|
||||
function onDeployProcess(val:any){
|
||||
ElMessageBox.confirm('确定要部署该模型吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deployProcess({
|
||||
name: val.column.row.name,
|
||||
xml: val.column.row.content
|
||||
}).then((res:any) =>{
|
||||
if(res && res.result != null){
|
||||
update({
|
||||
id: val.column.row.id,
|
||||
status: 1
|
||||
}).then(res=>{
|
||||
if(res){
|
||||
ElMessage.success('部署成功!');
|
||||
onPage();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ElMessage.error('部署失败!');
|
||||
}
|
||||
})
|
||||
}).catch(e=>{
|
||||
console.log(e)
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
<template>
|
||||
<div class="model-container">
|
||||
<Table :data="table.tableData" :column="table.tableTitle" :operation="table.operation" :page="table.page" :loading="table.loading"
|
||||
@onSizeChange="onSizeChange" @onCurrentChange="onCurrentChange">
|
||||
<template #search>
|
||||
<div><el-button v-permission="'model:save'" type="primary" @click="onAdd()">添加</el-button></div>
|
||||
<div><el-input v-model="searchForm.name" placeholder="请输入名称"></el-input></div>
|
||||
<div><el-button @click="onRefresh" icon="RefreshRight" circle></el-button></div>
|
||||
<div><el-button @click="onSearch" type="primary" icon="Search">查询</el-button></div>
|
||||
</template>
|
||||
<template #column="scope">
|
||||
<el-button @click="onViewer(scope)" type='primary' link style="color:var(--query); padding:0;">预览</el-button>
|
||||
<el-button @click="onDeployProcess(scope)" type='primary' link style="color:var(--add); padding:0;">部署</el-button>
|
||||
<el-button @click="onEdit(scope)" v-permission="'model:update'" type='primary' link style="color:var(--edit); padding:0;">编辑</el-button>
|
||||
<el-button @click="onDelete(scope)" v-permission="'model:delete'" type='primary' link style="color:var(--delete); padding:0;">删除</el-button>
|
||||
</template>
|
||||
</Table>
|
||||
<el-dialog v-model="viewer.viewerVisible" title="预览">
|
||||
<BpmnViewer :xmlStr="viewer.xmlStr" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.model-container{
|
||||
|
||||
}
|
||||
</style>
|
||||
@ -3,8 +3,9 @@
|
||||
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||
import type {FormInstance} from 'element-plus'
|
||||
import BpmnModeler from "@/components/bpmn/BpmnModeler.vue"
|
||||
import common from "@/utils/common"
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { details, save, update } from '@/api/work/workflow'
|
||||
import { details, save, update } from '@/api/work/model'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
@ -12,9 +13,10 @@
|
||||
const saveXml = ref(null);
|
||||
const form = reactive({
|
||||
loading: false,
|
||||
workflowForm:{
|
||||
modelForm:{
|
||||
id: '',
|
||||
name: '',
|
||||
code: 'code-' + common.uuid(),
|
||||
name: '默认模型',
|
||||
content: null,
|
||||
status: null,
|
||||
remarks: '',
|
||||
@ -31,8 +33,9 @@
|
||||
}
|
||||
form.loading = true;
|
||||
details({id: route.query.id}).then((res:any) =>{
|
||||
form.workflowForm = {
|
||||
form.modelForm = {
|
||||
id: res.result.id,
|
||||
code: res.result.code,
|
||||
name: res.result.name,
|
||||
content: res.result.content,
|
||||
status: res.result.status,
|
||||
@ -43,7 +46,7 @@
|
||||
}
|
||||
|
||||
function goBack(){
|
||||
router.push({path: '/work/Workflow'});
|
||||
router.push({path: '/work/Model'});
|
||||
}
|
||||
|
||||
async function onSubmit(formEl: FormInstance | undefined) {
|
||||
@ -60,19 +63,19 @@
|
||||
ElMessage.warning("流程图不能为空!")
|
||||
return false;
|
||||
}
|
||||
form.workflowForm.content = res.xml;
|
||||
if(!form.workflowForm.id){
|
||||
save(form.workflowForm).then(res=>{
|
||||
form.modelForm.content = res.xml;
|
||||
if(!form.modelForm.id){
|
||||
save(form.modelForm).then(res=>{
|
||||
if(res){
|
||||
ElMessage.success("添加成功!");
|
||||
router.push({path: '/work/Workflow'});
|
||||
router.push({path: '/work/Model'});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
update(form.workflowForm).then(res=>{
|
||||
update(form.modelForm).then(res=>{
|
||||
if(res){
|
||||
ElMessage.success("更新成功!");
|
||||
router.push({path: '/work/Workflow'});
|
||||
router.push({path: '/work/Model'});
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -83,31 +86,36 @@
|
||||
|
||||
</script>
|
||||
<template>
|
||||
<div class="workflow-add-container">
|
||||
<el-form :model="form.workflowForm" ref="formRef" :rules="rules" label-position="left" status-icon>
|
||||
<div class="model-add-container">
|
||||
<el-form :model="form.modelForm" ref="formRef" :rules="rules" label-position="left" status-icon>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="1">
|
||||
<el-button @click="goBack()">返回</el-button>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="流程名称" prop="name" :rules="[{required: true,message:'请输入名称',trigger: 'blur'}]">
|
||||
<el-input v-model="form.workflowForm.name" placeholder="请输入名称" style="width: 100%"/>
|
||||
<el-input v-model="form.modelForm.name" placeholder="请输入名称" style="width: 100%"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="流程编码" prop="code" :rules="[{required: true,message:'请输入编码',trigger: 'blur'}]">
|
||||
<el-input v-model="form.modelForm.code" placeholder="请输入编码" style="width: 100%"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-button type="primary" @click="onSubmit(formRef)">提交</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<BpmnModeler v-if="!form.loading" :xmlStr="form.workflowForm.content" ref="saveXml"/>
|
||||
<BpmnModeler v-if="!form.loading" :code="form.modelForm.code" :name="form.modelForm.name" :xmlStr="form.modelForm.content" ref="saveXml"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.workflow-add-container{
|
||||
.model-add-container{
|
||||
|
||||
}
|
||||
</style>
|
||||
@ -3,22 +3,10 @@
|
||||
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||
import type {FormInstance} from 'element-plus'
|
||||
import Table from '@/components/Table.vue'
|
||||
import BpmnViewer from "@/components/bpmn/BpmnViewer.vue"
|
||||
import {useRouter} from 'vue-router'
|
||||
import {page,update,del} from '@/api/work/workflow'
|
||||
|
||||
const router = useRouter()
|
||||
const searchForm = reactive({
|
||||
name: null
|
||||
})
|
||||
import {getTaskByAssignee,deployProcess,startProcessInstance,approveTask,rejectTask} from '@/api/work/workflow'
|
||||
|
||||
const table = reactive({
|
||||
loading: false,
|
||||
page: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 1,
|
||||
},
|
||||
operation:{
|
||||
isShow: true,
|
||||
width: '240'
|
||||
@ -44,61 +32,14 @@
|
||||
|
||||
function onPage(){
|
||||
table.loading = true;
|
||||
page(Object.assign(table.page, searchForm)).then((res:any)=>{
|
||||
getTaskByAssignee({assignee: '6cfc6a42-0984-11f0-82ff-4ccc6a2e3718'}).then((res:any)=>{
|
||||
if(res){
|
||||
console.log(res)
|
||||
table.loading = false;
|
||||
table.tableData = res.result.records;
|
||||
table.page.current = res.result.current;
|
||||
table.page.size = res.result.size;
|
||||
table.page.total = res.result.total;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function onSizeChange(e){
|
||||
table.page.size = e;
|
||||
onPage();
|
||||
}
|
||||
function onCurrentChange(e){
|
||||
table.page.current = e;
|
||||
onPage();
|
||||
}
|
||||
function onRefresh(){
|
||||
searchForm.name = null
|
||||
onPage();
|
||||
}
|
||||
function onSearch(){
|
||||
onPage();
|
||||
}
|
||||
|
||||
function onSwitchChange(row:any){
|
||||
update({
|
||||
id: row.id,
|
||||
status: row.status
|
||||
}).then(res=>{
|
||||
if(res){
|
||||
ElMessage.success('操作成功!');
|
||||
onPage();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 添加
|
||||
function onAdd(){
|
||||
router.push({
|
||||
path: '/work/WorkflowAdd',
|
||||
query: { id: null }
|
||||
});
|
||||
}
|
||||
|
||||
// 编辑
|
||||
function onEdit(val:any){
|
||||
router.push({
|
||||
path: '/work/WorkflowAdd',
|
||||
query: { id: val.column.row.id }
|
||||
});
|
||||
}
|
||||
|
||||
// 删除
|
||||
function onDelete(val:any){
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
@ -106,48 +47,27 @@
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
del(val.column.row.id).then(res=>{
|
||||
if(res){
|
||||
ElMessage.success('删除成功!');
|
||||
onPage();
|
||||
}
|
||||
})
|
||||
// del(val.column.row.id).then(res=>{
|
||||
// if(res){
|
||||
// ElMessage.success('删除成功!');
|
||||
// onPage();
|
||||
// }
|
||||
// })
|
||||
}).catch(e=>{
|
||||
console.log(e)
|
||||
})
|
||||
}
|
||||
|
||||
// 预览
|
||||
const viewer = reactive({
|
||||
viewerVisible: false,
|
||||
xmlStr: ''
|
||||
})
|
||||
|
||||
function onViewer(val:any){
|
||||
viewer.xmlStr = val.column.row.content;
|
||||
viewer.viewerVisible = true;
|
||||
}
|
||||
|
||||
</script>
|
||||
<template>
|
||||
<div class="workflow-container">
|
||||
<Table :data="table.tableData" :column="table.tableTitle" :operation="table.operation" :page="table.page" :loading="table.loading"
|
||||
@onSizeChange="onSizeChange" @onCurrentChange="onCurrentChange" @onSwitchChange="onSwitchChange">
|
||||
<Table :data="table.tableData" :column="table.tableTitle" :operation="table.operation" :loading="table.loading">
|
||||
<template #search>
|
||||
<div><el-button v-permission="'workflow:save'" type="primary" @click="onAdd()">添加</el-button></div>
|
||||
<div><el-input v-model="searchForm.name" placeholder="请输入名称"></el-input></div>
|
||||
<div><el-button @click="onRefresh" icon="RefreshRight" circle></el-button></div>
|
||||
<div><el-button @click="onSearch" type="primary" icon="Search">查询</el-button></div>
|
||||
</template>
|
||||
<template #column="scope">
|
||||
<el-button @click="onViewer(scope)" type='primary' link style="color:var(--query); padding:0;">预览</el-button>
|
||||
<el-button @click="onEdit(scope)" v-permission="'workflow:update'" type='primary' link style="color:var(--edit); padding:0;">编辑</el-button>
|
||||
<el-button @click="onDelete(scope)" v-permission="'workflow:delete'" type='primary' link style="color:var(--delete); padding:0;">删除</el-button>
|
||||
</template>
|
||||
</Table>
|
||||
<el-dialog v-model="viewer.viewerVisible" title="预览">
|
||||
<BpmnViewer :xmlStr="viewer.xmlStr" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@ -44,7 +44,7 @@ public class FlowableService {
|
||||
public String deployProcess(String name, String xml) {
|
||||
try {
|
||||
Deployment deployment = repositoryService.createDeployment()
|
||||
.addClasspathResource(xml)
|
||||
.addString(name, xml)
|
||||
.name(name)
|
||||
.deploy();
|
||||
log.info("流程【{}】部署成功", deployment.getId());
|
||||
|
||||
@ -60,5 +60,5 @@ magic-api:
|
||||
|
||||
# flowable
|
||||
flowable:
|
||||
async-executor-activate: true # 关闭定时任务job
|
||||
database-schema-update: true # flowable自动更新表结构
|
||||
async-executor-activate: false # 关闭定时任务job
|
||||
database-schema-update: false # flowable自动更新表结构
|
||||
Loading…
Reference in New Issue
Block a user