mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-17 18:46:36 +08:00
commit:同步2.0版本(添加指定审批人功能)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// @import "../element-variables-light.scss";
|
||||
@import "../element-variables-dark.scss";
|
||||
@import "../element-variables-light.scss";
|
||||
// @import "../element-variables-dark.scss";
|
||||
// @import "../element-variables-green.scss";
|
||||
// @import "../element-variables-orange.scss";
|
||||
// @import "../element-variables-blue.scss";
|
||||
@@ -1398,8 +1398,8 @@
|
||||
cursor: pointer;
|
||||
outline: none; }
|
||||
.el-dropdown-menu__item:not(.is-disabled):hover, .el-dropdown-menu__item:focus {
|
||||
background-color: #409EFF;
|
||||
color: #FFFFFF; }
|
||||
background-color: #ecf5ff;
|
||||
color: #66b1ff; }
|
||||
.el-dropdown-menu__item i {
|
||||
margin-right: 5px; }
|
||||
.el-dropdown-menu__item--divided {
|
||||
|
||||
@@ -8039,8 +8039,8 @@
|
||||
cursor: pointer;
|
||||
outline: none; }
|
||||
.el-dropdown-menu__item:not(.is-disabled):hover, .el-dropdown-menu__item:focus {
|
||||
background-color: #409EFF;
|
||||
color: #FFFFFF; }
|
||||
background-color: #ecf5ff;
|
||||
color: #66b1ff; }
|
||||
.el-dropdown-menu__item i {
|
||||
margin-right: 5px; }
|
||||
.el-dropdown-menu__item--divided {
|
||||
@@ -8583,7 +8583,7 @@
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding-left: 0;
|
||||
background-color: #272C34; }
|
||||
background-color: #FFFFFF; }
|
||||
.el-menu::before,
|
||||
.el-menu::after {
|
||||
display: table;
|
||||
@@ -8700,7 +8700,7 @@
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
color: #303133;
|
||||
padding: 0 20px;
|
||||
list-style: none;
|
||||
cursor: pointer;
|
||||
@@ -8716,7 +8716,7 @@
|
||||
color: #909399; }
|
||||
.el-menu-item:hover, .el-menu-item:focus {
|
||||
outline: none;
|
||||
background-color: #409EFF; }
|
||||
background-color: #ecf5ff; }
|
||||
.el-menu-item.is-disabled {
|
||||
opacity: 0.25;
|
||||
cursor: not-allowed;
|
||||
@@ -8740,7 +8740,7 @@
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
color: #303133;
|
||||
padding: 0 20px;
|
||||
list-style: none;
|
||||
cursor: pointer;
|
||||
@@ -8756,13 +8756,13 @@
|
||||
color: #909399; }
|
||||
.el-submenu__title:hover, .el-submenu__title:focus {
|
||||
outline: none;
|
||||
background-color: #409EFF; }
|
||||
background-color: #ecf5ff; }
|
||||
.el-submenu__title.is-disabled {
|
||||
opacity: 0.25;
|
||||
cursor: not-allowed;
|
||||
background: none !important; }
|
||||
.el-submenu__title:hover {
|
||||
background-color: #409EFF; }
|
||||
background-color: #ecf5ff; }
|
||||
.el-submenu .el-menu {
|
||||
border: none; }
|
||||
.el-submenu .el-menu-item {
|
||||
@@ -19440,8 +19440,8 @@
|
||||
cursor: pointer;
|
||||
font-size: 14px; }
|
||||
.el-table-filter__list-item:hover {
|
||||
background-color: #409EFF;
|
||||
color: #FFFFFF; }
|
||||
background-color: #ecf5ff;
|
||||
color: #66b1ff; }
|
||||
.el-table-filter__list-item.is-active {
|
||||
background-color: #409EFF;
|
||||
color: #FFFFFF; }
|
||||
|
||||
@@ -490,7 +490,7 @@
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding-left: 0;
|
||||
background-color: #272C34; }
|
||||
background-color: #FFFFFF; }
|
||||
.el-menu::before,
|
||||
.el-menu::after {
|
||||
display: table;
|
||||
@@ -607,7 +607,7 @@
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
color: #303133;
|
||||
padding: 0 20px;
|
||||
list-style: none;
|
||||
cursor: pointer;
|
||||
@@ -623,7 +623,7 @@
|
||||
color: #909399; }
|
||||
.el-menu-item:hover, .el-menu-item:focus {
|
||||
outline: none;
|
||||
background-color: #409EFF; }
|
||||
background-color: #ecf5ff; }
|
||||
.el-menu-item.is-disabled {
|
||||
opacity: 0.25;
|
||||
cursor: not-allowed;
|
||||
@@ -647,7 +647,7 @@
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
color: #303133;
|
||||
padding: 0 20px;
|
||||
list-style: none;
|
||||
cursor: pointer;
|
||||
@@ -663,13 +663,13 @@
|
||||
color: #909399; }
|
||||
.el-submenu__title:hover, .el-submenu__title:focus {
|
||||
outline: none;
|
||||
background-color: #409EFF; }
|
||||
background-color: #ecf5ff; }
|
||||
.el-submenu__title.is-disabled {
|
||||
opacity: 0.25;
|
||||
cursor: not-allowed;
|
||||
background: none !important; }
|
||||
.el-submenu__title:hover {
|
||||
background-color: #409EFF; }
|
||||
background-color: #ecf5ff; }
|
||||
.el-submenu .el-menu {
|
||||
border: none; }
|
||||
.el-submenu .el-menu-item {
|
||||
|
||||
@@ -1373,8 +1373,8 @@
|
||||
cursor: pointer;
|
||||
font-size: 14px; }
|
||||
.el-table-filter__list-item:hover {
|
||||
background-color: #409EFF;
|
||||
color: #FFFFFF; }
|
||||
background-color: #ecf5ff;
|
||||
color: #66b1ff; }
|
||||
.el-table-filter__list-item.is-active {
|
||||
background-color: #409EFF;
|
||||
color: #FFFFFF; }
|
||||
|
||||
@@ -101,6 +101,11 @@ const SysFlowTaskOperationType = new DictionaryBase('任务操作类型', [
|
||||
id: 'multi_abstain',
|
||||
name: '弃权(会签)',
|
||||
symbol: 'MULTI_ABSTAIN'
|
||||
},
|
||||
{
|
||||
id: 'set_assignee',
|
||||
name: '指定审批人',
|
||||
symbol: 'SET_ASSIGNEE'
|
||||
}
|
||||
]);
|
||||
Vue.prototype.SysFlowTaskOperationType = SysFlowTaskOperationType;
|
||||
|
||||
@@ -35,12 +35,15 @@
|
||||
</template>
|
||||
</el-upload>
|
||||
<template v-else>
|
||||
<template v-for="item in uploadWidgetImpl.fileList">
|
||||
<img class="table-cell-image" v-if="widgetConfig.isImage" :key="item.url" :src="item.url" />
|
||||
<a v-else :key="item.url" href="javascript:void(0);" @click="downloadFile(item.url, item.name)">
|
||||
{{item.name}}
|
||||
</a>
|
||||
<template v-if="widgetConfig.isImage">
|
||||
<el-image v-for="item in uploadWidgetImpl.fileList"
|
||||
:preview-src-list="(uploadWidgetImpl.fileList || []).map(imgItem => imgItem.url)"
|
||||
class="table-cell-image" :key="item.url" :src="item.url" fit="fill">
|
||||
</el-image>
|
||||
</template>
|
||||
<a v-else v-for="item in uploadWidgetImpl.fileList" :key="item.url" href="javascript:void(0);" @click="downloadFile(item.url, item.name)">
|
||||
{{item.name}}
|
||||
</a>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -136,6 +136,7 @@ export default {
|
||||
case this.SysFlowTaskOperationType.CO_SIGN:
|
||||
case this.SysFlowTaskOperationType.MULTI_AGREE:
|
||||
case this.SysFlowTaskOperationType.MULTI_SIGN:
|
||||
case this.SysFlowTaskOperationType.SET_ASSIGNEE:
|
||||
return 'primary';
|
||||
case this.SysFlowTaskOperationType.SAVE:
|
||||
return 'success';
|
||||
@@ -150,6 +151,7 @@ export default {
|
||||
switch (type) {
|
||||
case this.SysFlowTaskOperationType.AGREE:
|
||||
case this.SysFlowTaskOperationType.MULTI_AGREE:
|
||||
case this.SysFlowTaskOperationType.SET_ASSIGNEE:
|
||||
return 'success';
|
||||
case this.SysFlowTaskOperationType.REFUSE:
|
||||
case this.SysFlowTaskOperationType.PARALLEL_REFUSE:
|
||||
|
||||
@@ -74,6 +74,7 @@ export default {
|
||||
this.$dialog.show('选择用户', TaskUserSelect, {
|
||||
area: ['1000px', '600px']
|
||||
}, {
|
||||
showAssignee: false,
|
||||
multiple: this.multiSelect
|
||||
}).then(res => {
|
||||
let assignee = null;
|
||||
@@ -88,7 +89,12 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
showAssignSelect () {
|
||||
return [this.SysFlowTaskOperationType.TRANSFER, this.SysFlowTaskOperationType.CO_SIGN, this.SysFlowTaskOperationType.MULTI_SIGN].indexOf(this.operation.type) !== -1;
|
||||
return [
|
||||
this.SysFlowTaskOperationType.TRANSFER,
|
||||
this.SysFlowTaskOperationType.CO_SIGN,
|
||||
this.SysFlowTaskOperationType.MULTI_SIGN,
|
||||
this.SysFlowTaskOperationType.SET_ASSIGNEE
|
||||
].indexOf(this.operation.type) !== -1;
|
||||
},
|
||||
multiSelect () {
|
||||
return this.operation.type === this.SysFlowTaskOperationType.CO_SIGN || this.operation.type === this.SysFlowTaskOperationType.MULTI_SIGN;
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
<el-button type="primary" size="mini" @click="setStartUser">
|
||||
流程发起人
|
||||
</el-button>
|
||||
<el-button v-if="showAssignee" type="primary" size="mini" @click="useAppointedAssignee">
|
||||
使用指定审批人
|
||||
</el-button>
|
||||
<el-button type="primary" size="mini" @click="onSubmit" :disabled="!canCommit">
|
||||
添加用户
|
||||
</el-button>
|
||||
@@ -77,6 +80,11 @@ import { SystemController } from '@/api';
|
||||
export default {
|
||||
name: 'TaskUserSelect',
|
||||
props: {
|
||||
// 是否显示指定审批人
|
||||
showAssignee: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 是否多选
|
||||
multiple: {
|
||||
type: Boolean,
|
||||
@@ -122,6 +130,12 @@ export default {
|
||||
loginName: '${startUserName}'
|
||||
});
|
||||
},
|
||||
useAppointedAssignee () {
|
||||
this.onCancel(true, {
|
||||
/* eslint-disable-next-line */
|
||||
loginName: '${appointedAssignee}'
|
||||
});
|
||||
},
|
||||
canSelect (row) {
|
||||
if (Array.isArray(this.usedUserIdList) && this.usedUserIdList.length > 0) {
|
||||
return this.usedUserIdList.indexOf(row.loginName) === -1;
|
||||
|
||||
@@ -136,10 +136,15 @@ export default {
|
||||
if (this.isOnlineForm) {
|
||||
this.$refs.workflowForm.getFormData().then(formData => {
|
||||
formData.taskVariableData = this.$refs.workflowForm.getVariableData(this.variableList);
|
||||
// 会签操作设置多实例处理人集合
|
||||
|
||||
if (operationType === this.SysFlowTaskOperationType.MULTI_SIGN) {
|
||||
// 会签操作设置多实例处理人集合
|
||||
if (formData.taskVariableData == null) formData.taskVariableData = {};
|
||||
formData.taskVariableData.assigneeList = assignee.split(',');
|
||||
} else if (operationType === this.SysFlowTaskOperationType.SET_ASSIGNEE) {
|
||||
// 设置下一个任务节点处理人
|
||||
if (formData.taskVariableData == null) formData.taskVariableData = {};
|
||||
formData.taskVariableData.appointedAssignee = assignee;
|
||||
}
|
||||
resolve(formData);
|
||||
}).catch(e => {
|
||||
|
||||
@@ -50,8 +50,8 @@ export default {
|
||||
isStart ? resolve() : reject();
|
||||
return;
|
||||
}
|
||||
// 会签或者审批操作
|
||||
if (!isStart || operation.type === this.SysFlowTaskOperationType.MULTI_SIGN) {
|
||||
// 会签、指定审批人或者审批操作
|
||||
if (!isStart || operation.type === this.SysFlowTaskOperationType.MULTI_SIGN || operation.type === this.SysFlowTaskOperationType.SET_ASSIGNEE) {
|
||||
let title = isStart ? '提交' : (operation.type === this.SysFlowTaskOperationType.CO_SIGN ? '加签' : '审批');
|
||||
this.$dialog.show(title, TaskCommit, {
|
||||
area: '500px'
|
||||
|
||||
Reference in New Issue
Block a user