🎉 1.0.2.RELEASE

saber
ssc 5 years ago
parent aba7017566
commit 6323a79de6
  1. 1
      .gitignore
  2. 9
      build.sh
  3. 91
      src/api/plugin/workflow/process.js
  4. 7
      src/views/plugin/workflow/design/form.vue
  5. 12
      src/views/plugin/workflow/process/claim.vue
  6. 100
      src/views/plugin/workflow/process/components/detail.vue
  7. 6
      src/views/plugin/workflow/process/done.vue
  8. 185
      src/views/plugin/workflow/process/my-done.vue
  9. 6
      src/views/plugin/workflow/process/send.vue
  10. 3
      src/views/plugin/workflow/process/start.vue
  11. 10
      src/views/plugin/workflow/process/todo.vue

1
.gitignore vendored

@ -1,6 +1,7 @@
.DS_Store
node_modules*
/dist
*.sh
/tests/e2e/videos/
/tests/e2e/screenshots/

@ -1,9 +0,0 @@
#!/bin/bash
echo "====================打包文件===================="
yarn build
echo "====================传输文件===================="
scp -P 22 -r ./dist/** root@192.168.0.157:/docker/nginx/web/html
echo "====================部署完毕===================="

@ -2,6 +2,9 @@ import request from '@/router/axios'
const prefix = '/api/blade-workflow/process'
/**
* 可发起流程列表
*/
export const processList = (current, size, params) => {
return request({
url: `${prefix}/processList`,
@ -14,6 +17,9 @@ export const processList = (current, size, params) => {
})
}
/**
* 待签列表
*/
export const claimList = (current, size, params) => {
return request({
url: `${prefix}/claimList`,
@ -26,6 +32,9 @@ export const claimList = (current, size, params) => {
})
}
/**
* 待办列表
*/
export const todoList = (current, size, params) => {
return request({
url: `${prefix}/todoList`,
@ -38,6 +47,9 @@ export const todoList = (current, size, params) => {
})
}
/**
* 我发起的请求
*/
export const sendList = (current, size, params) => {
return request({
url: `${prefix}/sendList`,
@ -50,6 +62,9 @@ export const sendList = (current, size, params) => {
})
}
/**
* 办结列表
*/
export const doneList = (current, size, params) => {
return request({
url: `${prefix}/doneList`,
@ -62,6 +77,24 @@ export const doneList = (current, size, params) => {
})
}
/**
* 我的已办流程不一定办结
*/
export const myDoneList = (current, size, params) => {
return request({
url: `${prefix}/myDoneList`,
method: 'get',
params: {
...params,
current,
size,
}
})
}
/**
* 抄送列表
*/
export const copyList = (current, size, params) => {
return request({
url: `${prefix}/copyList`,
@ -74,6 +107,9 @@ export const copyList = (current, size, params) => {
})
}
/**
* 根据流程id获取表单
*/
export const getFormByProcessId = (params) => {
return request({
url: `${prefix}/getFormByProcessId`,
@ -82,6 +118,9 @@ export const getFormByProcessId = (params) => {
})
}
/**
* 流程详情
*/
export const detail = (params) => {
return request({
url: `${prefix}/detail`,
@ -90,6 +129,9 @@ export const detail = (params) => {
})
}
/**
* 发起流程
*/
export const startProcess = (data) => {
return request({
url: `${prefix}/startProcess`,
@ -98,6 +140,9 @@ export const startProcess = (data) => {
})
}
/**
* 任务审批
*/
export const completeTask = (data) => {
return request({
url: `${prefix}/completeTask`,
@ -106,6 +151,9 @@ export const completeTask = (data) => {
})
}
/**
* 任务转办
*/
export const transferTask = (data) => {
return request({
url: `${prefix}/transferTask`,
@ -114,6 +162,9 @@ export const transferTask = (data) => {
})
}
/**
* 任务委托
*/
export const delegateTask = (data) => {
return request({
url: `${prefix}/delegateTask`,
@ -122,7 +173,9 @@ export const delegateTask = (data) => {
})
}
/**
* 签收任务
*/
export const claimTask = (data) => {
return request({
url: `${prefix}/claimTask`,
@ -131,6 +184,42 @@ export const claimTask = (data) => {
})
}
/**
* 获取可退回节点
*/
export const backNodes = (params) => {
return request({
url: `${prefix}/getBackNodes`,
method: 'get',
params
})
}
/**
* 退回到指定节点
*/
export const rollbackTask = (data) => {
return request({
url: `${prefix}/rollbackTask`,
method: 'post',
data
})
}
/**
* 终止流程
*/
export const terminateProcess = (data) => {
return request({
url: `${prefix}/terminateProcess`,
method: 'post',
data
})
}
/**
* 用户列表
*/
export const userList = (current, size, params) => {
return request({
url: `/api/blade-user/user-search`,

@ -50,7 +50,8 @@
append-to-body
title="表单设计"
fullscreen>
<avue-form-design style="height: 88vh"
<avue-form-design v-if="formVisible"
style="height: 88vh"
ref="formDesign"
:toolbar="['clear', 'preview', 'import']"
:includeFields="['group', 'dynamic', 'input', 'textarea', 'number', 'map', 'radio','checkbox','select','tree','cascader', 'upload', 'date','time','datetime','daterange','datetimerange','timerange','ueditor','switch','rate','color','icon','slider']"
@ -265,15 +266,15 @@ export default {
})
},
handleDesign(row) {
this.formVisible = true
this.options = this.deepClone(row.content || '')
this.row = row
this.isCopy = false
this.formVisible = true
},
handleCopy(row) {
this.formVisible = true
this.options = this.deepClone(row.content || '')
this.isCopy = true
this.formVisible = true
},
handleCopySubmit(form, done) {
const param = {

@ -15,11 +15,13 @@
@on-load="onLoad">
<template slot="menu"
slot-scope="{row}">
<el-button type="text"
<el-button v-if="permission.wf_process_claim_sign"
type="text"
size="small"
icon="el-icon-check"
@click="handleClaim(row)">签收</el-button>
<el-button type="text"
<el-button v-if="permission.wf_process_claim_follow"
type="text"
size="small"
icon="el-icon-search"
@click="handleFlow(row)">流程图</el-button>
@ -31,9 +33,9 @@
destroy-on-close
title="流程图">
<wf-design ref="bpmn"
style="height: 500px;"
access-key="OFdH37<Bs9[8A74vp)5B59Fu3c1I7{N:"
:options="bpmnOption"></wf-design>
style="height: 500px;"
access-key="OFdH37<Bs9[8A74vp)5B59Fu3c1I7{N:"
:options="bpmnOption"></wf-design>
</el-dialog>
</basic-container>
</template>

@ -67,6 +67,7 @@
<template v-if="process.status == 'todo'">
<div style="height: 120px;"></div>
<el-row class="foot-item avue-affix"
:style="{width: isCollapse? 'calc(100% - 80px)': 'calc(100% - 260px)' }"
id="avue-view">
<el-button v-if="buttonList.find(b => b.key == 'wf_pass')"
type="success"
@ -93,21 +94,34 @@
size="medium"
v-loading="submitLoading"
@click="handlePrint()">打印</el-button>
<!-- <el-button type="warning"
<el-button v-if="buttonList.find(b => b.key == 'wf_print')"
type="success"
size="medium"
v-loading="submitLoading"
@click="handleRollback()">指定回退</el-button>
<el-button v-if="buttonList.find(b => b.key == 'wf_terminate')"
type="danger"
size="medium"
v-loading="submitLoading"
@click="handleSelect()">选人</el-button> -->
@click="handleTerminate()">终止</el-button>
</el-row>
</template>
<user-select ref="user-select"
:select-type="selectType"
@onClose="handleClose"
@onConfirm="handleConfirm"></user-select>
<el-dialog :visible.sync="nodeVisible"
append-to-body
title="选择回退节点">
<avue-form v-model="nodeForm"
:option="nodeOption"
@submit="handleNodeSubmit"></avue-form>
</el-dialog>
</basic-container>
</template>
<script>
import { detail, completeTask, transferTask, delegateTask } from '@/api/plugin/workflow/process'
import { detail, completeTask, transferTask, delegateTask, backNodes, rollbackTask, terminateProcess } from '@/api/plugin/workflow/process'
import userSelect from './user-select'
import { mapGetters } from 'vuex'
@ -116,7 +130,7 @@ import Print from '../../util/print'
export default {
components: { userSelect },
computed: {
...mapGetters(['tag', 'userInfo']),
...mapGetters(['tag', 'userInfo', 'isCollapse']),
},
watch: {
'$route.params.params': {
@ -184,7 +198,22 @@ export default {
buttonList: [],
watermarkText: '', //
userSelectType: '', // transfer delegate
selectType: 'radio'
selectType: 'radio',
nodeVisible: false,
nodeForm: {},
nodeOption: {
column: [{
label: '节点',
prop: 'nodeId',
type: 'select',
props: {
label: 'nodeName',
value: 'nodeId'
},
span: 24,
rules: [{ required: true, message: '请选择回退节点', trigger: 'change' }]
}]
}
}
},
created() {
@ -307,7 +336,52 @@ export default {
// this.watermark({ text: this.watermarkText })
Print(this.$refs.printBody)
},
handleRollback() { // 退
const { comment } = this.examineForm
if (!comment) {
this.$message.error("请填写批复意见")
return
}
const { taskId } = this.process
backNodes({ taskId }).then(res => {
this.findObject(this.nodeOption.column, 'nodeId').dicData = res.data.data
this.nodeVisible = true
})
},
handleNodeSubmit() { // 退
const { comment } = this.examineForm
const { nodeId } = this.nodeForm
const { taskId } = this.process
rollbackTask({ comment, nodeId, taskId }).then(() => {
this.$message.success("回退成功")
this.closeTag()
})
},
handleTerminate() { //
const { comment } = this.examineForm
if (!comment) {
this.$message.error("请填写批复意见")
return
}
this.$confirm('确定要终止此流程吗?', '警告', {
type: 'warning'
}).then(() => {
const { taskId } = this.process
terminateProcess({ taskId, comment }).then(() => {
this.$message.success("操作成功")
this.closeTag()
})
}).catch(() => {
})
},
handleUserSelect(type) { //
const { comment } = this.examineForm
if (!comment) {
this.$message.error("请填写批复意见")
return
}
this.$refs['user-select'].visible = true
this.userSelectType = type
},
@ -315,22 +389,23 @@ export default {
this.$refs['user-select'].visible = false
},
handleConfirm(id, name) { //
const { comment } = this.examineForm
const type = this.userSelectType
const param = {
taskId: this.process.taskId,
assignee: id
assignee: id,
comment
}
if (type == 'transfer') {
transferTask(param).then(() => { //
this.$message.success("转办成功")
this.$store.commit('DEL_TAG', this.tag)
this.$router.push("/plugin/workflow/process/todo")
this.closeTag()
})
} else if (type == 'delegate') { //
delegateTask(param).then(() => {
this.$message.success("委托成功")
this.$store.commit('DEL_TAG', this.tag)
this.$router.push("/plugin/workflow/process/todo")
this.closeTag()
})
} else if (type == 'copy') { //
this.examineForm.copyUser = id
@ -341,6 +416,10 @@ export default {
}
this.$refs['user-select'].visible = false
},
closeTag() {
this.$store.commit('DEL_TAG', this.tag)
this.$router.push("/plugin/workflow/process/todo")
}
}
}
</script>
@ -361,7 +440,6 @@ export default {
margin-left: -20px;
// right: 0;
z-index: 101;
width: 98%;
height: 66px;
background-color: #fff;
display: flex;

@ -15,11 +15,13 @@
@on-load="onLoad">
<template slot="menu"
slot-scope="{row}">
<el-button type="text"
<el-button v-if="permission.wf_process_done_detail"
type="text"
size="small"
icon="el-icon-info"
@click="handleDetail(row)">详情</el-button>
<el-button type="text"
<el-button v-if="permission.wf_process_done_follow"
type="text"
size="small"
icon="el-icon-search"
@click="handleFlow(row)">流程图</el-button>

@ -0,0 +1,185 @@
<template>
<basic-container>
<avue-crud :option="option"
:table-loading="loading"
:data="data"
:page="page"
v-model="form"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="onLoad(page, query)"
@on-load="onLoad">
<template slot="menu"
slot-scope="{row}">
<el-button type="text"
size="small"
icon="el-icon-info"
@click="handleDetail(row)">详情</el-button>
<el-button type="text"
size="small"
icon="el-icon-search"
@click="handleFlow(row)">流程图</el-button>
</template>
</avue-crud>
<el-dialog :visible.sync="bpmnVisible"
append-to-body
destroy-on-close
title="流程图">
<wf-design ref="bpmn"
style="height: 500px;"
access-key="OFdH37<Bs9[8A74vp)5B59Fu3c1I7{N:"
:options="bpmnOption"></wf-design>
</el-dialog>
</basic-container>
</template>
<script>
import { myDoneList as getList, detail } from "@/api/plugin/workflow/process";
export default {
data() {
return {
form: {},
query: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: {
size: 'mini',
height: 'auto',
calcHeight: 30,
tip: false,
border: true,
selection: true,
dialogType: 'drawer',
addBtn: false,
editBtn: false,
delBtn: false,
align: 'center',
searchMenuSpan: 6,
column: [
{
label: '流程名称',
prop: 'processDefinitionName',
search: true,
overHidden: true
},
{
label: '流程标识',
prop: 'processDefinitionKey',
search: true,
overHidden: true
},
{
label: "流程分类",
type: "select",
row: true,
dicUrl: '/api/blade-workflow/design/category/tree',
props: {
label: 'name',
value: 'id'
},
prop: "category",
search: true,
},
{
label: '当前节点',
prop: 'taskName',
},
{
label: '申请时间',
prop: 'createTime',
type: 'datetime',
format: 'yyyy-MM-dd HH:mm',
width: 165,
},
]
},
data: [],
bpmnVisible: false,
bpmnOption: {}
};
},
computed: {
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
handleDetail(row) {
const param = {
taskId: row.taskId,
processInsId: row.processInstanceId
}
this.$router.push('/workflow/process/detail/' + Buffer.from(JSON.stringify(param)).toString('base64'))
},
handleFlow(row) {
const { taskId, processInstanceId } = row
detail({ taskId, processInsId: processInstanceId }).then(res => {
const { process, flow } = res.data.data
const flows = []
flow.forEach(f => {
const ff = {
id: f.historyActivityId
}
if (f.historyActivityType == 'sequenceFlow') ff.class = "lineWarn"
else ff.class = "nodeWarn"
flows.push(ff)
})
this.bpmnOption = {
mode: 'view',
xml: process.xml,
flows
}
this.bpmnVisible = true
})
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
onLoad(page, params = {}) {
this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
});
}
}
};
</script>
<style>
</style>

@ -15,11 +15,13 @@
@on-load="onLoad">
<template slot="menu"
slot-scope="{row}">
<el-button type="text"
<el-button v-if="permission.wf_process_send_detail"
type="text"
size="small"
icon="el-icon-info"
@click="handleDetail(row)">详情</el-button>
<el-button type="text"
<el-button v-if="permission.wf_process_send_follow"
type="text"
size="small"
icon="el-icon-search"
@click="handleFlow(row)">流程图</el-button>

@ -14,7 +14,8 @@
@on-load="onLoad">
<template slot="menu"
slot-scope="{row}">
<el-button type="text"
<el-button v-if="permission.wf_process_start_flow"
type="text"
size="small"
icon="el-icon-video-play"
@click="handleStart(row)">发起</el-button>

@ -15,11 +15,13 @@
@on-load="onLoad">
<template slot="menu"
slot-scope="{row}">
<el-button type="text"
<el-button v-if="permission.wf_process_todo_detail"
type="text"
size="small"
icon="el-icon-info"
@click="handleDetail(row)">详情</el-button>
<el-button type="text"
<el-button v-if="permission.wf_process_todo_follow"
type="text"
size="small"
icon="el-icon-search"
@click="handleFlow(row)">流程图</el-button>
@ -31,8 +33,8 @@
destroy-on-close
title="流程图">
<wf-design ref="bpmn"
style="height: 500px;"
:options="bpmnOption"></wf-design>
style="height: 500px;"
:options="bpmnOption"></wf-design>
</el-dialog>
</basic-container>
</template>

Loading…
Cancel
Save