Merge remote-tracking branch 'yudao/master' into master-fix
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<!-- 部门选择器 - 树形结构显示 (Ant Design Vue 版本) -->
|
<!-- 部门选择器 - 树形结构显示 -->
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref, watch } from 'vue';
|
import { onMounted, ref, watch } from 'vue';
|
||||||
|
|
||||||
@@ -26,7 +26,8 @@ const emit = defineEmits<{
|
|||||||
): void;
|
): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
// 部门数据接口
|
// todo @puhui999:是不是可以简化,使用 api 的;
|
||||||
|
/** 部门数据接口 */
|
||||||
interface DeptVO {
|
interface DeptVO {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
@@ -38,7 +39,8 @@ interface DeptVO {
|
|||||||
status?: number;
|
status?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 接受父组件参数
|
// TODO @puhui999:linter 报错;
|
||||||
|
/** 接受父组件参数 */
|
||||||
interface Props {
|
interface Props {
|
||||||
modelValue?: number | number[] | string | string[];
|
modelValue?: number | number[] | string | string[];
|
||||||
multiple?: boolean;
|
multiple?: boolean;
|
||||||
@@ -49,14 +51,11 @@ interface Props {
|
|||||||
formCreateInject?: any;
|
formCreateInject?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 部门树形数据
|
const deptTree = ref<any[]>([]); // 部门树形数据
|
||||||
const deptTree = ref<any[]>([]);
|
const deptList = ref<DeptVO[]>([]); // 原始部门列表(用于 returnType='name' 时查找名称)
|
||||||
// 原始部门列表(用于 returnType='name' 时查找名称)
|
const selectedValue = ref<number | number[] | undefined>(); // 当前选中值
|
||||||
const deptList = ref<DeptVO[]>([]);
|
|
||||||
// 当前选中值
|
|
||||||
const selectedValue = ref<number | number[] | undefined>();
|
|
||||||
|
|
||||||
// 加载部门树形数据
|
/** 加载部门树形数据 */
|
||||||
async function loadDeptTree(): Promise<void> {
|
async function loadDeptTree(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const data = await requestClient.get<DeptVO[]>('/system/dept/simple-list');
|
const data = await requestClient.get<DeptVO[]>('/system/dept/simple-list');
|
||||||
@@ -68,22 +67,22 @@ async function loadDeptTree(): Promise<void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据 ID 获取部门名称
|
/** 根据 ID 获取部门名称 */
|
||||||
function getDeptNameById(id: number): string | undefined {
|
function getDeptNameById(id: number): string | undefined {
|
||||||
const dept = deptList.value.find((item) => item.id === id);
|
const dept = deptList.value.find((item: DeptVO) => item.id === id);
|
||||||
if (!dept) {
|
if (!dept) {
|
||||||
console.warn(`[DeptSelect] 未找到 ID 为 ${id} 的部门`);
|
console.warn(`[DeptSelect] 未找到 ID 为 ${id} 的部门`);
|
||||||
}
|
}
|
||||||
return dept?.name;
|
return dept?.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据名称获取部门 ID
|
/** 根据名称获取部门 ID */
|
||||||
function getDeptIdByName(name: string): number | undefined {
|
function getDeptIdByName(name: string): number | undefined {
|
||||||
const dept = deptList.value.find((item) => item.name === name);
|
const dept = deptList.value.find((item: DeptVO) => item.name === name);
|
||||||
return dept?.id;
|
return dept?.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理选中值变化
|
/** 处理选中值变化 */
|
||||||
function handleChange(value: number | number[] | undefined): void {
|
function handleChange(value: number | number[] | undefined): void {
|
||||||
if (value === undefined || value === null) {
|
if (value === undefined || value === null) {
|
||||||
emit('update:modelValue', props.multiple ? [] : undefined);
|
emit('update:modelValue', props.multiple ? [] : undefined);
|
||||||
@@ -106,13 +105,13 @@ function handleChange(value: number | number[] | undefined): void {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 树节点过滤方法(支持搜索过滤)
|
/** 树节点过滤方法(支持搜索过滤) */
|
||||||
function filterTreeNode(inputValue: string, treeNode: any): boolean {
|
function filterTreeNode(inputValue: string, treeNode: any): boolean {
|
||||||
if (!inputValue) return true;
|
if (!inputValue) return true;
|
||||||
return treeNode.name?.toLowerCase().includes(inputValue.toLowerCase());
|
return treeNode.name?.toLowerCase().includes(inputValue.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
// 同步 modelValue 到内部选中值
|
/** 同步 modelValue 到内部选中值 */
|
||||||
function syncSelectedValue(): void {
|
function syncSelectedValue(): void {
|
||||||
const newValue = props.modelValue;
|
const newValue = props.modelValue;
|
||||||
if (newValue === undefined || newValue === null) {
|
if (newValue === undefined || newValue === null) {
|
||||||
@@ -127,26 +126,24 @@ function syncSelectedValue(): void {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (props.multiple && Array.isArray(newValue)) {
|
if (props.multiple && Array.isArray(newValue)) {
|
||||||
const ids = (newValue as string[])
|
selectedValue.value = (newValue as string[])
|
||||||
.map((name) => getDeptIdByName(name))
|
.map((name) => getDeptIdByName(name))
|
||||||
.filter(Boolean) as number[];
|
.filter(Boolean) as number[];
|
||||||
selectedValue.value = ids;
|
|
||||||
} else if (!props.multiple && typeof newValue === 'string') {
|
} else if (!props.multiple && typeof newValue === 'string') {
|
||||||
const id = getDeptIdByName(newValue);
|
selectedValue.value = getDeptIdByName(newValue);
|
||||||
selectedValue.value = id;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
selectedValue.value = newValue as number | number[];
|
selectedValue.value = newValue as number | number[];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 监听 modelValue 变化,同步到内部选中值
|
/** 监听 modelValue 变化,同步到内部选中值 */
|
||||||
watch(() => props.modelValue, syncSelectedValue, { immediate: true });
|
watch(() => props.modelValue, syncSelectedValue, { immediate: true });
|
||||||
|
|
||||||
// 监听 deptList 变化,重新同步选中值(解决数据加载完成后的回显问题)
|
/** 监听 deptList 变化,重新同步选中值(解决数据加载完成后的回显问题) */
|
||||||
watch(() => deptList.value, syncSelectedValue);
|
watch(() => deptList.value, syncSelectedValue);
|
||||||
|
|
||||||
// 检查是否有有效的预设值
|
/** 检查是否有有效的预设值 */
|
||||||
function hasValidPresetValue(): boolean {
|
function hasValidPresetValue(): boolean {
|
||||||
const value = props.modelValue;
|
const value = props.modelValue;
|
||||||
if (value === undefined || value === null || value === '') {
|
if (value === undefined || value === null || value === '') {
|
||||||
@@ -158,13 +155,12 @@ function hasValidPresetValue(): boolean {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置默认值(当前用户部门)
|
/** 设置默认值(当前用户部门) */
|
||||||
function setDefaultValue(): void {
|
function setDefaultValue(): void {
|
||||||
// 仅当 defaultCurrentDept 为 true 时处理
|
// 仅当 defaultCurrentDept 为 true 时处理
|
||||||
if (!props.defaultCurrentDept) {
|
if (!props.defaultCurrentDept) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查是否已有预设值(预设值优先级高于默认当前部门)
|
// 检查是否已有预设值(预设值优先级高于默认当前部门)
|
||||||
if (hasValidPresetValue()) {
|
if (hasValidPresetValue()) {
|
||||||
return;
|
return;
|
||||||
@@ -173,7 +169,6 @@ function setDefaultValue(): void {
|
|||||||
// 获取当前用户的部门 ID
|
// 获取当前用户的部门 ID
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const deptId = userStore.userInfo?.deptId as number | undefined;
|
const deptId = userStore.userInfo?.deptId as number | undefined;
|
||||||
|
|
||||||
// 处理 deptId 为空或 0 的边界情况
|
// 处理 deptId 为空或 0 的边界情况
|
||||||
if (!deptId || deptId === 0) {
|
if (!deptId || deptId === 0) {
|
||||||
return;
|
return;
|
||||||
@@ -184,7 +179,7 @@ function setDefaultValue(): void {
|
|||||||
emit('update:modelValue', defaultValue);
|
emit('update:modelValue', defaultValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 组件挂载时加载数据并设置默认值
|
/** 组件挂载时加载数据并设置默认值 */
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await loadDeptTree();
|
await loadDeptTree();
|
||||||
// 数据加载完成后设置默认值
|
// 数据加载完成后设置默认值
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ export async function useFormCreateDesigner(designer: Ref) {
|
|||||||
type: 'switch',
|
type: 'switch',
|
||||||
field: 'defaultCurrentUser',
|
field: 'defaultCurrentUser',
|
||||||
title: '默认选中当前用户',
|
title: '默认选中当前用户',
|
||||||
value: true,
|
value: false,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
@@ -223,7 +223,7 @@ export async function useFormCreateDesigner(designer: Ref) {
|
|||||||
type: 'switch',
|
type: 'switch',
|
||||||
field: 'defaultCurrentDept',
|
field: 'defaultCurrentDept',
|
||||||
title: '默认选中当前部门',
|
title: '默认选中当前部门',
|
||||||
value: true,
|
value: false,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- 部门选择器 - 树形结构显示 (Element Plus 版本) -->
|
<!-- 部门选择器 - 树形结构显示 -->
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref, watch } from 'vue';
|
import { onMounted, ref, watch } from 'vue';
|
||||||
|
|
||||||
@@ -26,7 +26,8 @@ const emit = defineEmits<{
|
|||||||
): void;
|
): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
// 部门数据接口
|
// todo @puhui999:是不是可以简化,使用 api 的;
|
||||||
|
/** 部门数据接口 */
|
||||||
interface DeptVO {
|
interface DeptVO {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
@@ -38,7 +39,8 @@ interface DeptVO {
|
|||||||
status?: number;
|
status?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 接受父组件参数
|
// TODO @puhui999:linter 报错;
|
||||||
|
/** 接受父组件参数 */
|
||||||
interface Props {
|
interface Props {
|
||||||
modelValue?: number | number[] | string | string[];
|
modelValue?: number | number[] | string | string[];
|
||||||
multiple?: boolean;
|
multiple?: boolean;
|
||||||
@@ -49,6 +51,7 @@ interface Props {
|
|||||||
formCreateInject?: any;
|
formCreateInject?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO @AI:可以使用 element plus 自带的对象么?
|
||||||
// Element Plus TreeSelect 的 props 配置
|
// Element Plus TreeSelect 的 props 配置
|
||||||
const treeProps = {
|
const treeProps = {
|
||||||
label: 'name',
|
label: 'name',
|
||||||
@@ -56,14 +59,11 @@ const treeProps = {
|
|||||||
children: 'children',
|
children: 'children',
|
||||||
};
|
};
|
||||||
|
|
||||||
// 部门树形数据
|
const deptTree = ref<any[]>([]); // 部门树形数据
|
||||||
const deptTree = ref<any[]>([]);
|
const deptList = ref<DeptVO[]>([]); // 原始部门列表(用于 returnType='name' 时查找名称)
|
||||||
// 原始部门列表(用于 returnType='name' 时查找名称)
|
const selectedValue = ref<number | number[] | undefined>(); // 当前选中值
|
||||||
const deptList = ref<DeptVO[]>([]);
|
|
||||||
// 当前选中值
|
|
||||||
const selectedValue = ref<number | number[] | undefined>();
|
|
||||||
|
|
||||||
// 加载部门树形数据
|
/** 加载部门树形数据 */
|
||||||
async function loadDeptTree(): Promise<void> {
|
async function loadDeptTree(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const data = await requestClient.get<DeptVO[]>('/system/dept/simple-list');
|
const data = await requestClient.get<DeptVO[]>('/system/dept/simple-list');
|
||||||
@@ -75,22 +75,22 @@ async function loadDeptTree(): Promise<void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据 ID 获取部门名称
|
/** 根据 ID 获取部门名称 */
|
||||||
function getDeptNameById(id: number): string | undefined {
|
function getDeptNameById(id: number): string | undefined {
|
||||||
const dept = deptList.value.find((item) => item.id === id);
|
const dept = deptList.value.find((item: DeptVO) => item.id === id);
|
||||||
if (!dept) {
|
if (!dept) {
|
||||||
console.warn(`[DeptSelect] 未找到 ID 为 ${id} 的部门`);
|
console.warn(`[DeptSelect] 未找到 ID 为 ${id} 的部门`);
|
||||||
}
|
}
|
||||||
return dept?.name;
|
return dept?.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据名称获取部门 ID
|
/** 根据名称获取部门 ID */
|
||||||
function getDeptIdByName(name: string): number | undefined {
|
function getDeptIdByName(name: string): number | undefined {
|
||||||
const dept = deptList.value.find((item) => item.name === name);
|
const dept = deptList.value.find((item: DeptVO) => item.name === name);
|
||||||
return dept?.id;
|
return dept?.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理选中值变化
|
/** 处理选中值变化 */
|
||||||
function handleChange(value: number | number[] | undefined): void {
|
function handleChange(value: number | number[] | undefined): void {
|
||||||
if (value === undefined || value === null) {
|
if (value === undefined || value === null) {
|
||||||
emit('update:modelValue', props.multiple ? [] : undefined);
|
emit('update:modelValue', props.multiple ? [] : undefined);
|
||||||
@@ -113,13 +113,13 @@ function handleChange(value: number | number[] | undefined): void {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 树节点过滤方法(支持搜索过滤)
|
/** 树节点过滤方法(支持搜索过滤) */
|
||||||
function filterNode(value: string, data: any): boolean {
|
function filterNode(value: string, data: any): boolean {
|
||||||
if (!value) return true;
|
if (!value) return true;
|
||||||
return data.name?.toLowerCase().includes(value.toLowerCase());
|
return data.name?.toLowerCase().includes(value.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
// 同步 modelValue 到内部选中值
|
/** 同步 modelValue 到内部选中值 */
|
||||||
function syncSelectedValue(): void {
|
function syncSelectedValue(): void {
|
||||||
const newValue = props.modelValue;
|
const newValue = props.modelValue;
|
||||||
if (newValue === undefined || newValue === null) {
|
if (newValue === undefined || newValue === null) {
|
||||||
@@ -134,26 +134,24 @@ function syncSelectedValue(): void {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (props.multiple && Array.isArray(newValue)) {
|
if (props.multiple && Array.isArray(newValue)) {
|
||||||
const ids = (newValue as string[])
|
selectedValue.value = (newValue as string[])
|
||||||
.map((name) => getDeptIdByName(name))
|
.map((name) => getDeptIdByName(name))
|
||||||
.filter(Boolean) as number[];
|
.filter(Boolean) as number[];
|
||||||
selectedValue.value = ids;
|
|
||||||
} else if (!props.multiple && typeof newValue === 'string') {
|
} else if (!props.multiple && typeof newValue === 'string') {
|
||||||
const id = getDeptIdByName(newValue);
|
selectedValue.value = getDeptIdByName(newValue);
|
||||||
selectedValue.value = id;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
selectedValue.value = newValue as number | number[];
|
selectedValue.value = newValue as number | number[];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 监听 modelValue 变化,同步到内部选中值
|
/** 监听 modelValue 变化,同步到内部选中值 */
|
||||||
watch(() => props.modelValue, syncSelectedValue, { immediate: true });
|
watch(() => props.modelValue, syncSelectedValue, { immediate: true });
|
||||||
|
|
||||||
// 监听 deptList 变化,重新同步选中值(解决数据加载完成后的回显问题)
|
/** 监听 deptList 变化,重新同步选中值(解决数据加载完成后的回显问题) */
|
||||||
watch(() => deptList.value, syncSelectedValue);
|
watch(() => deptList.value, syncSelectedValue);
|
||||||
|
|
||||||
// 检查是否有有效的预设值
|
/** 检查是否有有效的预设值 */
|
||||||
function hasValidPresetValue(): boolean {
|
function hasValidPresetValue(): boolean {
|
||||||
const value = props.modelValue;
|
const value = props.modelValue;
|
||||||
if (value === undefined || value === null || value === '') {
|
if (value === undefined || value === null || value === '') {
|
||||||
@@ -165,13 +163,12 @@ function hasValidPresetValue(): boolean {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置默认值(当前用户部门)
|
/** 设置默认值(当前用户部门) */
|
||||||
function setDefaultValue(): void {
|
function setDefaultValue(): void {
|
||||||
// 仅当 defaultCurrentDept 为 true 时处理
|
// 仅当 defaultCurrentDept 为 true 时处理
|
||||||
if (!props.defaultCurrentDept) {
|
if (!props.defaultCurrentDept) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查是否已有预设值(预设值优先级高于默认当前部门)
|
// 检查是否已有预设值(预设值优先级高于默认当前部门)
|
||||||
if (hasValidPresetValue()) {
|
if (hasValidPresetValue()) {
|
||||||
return;
|
return;
|
||||||
@@ -180,7 +177,6 @@ function setDefaultValue(): void {
|
|||||||
// 获取当前用户的部门 ID
|
// 获取当前用户的部门 ID
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const deptId = userStore.userInfo?.deptId as number | undefined;
|
const deptId = userStore.userInfo?.deptId as number | undefined;
|
||||||
|
|
||||||
// 处理 deptId 为空或 0 的边界情况
|
// 处理 deptId 为空或 0 的边界情况
|
||||||
if (!deptId || deptId === 0) {
|
if (!deptId || deptId === 0) {
|
||||||
return;
|
return;
|
||||||
@@ -191,7 +187,7 @@ function setDefaultValue(): void {
|
|||||||
emit('update:modelValue', defaultValue);
|
emit('update:modelValue', defaultValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 组件挂载时加载数据并设置默认值
|
/** 组件挂载时加载数据并设置默认值 */
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await loadDeptTree();
|
await loadDeptTree();
|
||||||
// 数据加载完成后设置默认值
|
// 数据加载完成后设置默认值
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ export async function useFormCreateDesigner(designer: Ref) {
|
|||||||
type: 'switch',
|
type: 'switch',
|
||||||
field: 'defaultCurrentUser',
|
field: 'defaultCurrentUser',
|
||||||
title: '默认选中当前用户',
|
title: '默认选中当前用户',
|
||||||
value: true,
|
value: false,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
@@ -223,7 +223,7 @@ export async function useFormCreateDesigner(designer: Ref) {
|
|||||||
type: 'switch',
|
type: 'switch',
|
||||||
field: 'defaultCurrentDept',
|
field: 'defaultCurrentDept',
|
||||||
title: '默认选中当前部门',
|
title: '默认选中当前部门',
|
||||||
value: true,
|
value: false,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ import {
|
|||||||
MULTI_LEVEL_DEPT,
|
MULTI_LEVEL_DEPT,
|
||||||
} from '#/views/bpm/components/simple-process-design/consts';
|
} from '#/views/bpm/components/simple-process-design/consts';
|
||||||
import { useFormFieldsPermission } from '#/views/bpm/components/simple-process-design/helpers';
|
import { useFormFieldsPermission } from '#/views/bpm/components/simple-process-design/helpers';
|
||||||
// TODO @jason:antd 是不是导入对齐这个?
|
|
||||||
import { ProcessExpressionSelectModal } from '#/views/bpm/processExpression/components';
|
import { ProcessExpressionSelectModal } from '#/views/bpm/processExpression/components';
|
||||||
|
|
||||||
defineOptions({ name: 'UserTask' });
|
defineOptions({ name: 'UserTask' });
|
||||||
|
|||||||
@@ -108,6 +108,8 @@ const [Drawer, drawerApi] = useVbenDrawer({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// TODO @jason:和 antd 对应的文件,逻辑有点不一样;
|
||||||
|
|
||||||
// 节点名称配置
|
// 节点名称配置
|
||||||
const { nodeName, showInput, clickIcon, changeNodeName, inputRef } =
|
const { nodeName, showInput, clickIcon, changeNodeName, inputRef } =
|
||||||
useNodeName(BpmNodeTypeEnum.USER_TASK_NODE);
|
useNodeName(BpmNodeTypeEnum.USER_TASK_NODE);
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ export function useWatchNode(props: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 解析 formCreate 所有表单字段, 并返回
|
// 解析 formCreate 所有表单字段, 并返回
|
||||||
|
// TODO @jason:这个逻辑,和 antd 对应的逻辑不太一致;
|
||||||
function parseFormCreateFields(formFields?: string[]) {
|
function parseFormCreateFields(formFields?: string[]) {
|
||||||
const result: Array<Record<string, any>> = [];
|
const result: Array<Record<string, any>> = [];
|
||||||
if (formFields) {
|
if (formFields) {
|
||||||
|
|||||||
@@ -8,4 +8,5 @@ export { default as SimpleProcessViewer } from './components/simple-process-view
|
|||||||
|
|
||||||
export type { SimpleFlowNode } from './consts';
|
export type { SimpleFlowNode } from './consts';
|
||||||
|
|
||||||
|
// TODO @jaosn:和 antd 对应的文件,不太一样
|
||||||
export { parseFormFields } from './helpers';
|
export { parseFormFields } from './helpers';
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ const xmlString = inject('processData') as Ref; // 注入流程数据
|
|||||||
const modelData = inject('modelData') as Ref; // 注入模型数据
|
const modelData = inject('modelData') as Ref; // 注入模型数据
|
||||||
|
|
||||||
const modeler = shallowRef(); // BPMN Modeler
|
const modeler = shallowRef(); // BPMN Modeler
|
||||||
|
// TODO @AI:和对应的 antd 文件,略微有点不一样;
|
||||||
const processDesigner = ref();
|
const processDesigner = ref();
|
||||||
const controlForm = ref({
|
const controlForm = ref({
|
||||||
simulation: true,
|
simulation: true,
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ const emit = defineEmits<{
|
|||||||
}>();
|
}>();
|
||||||
|
|
||||||
// 查询参数
|
// 查询参数
|
||||||
|
// TODO @jason:这里的风格,和 antd 对应的不一致;
|
||||||
const queryParams = ref({
|
const queryParams = ref({
|
||||||
status: CommonStatusEnum.ENABLE,
|
status: CommonStatusEnum.ENABLE,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
|||||||
import { DICT_TYPE } from '@vben/constants';
|
import { DICT_TYPE } from '@vben/constants';
|
||||||
|
|
||||||
/** 选择监听器弹窗的列表字段 */
|
/** 选择监听器弹窗的列表字段 */
|
||||||
|
// TODO @jason:和 antd 对应的,不太一致;
|
||||||
export function useGridColumns(): VxeTableGridOptions['columns'] {
|
export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||||
return [
|
return [
|
||||||
{ field: 'name', title: '名字', minWidth: 120 },
|
{ field: 'name', title: '名字', minWidth: 120 },
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ const emit = defineEmits<{
|
|||||||
}>();
|
}>();
|
||||||
|
|
||||||
// 查询参数
|
// 查询参数
|
||||||
|
// TODO @jason:这里的风格,和 antd 对应的不一致;
|
||||||
const queryParams = ref({
|
const queryParams = ref({
|
||||||
type: '',
|
type: '',
|
||||||
status: CommonStatusEnum.ENABLE,
|
status: CommonStatusEnum.ENABLE,
|
||||||
|
|||||||
Reference in New Issue
Block a user