feat: [bpm][ele] 仿钉钉设计器迁移问题修复
This commit is contained in:
@@ -206,7 +206,7 @@ onMounted(() => {
|
|||||||
defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
|
defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<Drawer class="w-1/3">
|
<Drawer class="w-2/5">
|
||||||
<template #title>
|
<template #title>
|
||||||
<div class="config-header">
|
<div class="config-header">
|
||||||
<Input
|
<Input
|
||||||
|
|||||||
@@ -12,6 +12,21 @@ import { useVbenDrawer } from '@vben/common-ui';
|
|||||||
import { BpmModelFormType, BpmNodeTypeEnum } from '@vben/constants';
|
import { BpmModelFormType, BpmNodeTypeEnum } from '@vben/constants';
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
|
import {
|
||||||
|
ElCol,
|
||||||
|
ElForm,
|
||||||
|
ElFormItem,
|
||||||
|
ElInput,
|
||||||
|
ElOption,
|
||||||
|
ElRadio,
|
||||||
|
ElRadioGroup,
|
||||||
|
ElRow,
|
||||||
|
ElSelect,
|
||||||
|
ElTabPane,
|
||||||
|
ElTabs,
|
||||||
|
ElTreeSelect,
|
||||||
|
} from 'element-plus';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
CANDIDATE_STRATEGY,
|
CANDIDATE_STRATEGY,
|
||||||
CandidateStrategy,
|
CandidateStrategy,
|
||||||
@@ -190,7 +205,7 @@ onMounted(() => {
|
|||||||
defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
|
defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<Drawer class="w-1/3">
|
<Drawer class="w-2/5">
|
||||||
<template #title>
|
<template #title>
|
||||||
<div class="config-header">
|
<div class="config-header">
|
||||||
<ElInput
|
<ElInput
|
||||||
@@ -210,7 +225,7 @@ defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<ElTabs v-model="activeTabName">
|
<ElTabs v-model="activeTabName">
|
||||||
<ElTabPane :label="$t('message.copyTaskNodeConfig.copyUser')" name="user">
|
<ElTabPane label="抄送人" name="user">
|
||||||
<div>
|
<div>
|
||||||
<ElForm
|
<ElForm
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
@@ -237,27 +252,21 @@ defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
|
|||||||
</ElRadioGroup>
|
</ElRadioGroup>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
|
|
||||||
<FormItem
|
<ElFormItem
|
||||||
v-if="configForm.candidateStrategy === CandidateStrategy.ROLE"
|
v-if="configForm.candidateStrategy === CandidateStrategy.ROLE"
|
||||||
label="指定角色"
|
label="指定角色"
|
||||||
name="roleIds"
|
name="roleIds"
|
||||||
>
|
>
|
||||||
<Select
|
<ElSelect v-model="configForm.roleIds" clearable multiple>
|
||||||
v-model:value="configForm.roleIds"
|
<ElOption
|
||||||
clearable
|
|
||||||
mode="multiple"
|
|
||||||
>
|
|
||||||
<SelectOption
|
|
||||||
v-for="item in roleOptions"
|
v-for="item in roleOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id!"
|
||||||
>
|
/>
|
||||||
{{ item.name }}
|
</ElSelect>
|
||||||
</SelectOption>
|
</ElFormItem>
|
||||||
</Select>
|
<ElFormItem
|
||||||
</FormItem>
|
|
||||||
<FormItem
|
|
||||||
v-if="
|
v-if="
|
||||||
configForm.candidateStrategy ===
|
configForm.candidateStrategy ===
|
||||||
CandidateStrategy.DEPT_MEMBER ||
|
CandidateStrategy.DEPT_MEMBER ||
|
||||||
@@ -269,10 +278,10 @@ defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
|
|||||||
label="指定部门"
|
label="指定部门"
|
||||||
name="deptIds"
|
name="deptIds"
|
||||||
>
|
>
|
||||||
<TreeSelect
|
<ElTreeSelect
|
||||||
v-model:value="configForm.deptIds"
|
v-model="configForm.deptIds"
|
||||||
:tree-data="deptTreeOptions"
|
:data="deptTreeOptions"
|
||||||
:field-names="{
|
:props="{
|
||||||
label: 'name',
|
label: 'name',
|
||||||
value: 'id',
|
value: 'id',
|
||||||
children: 'children',
|
children: 'children',
|
||||||
@@ -280,92 +289,72 @@ defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
|
|||||||
empty-text="加载中,请稍候"
|
empty-text="加载中,请稍候"
|
||||||
multiple
|
multiple
|
||||||
:check-strictly="true"
|
:check-strictly="true"
|
||||||
allow-clear
|
clearable
|
||||||
tree-checkable
|
:show-checkbox="true"
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</ElFormItem>
|
||||||
<FormItem
|
<ElFormItem
|
||||||
v-if="configForm.candidateStrategy === CandidateStrategy.POST"
|
v-if="configForm.candidateStrategy === CandidateStrategy.POST"
|
||||||
label="指定岗位"
|
label="指定岗位"
|
||||||
name="postIds"
|
name="postIds"
|
||||||
>
|
>
|
||||||
<Select
|
<ElSelect v-model="configForm.postIds" clearable multiple>
|
||||||
v-model:value="configForm.postIds"
|
<ElOption
|
||||||
clearable
|
|
||||||
mode="multiple"
|
|
||||||
>
|
|
||||||
<SelectOption
|
|
||||||
v-for="item in postOptions"
|
v-for="item in postOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id!"
|
:value="item.id!"
|
||||||
>
|
/>
|
||||||
{{ item.name }}
|
</ElSelect>
|
||||||
</SelectOption>
|
</ElFormItem>
|
||||||
</Select>
|
<ElFormItem
|
||||||
</FormItem>
|
|
||||||
<FormItem
|
|
||||||
v-if="configForm.candidateStrategy === CandidateStrategy.USER"
|
v-if="configForm.candidateStrategy === CandidateStrategy.USER"
|
||||||
label="指定用户"
|
label="指定用户"
|
||||||
name="userIds"
|
name="userIds"
|
||||||
>
|
>
|
||||||
<Select
|
<ElSelect v-model="configForm.userIds" clearable multiple>
|
||||||
v-model:value="configForm.userIds"
|
<ElOption
|
||||||
clearable
|
|
||||||
mode="multiple"
|
|
||||||
>
|
|
||||||
<SelectOption
|
|
||||||
v-for="item in userOptions"
|
v-for="item in userOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.nickname"
|
:label="item.nickname"
|
||||||
:value="item.id"
|
:value="item.id!"
|
||||||
>
|
/>
|
||||||
{{ item.nickname }}
|
</ElSelect>
|
||||||
</SelectOption>
|
</ElFormItem>
|
||||||
</Select>
|
<ElFormItem
|
||||||
</FormItem>
|
|
||||||
<FormItem
|
|
||||||
v-if="
|
v-if="
|
||||||
configForm.candidateStrategy === CandidateStrategy.USER_GROUP
|
configForm.candidateStrategy === CandidateStrategy.USER_GROUP
|
||||||
"
|
"
|
||||||
label="指定用户组"
|
label="指定用户组"
|
||||||
name="userGroups"
|
name="userGroups"
|
||||||
>
|
>
|
||||||
<Select
|
<ElSelect v-model="configForm.userGroups" clearable multiple>
|
||||||
v-model:value="configForm.userGroups"
|
<ElOption
|
||||||
clearable
|
|
||||||
mode="multiple"
|
|
||||||
>
|
|
||||||
<SelectOption
|
|
||||||
v-for="item in userGroupOptions"
|
v-for="item in userGroupOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
>
|
/>
|
||||||
{{ item.name }}
|
</ElSelect>
|
||||||
</SelectOption>
|
</ElFormItem>
|
||||||
</Select>
|
<ElFormItem
|
||||||
</FormItem>
|
|
||||||
<FormItem
|
|
||||||
v-if="
|
v-if="
|
||||||
configForm.candidateStrategy === CandidateStrategy.FORM_USER
|
configForm.candidateStrategy === CandidateStrategy.FORM_USER
|
||||||
"
|
"
|
||||||
label="表单内用户字段"
|
label="表单内用户字段"
|
||||||
name="formUser"
|
name="formUser"
|
||||||
>
|
>
|
||||||
<Select v-model:value="configForm.formUser" clearable>
|
<ElSelect v-model="configForm.formUser" clearable>
|
||||||
<SelectOption
|
<ElOption
|
||||||
v-for="(item, idx) in userFieldOnFormOptions"
|
v-for="(item, idx) in userFieldOnFormOptions"
|
||||||
:key="idx"
|
:key="idx"
|
||||||
:label="item.title"
|
:label="item.title"
|
||||||
:value="item.field"
|
:value="item.field"
|
||||||
:disabled="!item.required"
|
:disabled="!item.required"
|
||||||
>
|
/>
|
||||||
{{ item.title }}
|
</ElSelect>
|
||||||
</SelectOption>
|
</ElFormItem>
|
||||||
</Select>
|
<ElFormItem
|
||||||
</FormItem>
|
|
||||||
<FormItem
|
|
||||||
v-if="
|
v-if="
|
||||||
configForm.candidateStrategy ===
|
configForm.candidateStrategy ===
|
||||||
CandidateStrategy.FORM_DEPT_LEADER
|
CandidateStrategy.FORM_DEPT_LEADER
|
||||||
@@ -373,19 +362,17 @@ defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
|
|||||||
label="表单内部门字段"
|
label="表单内部门字段"
|
||||||
name="formDept"
|
name="formDept"
|
||||||
>
|
>
|
||||||
<Select v-model:value="configForm.formDept" clearable>
|
<ElSelect v-model="configForm.formDept" clearable>
|
||||||
<SelectOption
|
<ElOption
|
||||||
v-for="(item, idx) in deptFieldOnFormOptions"
|
v-for="(item, idx) in deptFieldOnFormOptions"
|
||||||
:key="idx"
|
:key="idx"
|
||||||
:label="item.title"
|
:label="item.title"
|
||||||
:value="item.field"
|
:value="item.field"
|
||||||
:disabled="!item.required"
|
:disabled="!item.required"
|
||||||
>
|
/>
|
||||||
{{ item.title }}
|
</ElSelect>
|
||||||
</SelectOption>
|
</ElFormItem>
|
||||||
</Select>
|
<ElFormItem
|
||||||
</FormItem>
|
|
||||||
<FormItem
|
|
||||||
v-if="
|
v-if="
|
||||||
configForm.candidateStrategy ===
|
configForm.candidateStrategy ===
|
||||||
CandidateStrategy.MULTI_LEVEL_DEPT_LEADER ||
|
CandidateStrategy.MULTI_LEVEL_DEPT_LEADER ||
|
||||||
@@ -399,105 +386,84 @@ defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
|
|||||||
:label="deptLevelLabel!"
|
:label="deptLevelLabel!"
|
||||||
name="deptLevel"
|
name="deptLevel"
|
||||||
>
|
>
|
||||||
<Select v-model:value="configForm.deptLevel" clearable>
|
<ElSelect v-model="configForm.deptLevel" clearable>
|
||||||
<SelectOption
|
<ElOption
|
||||||
v-for="(item, index) in MULTI_LEVEL_DEPT"
|
v-for="(item, index) in MULTI_LEVEL_DEPT"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
>
|
/>
|
||||||
{{ item.label }}
|
</ElSelect>
|
||||||
</SelectOption>
|
</ElFormItem>
|
||||||
</Select>
|
<ElFormItem
|
||||||
</FormItem>
|
|
||||||
<FormItem
|
|
||||||
v-if="
|
v-if="
|
||||||
configForm.candidateStrategy === CandidateStrategy.EXPRESSION
|
configForm.candidateStrategy === CandidateStrategy.EXPRESSION
|
||||||
"
|
"
|
||||||
label="流程表达式"
|
label="流程表达式"
|
||||||
name="expression"
|
name="expression"
|
||||||
>
|
>
|
||||||
<Textarea v-model:value="configForm.expression" clearable />
|
<ElInput
|
||||||
</FormItem>
|
v-model="configForm.expression"
|
||||||
|
type="textarea"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</ElFormItem>
|
||||||
</ElForm>
|
</ElForm>
|
||||||
</div>
|
</div>
|
||||||
</ElTabPane>
|
</ElTabPane>
|
||||||
<ElTabPane
|
<ElTabPane
|
||||||
tab="表单字段权限"
|
label="表单字段权限"
|
||||||
key="fields"
|
name="fields"
|
||||||
v-if="formType === BpmModelFormType.NORMAL"
|
v-if="formType === BpmModelFormType.NORMAL"
|
||||||
>
|
>
|
||||||
<div class="p-1">
|
<div class="p-1">
|
||||||
<div class="mb-4 text-base font-bold">字段权限</div>
|
<div class="mb-4 text-base font-bold">字段权限</div>
|
||||||
|
|
||||||
<!-- 表头 -->
|
<!-- 表头 -->
|
||||||
<Row class="border border-gray-200 px-4 py-3">
|
<ElRow class="border border-gray-200 px-4 py-3">
|
||||||
<Col :span="8" class="font-bold">字段名称</Col>
|
<ElCol :span="8" class="font-bold">字段名称</ElCol>
|
||||||
<Col :span="16">
|
<ElCol :span="16" class="!flex">
|
||||||
<Row>
|
|
||||||
<Col :span="8" class="flex items-center justify-center">
|
|
||||||
<span
|
<span
|
||||||
class="cursor-pointer font-bold"
|
class="flex-1 cursor-pointer text-center font-bold"
|
||||||
@click="updatePermission('READ')"
|
@click="updatePermission('READ')"
|
||||||
>
|
>
|
||||||
只读
|
只读
|
||||||
</span>
|
</span>
|
||||||
</Col>
|
|
||||||
<Col :span="8" class="flex items-center justify-center">
|
|
||||||
<span
|
<span
|
||||||
class="cursor-pointer font-bold"
|
class="flex-1 cursor-pointer text-center font-bold"
|
||||||
@click="updatePermission('WRITE')"
|
@click="updatePermission('WRITE')"
|
||||||
>
|
>
|
||||||
可编辑
|
可编辑
|
||||||
</span>
|
</span>
|
||||||
</Col>
|
|
||||||
<Col :span="8" class="flex items-center justify-center">
|
|
||||||
<span
|
<span
|
||||||
class="cursor-pointer font-bold"
|
class="flex-1 cursor-pointer text-center font-bold"
|
||||||
@click="updatePermission('NONE')"
|
@click="updatePermission('NONE')"
|
||||||
>
|
>
|
||||||
隐藏
|
隐藏
|
||||||
</span>
|
</span>
|
||||||
</Col>
|
</ElCol>
|
||||||
</Row>
|
</ElRow>
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
|
|
||||||
<!-- 表格内容 -->
|
<!-- 表格内容 -->
|
||||||
<div v-for="(item, index) in fieldsPermissionConfig" :key="index">
|
<div v-for="(item, index) in fieldsPermissionConfig" :key="index">
|
||||||
<Row class="border border-t-0 border-gray-200 px-4 py-2">
|
<ElRow class="border border-t-0 border-gray-200 px-4 py-2">
|
||||||
<Col :span="8" class="flex items-center truncate">
|
<ElCol :span="8" class="flex items-center truncate">
|
||||||
{{ item.title }}
|
{{ item.title }}
|
||||||
</Col>
|
</ElCol>
|
||||||
<Col :span="16">
|
<ElCol :span="16">
|
||||||
<RadioGroup v-model:value="item.permission" class="w-full">
|
<ElRadioGroup v-model="item.permission" class="flex w-full">
|
||||||
<Row>
|
<div class="flex flex-1 justify-center">
|
||||||
<Col :span="8" class="flex items-center justify-center">
|
<ElRadio :value="FieldPermissionType.READ" />
|
||||||
<Radio
|
</div>
|
||||||
:value="FieldPermissionType.READ"
|
<div class="flex flex-1 justify-center">
|
||||||
size="large"
|
<ElRadio :value="FieldPermissionType.WRITE" disabled />
|
||||||
:label="FieldPermissionType.READ"
|
</div>
|
||||||
/>
|
<div class="flex flex-1 justify-center">
|
||||||
</Col>
|
<ElRadio :value="FieldPermissionType.NONE" />
|
||||||
<Col :span="8" class="flex items-center justify-center">
|
</div>
|
||||||
<Radio
|
</ElRadioGroup>
|
||||||
:value="FieldPermissionType.WRITE"
|
</ElCol>
|
||||||
size="large"
|
</ElRow>
|
||||||
:label="FieldPermissionType.WRITE"
|
|
||||||
disabled
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
<Col :span="8" class="flex items-center justify-center">
|
|
||||||
<Radio
|
|
||||||
:value="FieldPermissionType.NONE"
|
|
||||||
size="large"
|
|
||||||
:label="FieldPermissionType.NONE"
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
</RadioGroup>
|
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ElTabPane>
|
</ElTabPane>
|
||||||
|
|||||||
@@ -159,16 +159,18 @@ defineExpose({ validate });
|
|||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<div class="mr-4">条件组关系</div>
|
<div class="mr-4">条件组关系</div>
|
||||||
<ElSwitch
|
<ElSwitch
|
||||||
v-model:checked="condition.conditionGroups.and"
|
v-model="condition.conditionGroups.and"
|
||||||
checked-children="且"
|
active-text="且"
|
||||||
un-checked-children="或"
|
inactive-text="或"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ElSpace direction="vertical" size="small" class="w-11/12 pl-1">
|
<ElSpace
|
||||||
<template #split>
|
direction="vertical"
|
||||||
{{ condition.conditionGroups.and ? '且' : '或' }}
|
size="small"
|
||||||
</template>
|
:spacer="condition.conditionGroups.and ? '且' : '或'"
|
||||||
|
class="w-full"
|
||||||
|
>
|
||||||
<ElCard
|
<ElCard
|
||||||
class="group relative w-full hover:border-blue-500"
|
class="group relative w-full hover:border-blue-500"
|
||||||
v-for="(equation, cIdx) in condition.conditionGroups.conditions"
|
v-for="(equation, cIdx) in condition.conditionGroups.conditions"
|
||||||
@@ -193,9 +195,9 @@ defineExpose({ validate });
|
|||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div class="mr-4">规则关系</div>
|
<div class="mr-4">规则关系</div>
|
||||||
<ElSwitch
|
<ElSwitch
|
||||||
v-model:checked="equation.and"
|
v-model="equation.and"
|
||||||
checked-children="且"
|
active-text="且"
|
||||||
un-checked-children="或"
|
inactive-text="或"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -203,11 +205,12 @@ defineExpose({ validate });
|
|||||||
|
|
||||||
<ElRow
|
<ElRow
|
||||||
:gutter="8"
|
:gutter="8"
|
||||||
|
align="middle"
|
||||||
class="mb-2"
|
class="mb-2"
|
||||||
v-for="(rule, rIdx) in equation.rules"
|
v-for="(rule, rIdx) in equation.rules"
|
||||||
:key="rIdx"
|
:key="rIdx"
|
||||||
>
|
>
|
||||||
<ElCol :span="8">
|
<ElCol :span="7">
|
||||||
<ElFormItem
|
<ElFormItem
|
||||||
:name="[
|
:name="[
|
||||||
'conditionGroups',
|
'conditionGroups',
|
||||||
@@ -225,7 +228,7 @@ defineExpose({ validate });
|
|||||||
>
|
>
|
||||||
<ElSelect
|
<ElSelect
|
||||||
v-model="rule.leftSide"
|
v-model="rule.leftSide"
|
||||||
allow-clear
|
clearable
|
||||||
placeholder="请选择表单字段"
|
placeholder="请选择表单字段"
|
||||||
>
|
>
|
||||||
<ElOption
|
<ElOption
|
||||||
@@ -236,7 +239,7 @@ defineExpose({ validate });
|
|||||||
:disabled="!field.required"
|
:disabled="!field.required"
|
||||||
>
|
>
|
||||||
<ElTooltip
|
<ElTooltip
|
||||||
title="表单字段非必填时不能作为流程分支条件"
|
content="表单字段非必填时不能作为流程分支条件"
|
||||||
placement="right"
|
placement="right"
|
||||||
v-if="!field.required"
|
v-if="!field.required"
|
||||||
>
|
>
|
||||||
@@ -247,7 +250,8 @@ defineExpose({ validate });
|
|||||||
</ElSelect>
|
</ElSelect>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
</ElCol>
|
</ElCol>
|
||||||
<ElCol :span="6">
|
<ElCol :span="5">
|
||||||
|
<ElFormItem>
|
||||||
<ElSelect v-model="rule.opCode" placeholder="请选择操作符">
|
<ElSelect v-model="rule.opCode" placeholder="请选择操作符">
|
||||||
<ElOption
|
<ElOption
|
||||||
v-for="operator in COMPARISON_OPERATORS"
|
v-for="operator in COMPARISON_OPERATORS"
|
||||||
@@ -258,8 +262,9 @@ defineExpose({ validate });
|
|||||||
{{ operator.label }}
|
{{ operator.label }}
|
||||||
</ElOption>
|
</ElOption>
|
||||||
</ElSelect>
|
</ElSelect>
|
||||||
|
</ElFormItem>
|
||||||
</ElCol>
|
</ElCol>
|
||||||
<ElCol :span="7">
|
<ElCol :span="9">
|
||||||
<ElFormItem
|
<ElFormItem
|
||||||
:name="[
|
:name="[
|
||||||
'conditionGroups',
|
'conditionGroups',
|
||||||
@@ -279,7 +284,7 @@ defineExpose({ validate });
|
|||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
</ElCol>
|
</ElCol>
|
||||||
<ElCol :span="3">
|
<ElCol :span="3">
|
||||||
<div class="flex h-8 items-center">
|
<div class="flex items-center">
|
||||||
<Trash2
|
<Trash2
|
||||||
v-if="equation.rules.length > 1"
|
v-if="equation.rules.length > 1"
|
||||||
class="mr-2 size-4 cursor-pointer text-red-500"
|
class="mr-2 size-4 cursor-pointer text-red-500"
|
||||||
@@ -294,11 +299,12 @@ defineExpose({ validate });
|
|||||||
</ElRow>
|
</ElRow>
|
||||||
</ElCard>
|
</ElCard>
|
||||||
</ElSpace>
|
</ElSpace>
|
||||||
<div title="添加条件组" class="mt-4 cursor-pointer">
|
<div
|
||||||
<Plus
|
class="mt-4 flex cursor-pointer items-center text-blue-500 hover:text-blue-600"
|
||||||
class="size-6 text-blue-500"
|
|
||||||
@click="addConditionGroup(condition.conditionGroups?.conditions)"
|
@click="addConditionGroup(condition.conditionGroups?.conditions)"
|
||||||
/>
|
>
|
||||||
|
<Plus class="mr-1 size-5" />
|
||||||
|
<span>添加条件组</span>
|
||||||
</div>
|
</div>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem
|
<ElFormItem
|
||||||
@@ -308,9 +314,10 @@ defineExpose({ validate });
|
|||||||
>
|
>
|
||||||
<ElInput
|
<ElInput
|
||||||
v-model="condition.conditionExpression"
|
v-model="condition.conditionExpression"
|
||||||
|
type="textarea"
|
||||||
placeholder="请输入条件表达式"
|
placeholder="请输入条件表达式"
|
||||||
allow-clear
|
clearable
|
||||||
:auto-size="{ minRows: 3, maxRows: 6 }"
|
:autosize="{ minRows: 3, maxRows: 6 }"
|
||||||
/>
|
/>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
</ElForm>
|
</ElForm>
|
||||||
|
|||||||
@@ -5,11 +5,9 @@ import { IconifyIcon } from '@vben/icons';
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
ElButton,
|
ElButton,
|
||||||
ElCol,
|
|
||||||
ElFormItem,
|
ElFormItem,
|
||||||
ElInput,
|
ElInput,
|
||||||
ElOption,
|
ElOption,
|
||||||
ElRow,
|
|
||||||
ElSelect,
|
ElSelect,
|
||||||
} from 'element-plus';
|
} from 'element-plus';
|
||||||
|
|
||||||
@@ -57,8 +55,13 @@ function deleteHttpRequestParam(arr: HttpRequestParam[], index: number) {
|
|||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<ElFormItem label="请求头">
|
<ElFormItem label="请求头">
|
||||||
<ElRow :gutter="8" v-for="(item, index) in props.header" :key="index">
|
<div
|
||||||
<ElCol :span="7">
|
v-for="(item, index) in props.header"
|
||||||
|
:key="index"
|
||||||
|
class="mb-2 flex items-center gap-2"
|
||||||
|
>
|
||||||
|
<!-- 参数名 -->
|
||||||
|
<div class="w-[26%] min-w-32 shrink-0">
|
||||||
<ElFormItem
|
<ElFormItem
|
||||||
:name="[bind, 'header', index, 'key']"
|
:name="[bind, 'header', index, 'key']"
|
||||||
:rules="{
|
:rules="{
|
||||||
@@ -69,20 +72,24 @@ function deleteHttpRequestParam(arr: HttpRequestParam[], index: number) {
|
|||||||
>
|
>
|
||||||
<ElInput placeholder="参数名不能为空" v-model="item.key" />
|
<ElInput placeholder="参数名不能为空" v-model="item.key" />
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
</ElCol>
|
</div>
|
||||||
<ElCol :span="5">
|
|
||||||
|
<!-- 类型选择 -->
|
||||||
|
<div class="w-[24%] min-w-11 shrink-0">
|
||||||
|
<ElFormItem class="w-full">
|
||||||
<ElSelect v-model="item.type">
|
<ElSelect v-model="item.type">
|
||||||
<ElOption
|
<ElOption
|
||||||
v-for="types in BPM_HTTP_REQUEST_PARAM_TYPES"
|
v-for="types in BPM_HTTP_REQUEST_PARAM_TYPES"
|
||||||
:key="types.value"
|
:key="types.value"
|
||||||
:label="types.label"
|
:label="types.label"
|
||||||
:value="types.value"
|
:value="types.value"
|
||||||
>
|
/>
|
||||||
{{ types.label }}
|
|
||||||
</ElOption>
|
|
||||||
</ElSelect>
|
</ElSelect>
|
||||||
</ElCol>
|
</ElFormItem>
|
||||||
<ElCol :span="10">
|
</div>
|
||||||
|
|
||||||
|
<!-- 参数值 -->
|
||||||
|
<div class="w-[42%] flex-1">
|
||||||
<ElFormItem
|
<ElFormItem
|
||||||
:name="[bind, 'header', index, 'value']"
|
:name="[bind, 'header', index, 'value']"
|
||||||
:rules="{
|
:rules="{
|
||||||
@@ -103,7 +110,11 @@ function deleteHttpRequestParam(arr: HttpRequestParam[], index: number) {
|
|||||||
}"
|
}"
|
||||||
v-if="item.type === BpmHttpRequestParamTypeEnum.FROM_FORM"
|
v-if="item.type === BpmHttpRequestParamTypeEnum.FROM_FORM"
|
||||||
>
|
>
|
||||||
<ElSelect v-model="item.value" placeholder="请选择表单字段">
|
<ElSelect
|
||||||
|
class="min-w-36"
|
||||||
|
v-model="item.value"
|
||||||
|
placeholder="请选择表单字段"
|
||||||
|
>
|
||||||
<ElOption
|
<ElOption
|
||||||
v-for="(field, fIdx) in formFieldOptions"
|
v-for="(field, fIdx) in formFieldOptions"
|
||||||
:key="fIdx"
|
:key="fIdx"
|
||||||
@@ -115,17 +126,17 @@ function deleteHttpRequestParam(arr: HttpRequestParam[], index: number) {
|
|||||||
</ElOption>
|
</ElOption>
|
||||||
</ElSelect>
|
</ElSelect>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
</ElCol>
|
</div>
|
||||||
<ElCol :span="2">
|
|
||||||
<div class="flex h-8 items-center">
|
<!-- 删除按钮 -->
|
||||||
|
<div class="flex w-[8%] shrink-0 items-center">
|
||||||
<IconifyIcon
|
<IconifyIcon
|
||||||
class="size-4 cursor-pointer text-red-500"
|
class="size-4 cursor-pointer text-red-500"
|
||||||
icon="lucide:trash-2"
|
icon="lucide:trash-2"
|
||||||
@click="deleteHttpRequestParam(props.header, index)"
|
@click="deleteHttpRequestParam(props.header, index)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</ElCol>
|
</div>
|
||||||
</ElRow>
|
|
||||||
<ElButton
|
<ElButton
|
||||||
link
|
link
|
||||||
@click="addHttpRequestParam(props.header)"
|
@click="addHttpRequestParam(props.header)"
|
||||||
@@ -138,8 +149,13 @@ function deleteHttpRequestParam(arr: HttpRequestParam[], index: number) {
|
|||||||
</ElButton>
|
</ElButton>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem label="请求体">
|
<ElFormItem label="请求体">
|
||||||
<ElRow :gutter="8" v-for="(item, index) in props.body" :key="index">
|
<div
|
||||||
<ElCol :span="7">
|
v-for="(item, index) in props.body"
|
||||||
|
:key="index"
|
||||||
|
class="mb-2 flex items-center gap-2"
|
||||||
|
>
|
||||||
|
<!-- 参数名 -->
|
||||||
|
<div class="w-[26%] min-w-32 shrink-0">
|
||||||
<ElFormItem
|
<ElFormItem
|
||||||
:name="[bind, 'body', index, 'key']"
|
:name="[bind, 'body', index, 'key']"
|
||||||
:rules="{
|
:rules="{
|
||||||
@@ -150,20 +166,24 @@ function deleteHttpRequestParam(arr: HttpRequestParam[], index: number) {
|
|||||||
>
|
>
|
||||||
<ElInput placeholder="参数名" v-model="item.key" />
|
<ElInput placeholder="参数名" v-model="item.key" />
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
</ElCol>
|
</div>
|
||||||
<ElCol :span="5">
|
|
||||||
|
<!-- 类型选择 -->
|
||||||
|
<div class="w-[24%] min-w-11 shrink-0">
|
||||||
|
<ElFormItem>
|
||||||
<ElSelect v-model="item.type">
|
<ElSelect v-model="item.type">
|
||||||
<ElOption
|
<ElOption
|
||||||
v-for="types in BPM_HTTP_REQUEST_PARAM_TYPES"
|
v-for="types in BPM_HTTP_REQUEST_PARAM_TYPES"
|
||||||
:key="types.value"
|
:key="types.value"
|
||||||
:label="types.label"
|
:label="types.label"
|
||||||
:value="types.value"
|
:value="types.value"
|
||||||
>
|
/>
|
||||||
{{ types.label }}
|
|
||||||
</ElOption>
|
|
||||||
</ElSelect>
|
</ElSelect>
|
||||||
</ElCol>
|
</ElFormItem>
|
||||||
<ElCol :span="10">
|
</div>
|
||||||
|
|
||||||
|
<!-- 参数值 -->
|
||||||
|
<div class="w-[42%] flex-1">
|
||||||
<ElFormItem
|
<ElFormItem
|
||||||
:name="[bind, 'body', index, 'value']"
|
:name="[bind, 'body', index, 'value']"
|
||||||
:rules="{
|
:rules="{
|
||||||
@@ -171,7 +191,7 @@ function deleteHttpRequestParam(arr: HttpRequestParam[], index: number) {
|
|||||||
message: '参数值不能为空',
|
message: '参数值不能为空',
|
||||||
trigger: ['blur', 'change'],
|
trigger: ['blur', 'change'],
|
||||||
}"
|
}"
|
||||||
v-if="item.type === BpmHttpRequestParamTypeEnum.FIXED_VALUE"
|
v-show="item.type === BpmHttpRequestParamTypeEnum.FIXED_VALUE"
|
||||||
>
|
>
|
||||||
<ElInput placeholder="参数值" v-model="item.value" />
|
<ElInput placeholder="参数值" v-model="item.value" />
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
@@ -182,9 +202,13 @@ function deleteHttpRequestParam(arr: HttpRequestParam[], index: number) {
|
|||||||
message: '参数值不能为空',
|
message: '参数值不能为空',
|
||||||
trigger: 'change',
|
trigger: 'change',
|
||||||
}"
|
}"
|
||||||
v-if="item.type === BpmHttpRequestParamTypeEnum.FROM_FORM"
|
v-show="item.type === BpmHttpRequestParamTypeEnum.FROM_FORM"
|
||||||
|
>
|
||||||
|
<ElSelect
|
||||||
|
class="min-w-36"
|
||||||
|
v-model="item.value"
|
||||||
|
placeholder="请选择表单字段"
|
||||||
>
|
>
|
||||||
<ElSelect v-model="item.value" placeholder="请选择表单字段">
|
|
||||||
<ElOption
|
<ElOption
|
||||||
v-for="(field, fIdx) in formFieldOptions"
|
v-for="(field, fIdx) in formFieldOptions"
|
||||||
:key="fIdx"
|
:key="fIdx"
|
||||||
@@ -196,17 +220,17 @@ function deleteHttpRequestParam(arr: HttpRequestParam[], index: number) {
|
|||||||
</ElOption>
|
</ElOption>
|
||||||
</ElSelect>
|
</ElSelect>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
</ElCol>
|
</div>
|
||||||
<ElCol :span="2">
|
|
||||||
<div class="flex h-8 items-center">
|
<!-- 删除按钮 -->
|
||||||
|
<div class="flex w-[8%] shrink-0 items-center">
|
||||||
<IconifyIcon
|
<IconifyIcon
|
||||||
class="size-4 cursor-pointer text-red-500"
|
class="size-4 cursor-pointer text-red-500"
|
||||||
icon="lucide:trash-2"
|
icon="lucide:trash-2"
|
||||||
@click="deleteHttpRequestParam(props.body, index)"
|
@click="deleteHttpRequestParam(props.body, index)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</ElCol>
|
</div>
|
||||||
</ElRow>
|
|
||||||
<ElButton
|
<ElButton
|
||||||
link
|
link
|
||||||
@click="addHttpRequestParam(props.body)"
|
@click="addHttpRequestParam(props.body)"
|
||||||
|
|||||||
@@ -218,35 +218,27 @@ defineExpose({ showStartUserNodeConfig });
|
|||||||
<!-- 表头 -->
|
<!-- 表头 -->
|
||||||
<ElRow class="border border-gray-200 px-4 py-3">
|
<ElRow class="border border-gray-200 px-4 py-3">
|
||||||
<ElCol :span="8" class="font-bold">字段名称</ElCol>
|
<ElCol :span="8" class="font-bold">字段名称</ElCol>
|
||||||
<ElCol :span="16">
|
<ElCol :span="16" class="!flex">
|
||||||
<ElRow>
|
|
||||||
<ElCol :span="8" class="flex items-center justify-center">
|
|
||||||
<span
|
<span
|
||||||
class="cursor-pointer font-bold"
|
class="flex-1 cursor-pointer text-center font-bold"
|
||||||
@click="updatePermission('READ')"
|
@click="updatePermission('READ')"
|
||||||
>
|
>
|
||||||
只读
|
只读
|
||||||
</span>
|
</span>
|
||||||
</ElCol>
|
|
||||||
<ElCol :span="8" class="flex items-center justify-center">
|
|
||||||
<span
|
<span
|
||||||
class="cursor-pointer font-bold"
|
class="flex-1 cursor-pointer text-center font-bold"
|
||||||
@click="updatePermission('WRITE')"
|
@click="updatePermission('WRITE')"
|
||||||
>
|
>
|
||||||
可编辑
|
可编辑
|
||||||
</span>
|
</span>
|
||||||
</ElCol>
|
|
||||||
<ElCol :span="8" class="flex items-center justify-center">
|
|
||||||
<span
|
<span
|
||||||
class="cursor-pointer font-bold"
|
class="flex-1 cursor-pointer text-center font-bold"
|
||||||
@click="updatePermission('NONE')"
|
@click="updatePermission('NONE')"
|
||||||
>
|
>
|
||||||
隐藏
|
隐藏
|
||||||
</span>
|
</span>
|
||||||
</ElCol>
|
</ElCol>
|
||||||
</ElRow>
|
</ElRow>
|
||||||
</ElCol>
|
|
||||||
</ElRow>
|
|
||||||
|
|
||||||
<!-- 表格内容 -->
|
<!-- 表格内容 -->
|
||||||
<div v-for="(item, index) in fieldsPermissionConfig" :key="index">
|
<div v-for="(item, index) in fieldsPermissionConfig" :key="index">
|
||||||
@@ -255,18 +247,16 @@ defineExpose({ showStartUserNodeConfig });
|
|||||||
{{ item.title }}
|
{{ item.title }}
|
||||||
</ElCol>
|
</ElCol>
|
||||||
<ElCol :span="16">
|
<ElCol :span="16">
|
||||||
<ElRadioGroup v-model="item.permission" class="w-full">
|
<ElRadioGroup v-model="item.permission" class="flex w-full">
|
||||||
<ElRow>
|
<div class="flex flex-1 justify-center">
|
||||||
<ElCol :span="8" class="flex items-center justify-center">
|
|
||||||
<ElRadio :value="FieldPermissionType.READ" />
|
<ElRadio :value="FieldPermissionType.READ" />
|
||||||
</ElCol>
|
</div>
|
||||||
<ElCol :span="8" class="flex items-center justify-center">
|
<div class="flex flex-1 justify-center">
|
||||||
<ElRadio :value="FieldPermissionType.WRITE" />
|
<ElRadio :value="FieldPermissionType.WRITE" />
|
||||||
</ElCol>
|
</div>
|
||||||
<ElCol :span="8" class="flex items-center justify-center">
|
<div class="flex flex-1 justify-center">
|
||||||
<ElRadio :value="FieldPermissionType.NONE" />
|
<ElRadio :value="FieldPermissionType.NONE" />
|
||||||
</ElCol>
|
</div>
|
||||||
</ElRow>
|
|
||||||
</ElRadioGroup>
|
</ElRadioGroup>
|
||||||
</ElCol>
|
</ElCol>
|
||||||
</ElRow>
|
</ElRow>
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ import {
|
|||||||
ElSwitch,
|
ElSwitch,
|
||||||
ElTabPane,
|
ElTabPane,
|
||||||
ElTabs,
|
ElTabs,
|
||||||
ElText,
|
|
||||||
ElTreeSelect,
|
ElTreeSelect,
|
||||||
} from 'element-plus';
|
} from 'element-plus';
|
||||||
|
|
||||||
@@ -927,29 +926,19 @@ onMounted(() => {
|
|||||||
<ElFormItem
|
<ElFormItem
|
||||||
label="超时时间设置"
|
label="超时时间设置"
|
||||||
v-if="configForm.timeoutHandlerEnable"
|
v-if="configForm.timeoutHandlerEnable"
|
||||||
class="h-8"
|
|
||||||
>
|
>
|
||||||
<ElRow>
|
<div class="flex items-center gap-2">
|
||||||
<ElCol>
|
<span class="text-sm">当超时</span>
|
||||||
<ElText class="mr-2 mt-2 inline-flex text-sm">
|
<ElFormItem name="timeDuration" class="!mb-0">
|
||||||
当超时
|
|
||||||
</ElText>
|
|
||||||
</ElCol>
|
|
||||||
<ElCol>
|
|
||||||
<ElFormItem name="timeDuration">
|
|
||||||
<ElInputNumber
|
<ElInputNumber
|
||||||
class="mr-2 mt-0.5"
|
|
||||||
v-model="configForm.timeDuration"
|
v-model="configForm.timeDuration"
|
||||||
:min="1"
|
:min="1"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
/>
|
/>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
</ElCol>
|
|
||||||
<ElCol>
|
|
||||||
<ElSelect
|
<ElSelect
|
||||||
v-model="timeUnit"
|
v-model="timeUnit"
|
||||||
class="mr-2"
|
class="!w-24"
|
||||||
:style="{ width: '100px' }"
|
|
||||||
@change="timeUnitChange"
|
@change="timeUnitChange"
|
||||||
>
|
>
|
||||||
<ElOption
|
<ElOption
|
||||||
@@ -959,11 +948,8 @@ onMounted(() => {
|
|||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</ElSelect>
|
</ElSelect>
|
||||||
<ElText class="mr-2 mt-2 inline-flex text-sm">
|
<span class="text-sm">未处理</span>
|
||||||
未处理
|
</div>
|
||||||
</ElText>
|
|
||||||
</ElCol>
|
|
||||||
</ElRow>
|
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem
|
<ElFormItem
|
||||||
label="最大提醒次数"
|
label="最大提醒次数"
|
||||||
@@ -1135,35 +1121,27 @@ onMounted(() => {
|
|||||||
<!-- 表头 -->
|
<!-- 表头 -->
|
||||||
<ElRow class="border border-gray-200 px-4 py-3">
|
<ElRow class="border border-gray-200 px-4 py-3">
|
||||||
<ElCol :span="8" class="font-bold">字段名称</ElCol>
|
<ElCol :span="8" class="font-bold">字段名称</ElCol>
|
||||||
<ElCol :span="16">
|
<ElCol :span="16" class="!flex">
|
||||||
<ElRow>
|
|
||||||
<ElCol :span="8" class="flex items-center justify-center">
|
|
||||||
<span
|
<span
|
||||||
class="cursor-pointer font-bold"
|
class="flex-1 cursor-pointer text-center font-bold"
|
||||||
@click="updatePermission('READ')"
|
@click="updatePermission('READ')"
|
||||||
>
|
>
|
||||||
只读
|
只读
|
||||||
</span>
|
</span>
|
||||||
</ElCol>
|
|
||||||
<ElCol :span="8" class="flex items-center justify-center">
|
|
||||||
<span
|
<span
|
||||||
class="cursor-pointer font-bold"
|
class="flex-1 cursor-pointer text-center font-bold"
|
||||||
@click="updatePermission('WRITE')"
|
@click="updatePermission('WRITE')"
|
||||||
>
|
>
|
||||||
可编<E58FAF>?
|
可编辑
|
||||||
</span>
|
</span>
|
||||||
</ElCol>
|
|
||||||
<ElCol :span="8" class="flex items-center justify-center">
|
|
||||||
<span
|
<span
|
||||||
class="cursor-pointer font-bold"
|
class="flex-1 cursor-pointer text-center font-bold"
|
||||||
@click="updatePermission('NONE')"
|
@click="updatePermission('NONE')"
|
||||||
>
|
>
|
||||||
隐藏
|
隐藏
|
||||||
</span>
|
</span>
|
||||||
</ElCol>
|
</ElCol>
|
||||||
</ElRow>
|
</ElRow>
|
||||||
</ElCol>
|
|
||||||
</ElRow>
|
|
||||||
|
|
||||||
<!-- 表格内容 -->
|
<!-- 表格内容 -->
|
||||||
<div v-for="(item, index) in fieldsPermissionConfig" :key="index">
|
<div v-for="(item, index) in fieldsPermissionConfig" :key="index">
|
||||||
@@ -1172,18 +1150,16 @@ onMounted(() => {
|
|||||||
{{ item.title }}
|
{{ item.title }}
|
||||||
</ElCol>
|
</ElCol>
|
||||||
<ElCol :span="16">
|
<ElCol :span="16">
|
||||||
<ElRadioGroup v-model="item.permission" class="w-full">
|
<ElRadioGroup v-model="item.permission" class="flex w-full">
|
||||||
<ElRow>
|
<div class="flex flex-1 justify-center">
|
||||||
<ElCol :span="8" class="flex items-center justify-center">
|
|
||||||
<ElRadio :value="FieldPermissionType.READ" />
|
<ElRadio :value="FieldPermissionType.READ" />
|
||||||
</ElCol>
|
</div>
|
||||||
<ElCol :span="8" class="flex items-center justify-center">
|
<div class="flex flex-1 justify-center">
|
||||||
<ElRadio :value="FieldPermissionType.WRITE" />
|
<ElRadio :value="FieldPermissionType.WRITE" />
|
||||||
</ElCol>
|
</div>
|
||||||
<ElCol :span="8" class="flex items-center justify-center">
|
<div class="flex flex-1 justify-center">
|
||||||
<ElRadio :value="FieldPermissionType.NONE" />
|
<ElRadio :value="FieldPermissionType.NONE" />
|
||||||
</ElCol>
|
</div>
|
||||||
</ElRow>
|
|
||||||
</ElRadioGroup>
|
</ElRadioGroup>
|
||||||
</ElCol>
|
</ElCol>
|
||||||
</ElRow>
|
</ElRow>
|
||||||
|
|||||||
Reference in New Issue
Block a user