!191 Merge remote-tracking branch 'yudao/dev' into dev
Merge pull request !191 from Jason/devpull/193/MERGE
commit
ce1f3735ad
|
@ -359,7 +359,8 @@ async function saveConfig() {
|
|||
currentNode.value.signEnable = configForm.value.signEnable;
|
||||
// 审批意见
|
||||
currentNode.value.reasonRequire = configForm.value.reasonRequire;
|
||||
|
||||
// 跳过表达式
|
||||
currentNode.value.skipExpression = configForm.value.skipExpression;
|
||||
currentNode.value.showText = getShowText();
|
||||
drawerApi.close();
|
||||
return true;
|
||||
|
@ -443,7 +444,8 @@ function showUserTaskNodeConfig(node: SimpleFlowNode) {
|
|||
configForm.value.signEnable = node?.signEnable ?? false;
|
||||
// 7. 审批意见
|
||||
configForm.value.reasonRequire = node?.reasonRequire ?? false;
|
||||
|
||||
// 8. 跳过表达式
|
||||
configForm.value.skipExpression = node?.skipExpression ?? '';
|
||||
drawerApi.open();
|
||||
}
|
||||
|
||||
|
@ -850,7 +852,7 @@ onMounted(() => {
|
|||
label="流程表达式"
|
||||
name="expression"
|
||||
>
|
||||
<Textarea v-model:value="configForm.expression" clearable />
|
||||
<Textarea v-model:value="configForm.expression" allow-clear />
|
||||
</FormItem>
|
||||
<!-- 多人审批/办理 方式 -->
|
||||
<FormItem :label="`多人${nodeTypeName}方式`" name="approveMethod">
|
||||
|
@ -1117,6 +1119,16 @@ onMounted(() => {
|
|||
/>
|
||||
</FormItem>
|
||||
</div>
|
||||
<div>
|
||||
<Divider content-position="left">跳过表达式</Divider>
|
||||
<FormItem prop="skipExpression">
|
||||
<Textarea
|
||||
v-model:value="configForm.skipExpression"
|
||||
allow-clear
|
||||
:rows="2"
|
||||
/>
|
||||
</FormItem>
|
||||
</div>
|
||||
</Form>
|
||||
</div>
|
||||
</TabPane>
|
||||
|
|
|
@ -602,6 +602,8 @@ export interface SimpleFlowNode {
|
|||
signEnable?: boolean;
|
||||
// 审批意见
|
||||
reasonRequire?: boolean;
|
||||
// 跳过表达式
|
||||
skipExpression?: string;
|
||||
// 触发器设置
|
||||
triggerSetting?: TriggerSetting;
|
||||
// 子流程
|
||||
|
|
|
@ -214,6 +214,7 @@ export type UserTaskFormType = {
|
|||
returnNodeId?: string;
|
||||
roleIds?: number[]; // 角色
|
||||
signEnable: boolean;
|
||||
skipExpression?: string; // 跳过表达式
|
||||
taskAssignListener?: {
|
||||
body: HttpRequestParam[];
|
||||
header: HttpRequestParam[];
|
||||
|
|
|
@ -979,11 +979,11 @@ export enum BpmTaskStatusEnum {
|
|||
* 审批通过
|
||||
*/
|
||||
APPROVE = 2,
|
||||
|
||||
/**
|
||||
* 审批通过中
|
||||
*/
|
||||
APPROVING = 7,
|
||||
|
||||
/**
|
||||
* 已取消
|
||||
*/
|
||||
|
@ -992,7 +992,6 @@ export enum BpmTaskStatusEnum {
|
|||
* 未开始
|
||||
*/
|
||||
NOT_START = -1,
|
||||
|
||||
/**
|
||||
* 审批不通过
|
||||
*/
|
||||
|
@ -1002,10 +1001,15 @@ export enum BpmTaskStatusEnum {
|
|||
* 已退回
|
||||
*/
|
||||
RETURN = 5,
|
||||
|
||||
/**
|
||||
* 审批中
|
||||
*/
|
||||
RUNNING = 1,
|
||||
/**
|
||||
* 跳过
|
||||
*/
|
||||
SKIP = -2,
|
||||
/**
|
||||
* 待审批
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { computed, provide, ref, watch } from 'vue';
|
||||
|
||||
import { CircleHelp } from '@vben/icons';
|
||||
|
||||
|
@ -146,7 +146,7 @@ function handleTaskAfterTriggerEnableChange(val: boolean | number | string) {
|
|||
: null;
|
||||
}
|
||||
|
||||
/** 表单选项 */
|
||||
/** 表单字段 */
|
||||
const formField = ref<Array<{ field: string; title: string }>>([]);
|
||||
const formFieldOptions4Title = computed(() => {
|
||||
const cloneFormField = formField.value.map((item) => {
|
||||
|
@ -178,6 +178,9 @@ const formFieldOptions4Summary = computed(() => {
|
|||
};
|
||||
});
|
||||
});
|
||||
const unParsedFormFields = ref<string[]>([]); // 未解析的表单字段
|
||||
// 暴露给子组件 HttpRequestSetting 使用
|
||||
provide('formFields', unParsedFormFields);
|
||||
|
||||
/** 兼容以前未配置更多设置的流程 */
|
||||
function initData() {
|
||||
|
@ -230,6 +233,7 @@ watch(
|
|||
const data = await FormApi.getFormDetail(newFormId);
|
||||
const result: Array<{ field: string; title: string }> = [];
|
||||
if (data.fields) {
|
||||
unParsedFormFields.value = data.fields;
|
||||
data.fields.forEach((fieldStr: string) => {
|
||||
parseFormFields(JSON.parse(fieldStr), result);
|
||||
});
|
||||
|
@ -237,6 +241,7 @@ watch(
|
|||
formField.value = result;
|
||||
} else {
|
||||
formField.value = [];
|
||||
unParsedFormFields.value = [];
|
||||
}
|
||||
},
|
||||
{ immediate: true },
|
||||
|
|
|
@ -43,6 +43,8 @@ const statusIconMap: Record<
|
|||
string,
|
||||
{ animation?: string; color: string; icon: string }
|
||||
> = {
|
||||
// 跳过
|
||||
'-2': { color: '#909398', icon: 'mdi:skip-forward-outline' },
|
||||
// 审批未开始
|
||||
'-1': { color: '#909398', icon: 'mdi:clock-outline' },
|
||||
// 待审批
|
||||
|
@ -285,7 +287,12 @@ defineExpose({ setCustomApproveUsers, batchSetCustomApproveUsers });
|
|||
>
|
||||
<!-- 第一行:节点名称、时间 -->
|
||||
<div class="flex w-full">
|
||||
<div class="font-bold">{{ activity.name }}</div>
|
||||
<div class="font-bold">
|
||||
{{ activity.name }}
|
||||
<span v-if="activity.status === BpmTaskStatusEnum.SKIP">
|
||||
【跳过】
|
||||
</span>
|
||||
</div>
|
||||
<!-- 信息:时间 -->
|
||||
<div
|
||||
v-if="activity.status !== BpmTaskStatusEnum.NOT_START"
|
||||
|
|
Loading…
Reference in New Issue