Merge branch 'dev' of gitee.com:yudaocode/yudao-ui-admin-vben into dev-spu

Signed-off-by: puhui999 <puhui999@163.com>
This commit is contained in:
puhui999
2025-10-21 08:53:26 +00:00
committed by Gitee
254 changed files with 4984 additions and 2092 deletions

View File

@@ -6,6 +6,7 @@ export namespace BpmProcessDefinitionApi {
/** 流程定义 */ /** 流程定义 */
export interface ProcessDefinition { export interface ProcessDefinition {
id: string; id: string;
key?: string;
version: number; version: number;
name: string; name: string;
description: string; description: string;

View File

@@ -15,6 +15,7 @@ export namespace BpmProcessInstanceApi {
export interface Task { export interface Task {
id: number; id: number;
name: string; name: string;
assigneeUser?: User;
} }
export interface User { export interface User {
@@ -51,6 +52,7 @@ export namespace BpmProcessInstanceApi {
export interface ProcessInstance { export interface ProcessInstance {
businessKey: string; businessKey: string;
category: string; category: string;
categoryName?: string;
createTime: string; createTime: string;
endTime: string; endTime: string;
fields: string[]; fields: string[];
@@ -64,6 +66,10 @@ export namespace BpmProcessInstanceApi {
startTime?: Date; startTime?: Date;
startUser?: User; startUser?: User;
status: number; status: number;
summary?: {
key: string;
value: string;
}[];
tasks?: BpmProcessInstanceApi.Task[]; tasks?: BpmProcessInstanceApi.Task[];
} }

View File

@@ -13,6 +13,7 @@ export namespace BpmTaskApi {
status: number; // 监听器状态 status: number; // 监听器状态
event: string; // 监听事件 event: string; // 监听事件
valueType: string; // 监听器值类型 valueType: string; // 监听器值类型
processInstance?: BpmProcessInstanceApi.ProcessInstance; // 流程实例
} }
// 流程任务 // 流程任务

View File

@@ -1,82 +1,196 @@
<script lang="tsx"> <script lang="tsx">
import type { DescriptionsProps } from 'ant-design-vue'; import type { DescriptionsProps } from 'ant-design-vue/es/descriptions';
import type { PropType } from 'vue'; import type { CSSProperties, PropType, Slots } from 'vue';
import type { DescriptionItemSchema, DescriptionsOptions } from './typing'; import type { DescriptionItemSchema, DescriptionProps } from './typing';
import { defineComponent } from 'vue'; import { computed, defineComponent, ref, unref, useAttrs } from 'vue';
import { get } from '@vben/utils'; import { get, getNestedValue, isFunction } from '@vben/utils';
import { Descriptions, DescriptionsItem } from 'ant-design-vue'; import { Card, Descriptions } from 'ant-design-vue';
/** 对 Descriptions 进行二次封装 */ const props = {
const Description = defineComponent({ bordered: { default: true, type: Boolean },
name: 'Descriptions', column: {
props: { default: () => {
data: { return { lg: 3, md: 3, sm: 2, xl: 3, xs: 1, xxl: 4 };
type: Object as PropType<Record<string, any>>,
default: () => ({}),
},
schema: {
type: Array as PropType<DescriptionItemSchema[]>,
default: () => [],
},
// Descriptions 原生 props
componentProps: {
type: Object as PropType<DescriptionsProps>,
default: () => ({}),
}, },
type: [Number, Object],
}, },
data: { type: Object },
schema: {
default: () => [],
type: Array as PropType<DescriptionItemSchema[]>,
},
size: {
default: 'small',
type: String,
validator: (v: string) =>
['default', 'middle', 'small', undefined].includes(v),
},
title: { default: '', type: String },
useCard: { default: true, type: Boolean },
};
setup(props: DescriptionsOptions) { function getSlot(slots: Slots, slot: string, data?: any) {
// TODO @xingyu每个 field 的 slot 的考虑 if (!slots || !Reflect.has(slots, slot)) {
// TODO @xingyufrom 5.0extra: () => getSlot(slots, 'extra') return null;
/** 过滤掉不需要展示的 */ }
const shouldShowItem = (item: DescriptionItemSchema) => { if (!isFunction(slots[slot])) {
if (item.hidden === undefined) return true; console.error(`${slot} is not a function!`);
return typeof item.hidden === 'function' return null;
? !item.hidden(props.data) }
: !item.hidden; const slotFn = slots[slot];
}; if (!slotFn) return null;
/** 渲染内容 */ return slotFn({ data });
const renderContent = (item: DescriptionItemSchema) => { }
if (item.content) {
return typeof item.content === 'function' export default defineComponent({
? item.content(props.data) name: 'Description',
: item.content; props,
setup(props, { slots }) {
const propsRef = ref<null | Partial<DescriptionProps>>(null);
const prefixCls = 'description';
const attrs = useAttrs();
// Custom title component: get title
const getMergeProps = computed(() => {
return {
...props,
...(unref(propsRef) as any),
} as DescriptionProps;
});
const getProps = computed(() => {
const opt = {
...unref(getMergeProps),
title: undefined,
};
return opt as DescriptionProps;
});
const useWrapper = computed(() => !!unref(getMergeProps).title);
const getDescriptionsProps = computed(() => {
return { ...unref(attrs), ...unref(getProps) } as DescriptionsProps;
});
// 防止换行
function renderLabel({
label,
labelMinWidth,
labelStyle,
}: DescriptionItemSchema) {
if (!labelStyle && !labelMinWidth) {
return label;
} }
return item.field ? get(props.data, item.field) : null;
};
return () => ( const labelStyles: CSSProperties = {
<Descriptions ...labelStyle,
{...props} minWidth: `${labelMinWidth}px `,
bordered={props.componentProps?.bordered} };
colon={props.componentProps?.colon} return <div style={labelStyles}>{label}</div>;
column={props.componentProps?.column} }
extra={props.componentProps?.extra}
layout={props.componentProps?.layout} function renderItem() {
size={props.componentProps?.size} const { data, schema } = unref(getProps);
title={props.componentProps?.title} return unref(schema)
> .map((item) => {
{props.schema?.filter(shouldShowItem).map((item) => ( const { contentMinWidth, field, render, show, span } = item;
<DescriptionsItem
contentStyle={item.contentStyle} if (show && isFunction(show) && !show(data)) {
key={item.field || String(item.label)} return null;
label={item.label} }
labelStyle={item.labelStyle}
span={item.span} function getContent() {
> const _data = unref(getProps)?.data;
{renderContent(item)} if (!_data) {
</DescriptionsItem> return null;
))} }
</Descriptions> const getField = field.includes('.')
); ? (getNestedValue(_data, field) ?? get(_data, field))
: get(_data, field);
// if (
// getField &&
// !Object.prototype.hasOwnProperty.call(toRefs(_data), field)
// ) {
// return isFunction(render) ? render('', _data) : (getField ?? '');
// }
return isFunction(render)
? render(getField, _data)
: (getField ?? '');
}
const width = contentMinWidth;
return (
<Descriptions.Item
key={field}
label={renderLabel(item)}
span={span}
>
{() => {
if (item.slot) {
const slotContent = getSlot(slots, item.slot, data);
return slotContent;
}
if (!contentMinWidth) {
return getContent();
}
const style: CSSProperties = {
minWidth: `${width}px`,
};
return <div style={style}>{getContent()}</div>;
}}
</Descriptions.Item>
);
})
.filter((item) => !!item);
}
function renderDesc() {
return (
<Descriptions
class={`${prefixCls}`}
{...(unref(getDescriptionsProps) as any)}
>
{renderItem()}
</Descriptions>
);
}
function renderCard() {
const content = props.useCard ? renderDesc() : <div>{renderDesc()}</div>;
// Reduce the dom level
if (!props.useCard) {
return content;
}
const { title } = unref(getMergeProps);
const extraSlot = getSlot(slots, 'extra');
return (
<Card
bodyStyle={{ padding: '8px 0' }}
headStyle={{
padding: '8px 16px',
fontSize: '14px',
minHeight: '24px',
}}
style={{ margin: 0 }}
title={title}
>
{{
default: () => content,
extra: () => extraSlot && <div>{extraSlot}</div>,
}}
</Card>
);
}
return () => (unref(useWrapper) ? renderCard() : renderDesc());
}, },
}); });
// TODO @xingyufrom 5.0emits: ['register'] 事件
export default Description;
</script> </script>

View File

@@ -1,27 +1,56 @@
import type { DescriptionsProps } from 'ant-design-vue'; import type { DescriptionsProps } from 'ant-design-vue/es/descriptions';
import type { JSX } from 'vue/jsx-runtime';
import type { CSSProperties, VNode } from 'vue'; import type { CSSProperties, VNode } from 'vue';
// TODO @xingyu【content】这个纠结下1vben2.0 是 renderhttps://doc.vvbin.cn/components/desc.html#usage 2 import type { Recordable } from '@vben/types';
// TODO @xingyuvben2.0 还有 sapn【done】、labelMinWidth、contentMinWidth
// TODO @xingyu【hidden】这个纠结下1vben2.0 是 show
export interface DescriptionItemSchema { export interface DescriptionItemSchema {
label: string | VNode; // 内容的描述 labelMinWidth?: number;
field?: string; // 对应 data 中的字段名 contentMinWidth?: number;
content?: ((data: any) => string | VNode) | string | VNode; // 自定义需要展示的内容,比如说 dict-tag // 自定义标签样式
span?: number; // 包含列的数量 labelStyle?: CSSProperties;
labelStyle?: CSSProperties; // 自定义标签样式 // 对应 data 中的字段名
contentStyle?: CSSProperties; // 自定义内容样式 field: string;
hidden?: ((data: any) => boolean) | boolean; // 是否显示 // 内容的描述
label: JSX.Element | string | VNode;
// 包含列的数量
span?: number;
// 是否显示
show?: (...arg: any) => boolean;
// 插槽名称
slot?: string;
// 自定义需要展示的内容
render?: (
val: any,
data?: Recordable<any>,
) => Element | JSX.Element | number | string | undefined | VNode;
} }
// TODO @xingyuvben2.0 还有 title【done】、bordered【done】d、useCollapse、collapseOptions export interface DescriptionProps extends DescriptionsProps {
// TODO @xingyufrom 5.0bordered 默认为 true // 是否包含卡片组件
// TODO @xingyufrom 5.0column 默认为 lg: 3, md: 3, sm: 2, xl: 3, xs: 1, xxl: 4 useCard?: boolean;
// TODO @xingyufrom 5.0size 默认为 small有 'default', 'middle', 'small', undefined // 描述项配置
// TODO @xingyufrom 5.0useCollapse 默认为 true schema: DescriptionItemSchema[];
export interface DescriptionsOptions { // 数据
data?: Record<string, any>; // 数据 data: Recordable<any>;
schema?: DescriptionItemSchema[]; // 描述项配置 // 标题
componentProps?: DescriptionsProps; // antd Descriptions 组件参数 title?: string;
// 是否包含边框
bordered?: boolean;
// 列数
column?:
| number
| {
lg: number;
md: number;
sm: number;
xl: number;
xs: number;
xxl: number;
};
}
export interface DescInstance {
setDescProps(descProps: Partial<DescriptionProps>): void;
} }

View File

@@ -1,71 +1,31 @@
import type { DescriptionsOptions } from './typing'; import type { Component } from 'vue';
import { defineComponent, h, isReactive, reactive, watch } from 'vue'; import type { DescInstance, DescriptionProps } from './typing';
import { h, reactive } from 'vue';
import Description from './description.vue'; import Description from './description.vue';
/** 描述列表 api 定义 */ export function useDescription(options?: Partial<DescriptionProps>) {
class DescriptionApi { const propsState = reactive<Partial<DescriptionProps>>(options || {});
private state = reactive<Record<string, any>>({});
constructor(options: DescriptionsOptions) { const api: DescInstance = {
this.state = { ...options }; setDescProps: (descProps: Partial<DescriptionProps>): void => {
} Object.assign(propsState, descProps);
},
};
getState(): DescriptionsOptions { // 创建一个包装组件,将 propsState 合并到 props 中
return this.state as DescriptionsOptions; const DescriptionWrapper: Component = {
}
// TODO @xingyu【setState】纠结下1vben2.0 是 data https://doc.vvbin.cn/components/desc.html#usage
setState(newState: Partial<DescriptionsOptions>) {
this.state = { ...this.state, ...newState };
}
}
export type ExtendedDescriptionApi = DescriptionApi;
export function useDescription(options: DescriptionsOptions) {
const IS_REACTIVE = isReactive(options);
const api = new DescriptionApi(options);
// 扩展 API
const extendedApi: ExtendedDescriptionApi = api as never;
const Desc = defineComponent({
name: 'UseDescription', name: 'UseDescription',
inheritAttrs: false, inheritAttrs: false,
setup(_, { attrs, slots }) { setup(_props, { attrs, slots }) {
// 合并props和attrs到state return () => {
api.setState({ ...attrs }); // @ts-ignore - 避免类型实例化过深
return h(Description, { ...propsState, ...attrs }, slots);
return () => };
h(
Description,
{
...api.getState(),
...attrs,
},
slots,
);
}, },
}); };
// 响应式支持 return [DescriptionWrapper, api] as const;
if (IS_REACTIVE) {
watch(
() => options.schema,
(newSchema) => {
api.setState({ schema: newSchema });
},
{ immediate: true, deep: true },
);
watch(
() => options.data,
(newData) => {
api.setState({ data: newData });
},
{ immediate: true, deep: true },
);
}
return [Desc, extendedApi] as const;
} }

View File

@@ -109,7 +109,7 @@ export function useGridFormSchemaMessage(): VbenFormSchema[] {
label: '用户编号', label: '用户编号',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -15,7 +15,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '用户编号', label: '用户编号',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -12,7 +12,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '用户编号', label: '用户编号',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -93,7 +93,7 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
placeholder: '请选择引用知识库', placeholder: '请选择引用知识库',
api: () => getSimpleKnowledgeList(), api: getSimpleKnowledgeList,
labelField: 'name', labelField: 'name',
mode: 'multiple', mode: 'multiple',
valueField: 'id', valueField: 'id',
@@ -106,7 +106,7 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
placeholder: '请选择引用工具', placeholder: '请选择引用工具',
api: () => getToolSimpleList(), api: getToolSimpleList,
mode: 'multiple', mode: 'multiple',
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',

View File

@@ -48,7 +48,7 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
placeholder: '请选择API 秘钥', placeholder: '请选择API 秘钥',
api: () => getApiKeySimpleList(), api: getApiKeySimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
allowClear: true, allowClear: true,

View File

@@ -15,7 +15,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '用户编号', label: '用户编号',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -15,7 +15,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '用户编号', label: '用户编号',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -138,11 +138,7 @@ onMounted(() => {
<FormModal @success="handleBack" /> <FormModal @success="handleBack" />
<Spin :spinning="loading"> <Spin :spinning="loading">
<FcDesigner <FcDesigner ref="designerRef" height="90vh" :config="designerConfig">
class="h-full min-h-[500px]"
ref="designerRef"
:config="designerConfig"
>
<template #handle> <template #handle>
<Button size="small" type="primary" @click="handleSave"> <Button size="small" type="primary" @click="handleSave">
<IconifyIcon icon="mdi:content-save" /> <IconifyIcon icon="mdi:content-save" />

View File

@@ -51,7 +51,7 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
placeholder: '请选择成员', placeholder: '请选择成员',
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
mode: 'tags', mode: 'tags',

View File

@@ -179,21 +179,21 @@ export function useDetailFormSchema(): DescriptionItemSchema[] {
{ {
label: '请假类型', label: '请假类型',
field: 'type', field: 'type',
content: (data) => render: (val) =>
h(DictTag, { h(DictTag, {
type: DICT_TYPE.BPM_OA_LEAVE_TYPE, type: DICT_TYPE.BPM_OA_LEAVE_TYPE,
value: data?.type, value: val,
}), }),
}, },
{ {
label: '开始时间', label: '开始时间',
field: 'startTime', field: 'startTime',
content: (data) => formatDateTime(data?.startTime) as string, render: (val) => formatDateTime(val) as string,
}, },
{ {
label: '结束时间', label: '结束时间',
field: 'endTime', field: 'endTime',
content: (data) => formatDateTime(data?.endTime) as string, render: (val) => formatDateTime(val) as string,
}, },
{ {
label: '原因', label: '原因',

View File

@@ -44,9 +44,7 @@ async function handleDelete(row: BpmProcessExpressionApi.ProcessExpression) {
}); });
try { try {
await deleteProcessExpression(row.id as number); await deleteProcessExpression(row.id as number);
message.success({ message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
});
handleRefresh(); handleRefresh();
} finally { } finally {
hideLoading(); hideLoading();
@@ -74,6 +72,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
}, },
rowConfig: { rowConfig: {
keyField: 'id', keyField: 'id',
isHover: true,
}, },
toolbarConfig: { toolbarConfig: {
refresh: true, refresh: true,

View File

@@ -55,6 +55,7 @@ const [Modal, modalApi] = useVbenModal({
}, },
async onOpenChange(isOpen: boolean) { async onOpenChange(isOpen: boolean) {
if (!isOpen) { if (!isOpen) {
formData.value = undefined;
return; return;
} }
// 加载数据 // 加载数据

View File

@@ -5,23 +5,12 @@ import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks'; import { getDictOptions } from '@vben/hooks';
import { getCategorySimpleList } from '#/api/bpm/category'; import { getCategorySimpleList } from '#/api/bpm/category';
import { getSimpleProcessDefinitionList } from '#/api/bpm/definition';
import { getRangePickerDefaultProps } from '#/utils'; import { getRangePickerDefaultProps } from '#/utils';
/** 列表的搜索表单 */ /** 列表的搜索表单 */
export function useGridFormSchema(): VbenFormSchema[] { export function useGridFormSchema(): VbenFormSchema[] {
return [ return [
// {
// fieldName: 'startUserId',
// label: '发起人',
// component: 'ApiSelect',
// componentProps: {
// placeholder: '请选择发起人',
// allowClear: true,
// api: () => getSimpleUserList(),
// labelField: 'nickname',
// valueField: 'id',
// },
// },
{ {
fieldName: 'name', fieldName: 'name',
label: '流程名称', label: '流程名称',
@@ -34,13 +23,15 @@ export function useGridFormSchema(): VbenFormSchema[] {
{ {
fieldName: 'processDefinitionId', fieldName: 'processDefinitionId',
label: '所属流程', label: '所属流程',
component: 'Input', component: 'ApiSelect',
componentProps: { componentProps: {
placeholder: '请输入流程定义的编号', placeholder: '请选择流程定义',
allowClear: true, allowClear: true,
api: getSimpleProcessDefinitionList,
labelField: 'name',
valueField: 'id',
}, },
}, },
// 流程分类
{ {
fieldName: 'category', fieldName: 'category',
label: '流程分类', label: '流程分类',
@@ -48,12 +39,11 @@ export function useGridFormSchema(): VbenFormSchema[] {
componentProps: { componentProps: {
placeholder: '请输入流程分类', placeholder: '请输入流程分类',
allowClear: true, allowClear: true,
api: () => getCategorySimpleList(), api: getCategorySimpleList,
labelField: 'name', labelField: 'name',
valueField: 'code', valueField: 'code',
}, },
}, },
// 流程状态
{ {
fieldName: 'status', fieldName: 'status',
label: '流程状态', label: '流程状态',
@@ -67,7 +57,6 @@ export function useGridFormSchema(): VbenFormSchema[] {
allowClear: true, allowClear: true,
}, },
}, },
// 发起时间
{ {
fieldName: 'createTime', fieldName: 'createTime',
label: '发起时间', label: '发起时间',
@@ -97,15 +86,12 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
default: 'slot-summary', default: 'slot-summary',
}, },
}, },
{ {
field: 'categoryName', field: 'categoryName',
title: '流程分类', title: '流程分类',
minWidth: 120, minWidth: 120,
fixed: 'left', fixed: 'left',
}, },
// 流程状态
{ {
field: 'status', field: 'status',
title: '流程状态', title: '流程状态',
@@ -114,7 +100,6 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
default: 'slot-status', default: 'slot-status',
}, },
}, },
{ {
field: 'startTime', field: 'startTime',
title: '发起时间', title: '发起时间',

View File

@@ -1,6 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { BpmTaskApi } from '#/api/bpm/task'; import type { BpmProcessInstanceApi } from '#/api/bpm/processInstance';
import { h } from 'vue'; import { h } from 'vue';
@@ -10,11 +10,13 @@ import { BpmProcessInstanceStatus, DICT_TYPE } from '@vben/constants';
import { Button, message, Textarea } from 'ant-design-vue'; import { Button, message, Textarea } from 'ant-design-vue';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { getProcessDefinition } from '#/api/bpm/definition';
import { import {
cancelProcessInstanceByStartUser, cancelProcessInstanceByStartUser,
getProcessInstanceMyPage, getProcessInstanceMyPage,
} from '#/api/bpm/processInstance'; } from '#/api/bpm/processInstance';
import { DictTag } from '#/components/dict-tag'; import { DictTag } from '#/components/dict-tag';
import { $t } from '#/locales';
import { router } from '#/router'; import { router } from '#/router';
import { useGridColumns, useGridFormSchema } from './data'; import { useGridColumns, useGridFormSchema } from './data';
@@ -27,43 +29,53 @@ function handleRefresh() {
} }
/** 查看流程实例 */ /** 查看流程实例 */
function handleDetail(row: BpmTaskApi.Task) { function handleDetail(row: BpmProcessInstanceApi.ProcessInstance) {
router.push({ router.push({
name: 'BpmProcessInstanceDetail', name: 'BpmProcessInstanceDetail',
query: { id: row.id }, query: { id: row.id },
}); });
} }
/** 重新发起流程 */
async function handleCreate(row: BpmProcessInstanceApi.ProcessInstance) {
// 如果是【业务表单】,不支持重新发起
if (row?.id) {
const processDefinitionDetail = await getProcessDefinition(
row.processDefinitionId,
);
if (processDefinitionDetail.formType === 20) {
message.error(
'重新发起流程失败,原因:该流程使用业务表单,不支持重新发起',
);
return;
}
}
// 跳转发起流程界面
await router.push({
name: 'BpmProcessInstanceCreate',
query: { processInstanceId: row?.id },
});
}
/** 取消流程实例 */ /** 取消流程实例 */
function handleCancel(row: BpmTaskApi.Task) { function handleCancel(row: BpmProcessInstanceApi.ProcessInstance) {
prompt({ prompt({
async beforeClose(scope) {
if (scope.isConfirm) {
if (scope.value) {
try {
await cancelProcessInstanceByStartUser(row.id, scope.value);
message.success('取消成功');
handleRefresh();
} catch {
return false;
}
} else {
message.error('请输入取消原因');
return false;
}
}
},
component: () => { component: () => {
return h(Textarea, { return h(Textarea, {
placeholder: '请输入取消原因', placeholder: '请输入取消原因',
allowClear: true, allowClear: true,
rows: 2, rows: 2,
rules: [{ required: true, message: '请输入取消原因' }],
}); });
}, },
content: '请输入取消原因', content: '请输入取消原因',
title: '取消流程', title: '取消流程',
modelPropName: 'value', modelPropName: 'value',
}).then(async (reason) => {
if (reason) {
await cancelProcessInstanceByStartUser(row.id, reason);
message.success('取消成功');
handleRefresh();
}
}); });
} }
@@ -88,15 +100,13 @@ const [Grid, gridApi] = useVbenVxeGrid({
}, },
rowConfig: { rowConfig: {
keyField: 'id', keyField: 'id',
isHover: true,
}, },
toolbarConfig: { toolbarConfig: {
refresh: true, refresh: true,
search: true, search: true,
}, },
cellConfig: { } as VxeTableGridOptions<BpmProcessInstanceApi.ProcessInstance>,
height: 64,
},
} as VxeTableGridOptions<BpmTaskApi.Task>,
}); });
</script> </script>
@@ -110,7 +120,6 @@ const [Grid, gridApi] = useVbenVxeGrid({
</template> </template>
<Grid table-title="流程状态"> <Grid table-title="流程状态">
<!-- 摘要 -->
<template #slot-summary="{ row }"> <template #slot-summary="{ row }">
<div <div
class="flex flex-col py-2" class="flex flex-col py-2"
@@ -124,31 +133,29 @@ const [Grid, gridApi] = useVbenVxeGrid({
</div> </div>
<div v-else>-</div> <div v-else>-</div>
</template> </template>
<template #slot-status="{ row }"> <template #slot-status="{ row }">
<!-- 审批中状态 -->
<template <template
v-if=" v-if="
row.status === BpmProcessInstanceStatus.RUNNING && row.status === BpmProcessInstanceStatus.RUNNING &&
row.tasks?.length > 0 row.tasks!.length > 0
" "
> >
<!-- 单人审批 --> <!-- 单人审批 -->
<template v-if="row.tasks.length === 1"> <template v-if="row.tasks!.length === 1">
<span> <span>
<Button type="link" @click="handleDetail(row)"> <Button type="link" @click="handleDetail(row)">
{{ row.tasks[0].assigneeUser?.nickname }} {{ row.tasks![0]!.assigneeUser?.nickname }}
</Button> </Button>
({{ row.tasks[0].name }}) 审批中 ({{ row.tasks![0]!.name }}) 审批中
</span> </span>
</template> </template>
<!-- 多人审批 --> <!-- 多人审批 -->
<template v-else> <template v-else>
<span> <span>
<Button type="link" @click="handleDetail(row)"> <Button type="link" @click="handleDetail(row)">
{{ row.tasks[0].assigneeUser?.nickname }} {{ row.tasks![0]!.assigneeUser?.nickname }}
</Button> </Button>
等 {{ row.tasks.length }} 人 ({{ row.tasks[0].name }})审批中 等 {{ row.tasks!.length }} 人 ({{ row.tasks![0]!.name }})审批中
</span> </span>
</template> </template>
</template> </template>
@@ -179,6 +186,14 @@ const [Grid, gridApi] = useVbenVxeGrid({
auth: ['bpm:process-instance:cancel'], auth: ['bpm:process-instance:cancel'],
onClick: handleCancel.bind(null, row), onClick: handleCancel.bind(null, row),
}, },
{
label: '重新发起',
type: 'link',
icon: ACTION_ICON.ADD,
ifShow: row.status !== BpmProcessInstanceStatus.RUNNING,
auth: ['bpm:process-instance:create'],
onClick: handleCreate.bind(null, row),
},
]" ]"
/> />
</template> </template>

View File

@@ -1,15 +1,11 @@
import type { VbenFormSchema } from '#/adapter/form'; import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { BpmProcessInstanceApi } from '#/api/bpm/processInstance';
import { h } from 'vue';
import { DICT_TYPE } from '@vben/constants'; import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks'; import { getDictOptions } from '@vben/hooks';
import { Button } from 'ant-design-vue';
import { getCategorySimpleList } from '#/api/bpm/category'; import { getCategorySimpleList } from '#/api/bpm/category';
import { getSimpleProcessDefinitionList } from '#/api/bpm/definition';
import { getSimpleUserList } from '#/api/system/user'; import { getSimpleUserList } from '#/api/system/user';
import { getRangePickerDefaultProps } from '#/utils'; import { getRangePickerDefaultProps } from '#/utils';
@@ -23,7 +19,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
componentProps: { componentProps: {
placeholder: '请选择发起人', placeholder: '请选择发起人',
allowClear: true, allowClear: true,
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },
@@ -40,13 +36,15 @@ export function useGridFormSchema(): VbenFormSchema[] {
{ {
fieldName: 'processDefinitionId', fieldName: 'processDefinitionId',
label: '所属流程', label: '所属流程',
component: 'Input', component: 'ApiSelect',
componentProps: { componentProps: {
placeholder: '请输入流程定义的编号', placeholder: '请选择流程定义',
allowClear: true, allowClear: true,
api: getSimpleProcessDefinitionList,
labelField: 'name',
valueField: 'id',
}, },
}, },
// 流程分类
{ {
fieldName: 'category', fieldName: 'category',
label: '流程分类', label: '流程分类',
@@ -54,12 +52,11 @@ export function useGridFormSchema(): VbenFormSchema[] {
componentProps: { componentProps: {
placeholder: '请输入流程分类', placeholder: '请输入流程分类',
allowClear: true, allowClear: true,
api: () => getCategorySimpleList(), api: getCategorySimpleList,
labelField: 'name', labelField: 'name',
valueField: 'code', valueField: 'code',
}, },
}, },
// 流程状态
{ {
fieldName: 'status', fieldName: 'status',
label: '流程状态', label: '流程状态',
@@ -73,7 +70,6 @@ export function useGridFormSchema(): VbenFormSchema[] {
allowClear: true, allowClear: true,
}, },
}, },
// 发起时间
{ {
fieldName: 'createTime', fieldName: 'createTime',
label: '发起时间', label: '发起时间',
@@ -87,9 +83,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
} }
/** 列表的字段 */ /** 列表的字段 */
export function useGridColumns( export function useGridColumns(): VxeTableGridOptions['columns'] {
onTaskClick: (task: BpmProcessInstanceApi.Task) => void,
): VxeTableGridOptions['columns'] {
return [ return [
{ {
field: 'id', field: 'id',
@@ -103,27 +97,22 @@ export function useGridColumns(
minWidth: 200, minWidth: 200,
fixed: 'left', fixed: 'left',
}, },
{ {
field: 'categoryName', field: 'categoryName',
title: '流程分类', title: '流程分类',
minWidth: 120, minWidth: 120,
fixed: 'left', fixed: 'left',
}, },
{ {
field: 'startUser.nickname', field: 'startUser.nickname',
title: '流程发起人', title: '流程发起人',
minWidth: 120, minWidth: 120,
}, },
{ {
field: 'startUser.deptName', field: 'startUser.deptName',
title: '发起部门', title: '发起部门',
minWidth: 120, minWidth: 120,
}, },
// 流程状态
{ {
field: 'status', field: 'status',
title: '流程状态', title: '流程状态',
@@ -133,7 +122,6 @@ export function useGridColumns(
props: { type: DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS }, props: { type: DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS },
}, },
}, },
{ {
field: 'startTime', field: 'startTime',
title: '发起时间', title: '发起时间',
@@ -152,29 +140,11 @@ export function useGridColumns(
minWidth: 180, minWidth: 180,
formatter: 'formatPast2', formatter: 'formatPast2',
}, },
// 当前审批任务 tasks
{ {
field: 'tasks', field: 'tasks',
title: '当前审批任务', title: '当前审批任务',
minWidth: 320, minWidth: 320,
slots: { slots: { default: 'tasks' },
default: ({ row }) => {
if (!row?.tasks?.length) return '-';
return row.tasks.map((task: BpmProcessInstanceApi.Task) =>
h(
Button,
{
type: 'link',
size: 'small',
onClick: () => onTaskClick(task),
},
{ default: () => task.name },
),
);
},
},
}, },
{ {
title: '操作', title: '操作',

View File

@@ -7,7 +7,7 @@ import { h } from 'vue';
import { DocAlert, Page, prompt } from '@vben/common-ui'; import { DocAlert, Page, prompt } from '@vben/common-ui';
import { BpmProcessInstanceStatus } from '@vben/constants'; import { BpmProcessInstanceStatus } from '@vben/constants';
import { message, Textarea } from 'ant-design-vue'; import { Button, message, Textarea } from 'ant-design-vue';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { import {
@@ -26,15 +26,19 @@ function handleRefresh() {
gridApi.query(); gridApi.query();
} }
/** 点击任务 */ /** 查看任务详情 */
function onTaskClick(task: BpmProcessInstanceApi.Task) { function handleTaskDetail(
// TODO 待实现 row: BpmProcessInstanceApi.ProcessInstance,
console.warn(task); task: BpmProcessInstanceApi.Task,
) {
router.push({
name: 'BpmProcessInstanceDetail',
query: { id: row.id, taskId: task.id },
});
} }
/** 查看流程实例 */ /** 查看流程实例 */
function handleDetail(row: BpmProcessInstanceApi.ProcessInstance) { function handleDetail(row: BpmProcessInstanceApi.ProcessInstance) {
console.warn(row);
router.push({ router.push({
name: 'BpmProcessInstanceDetail', name: 'BpmProcessInstanceDetail',
query: { id: row.id }, query: { id: row.id },
@@ -44,36 +48,23 @@ function handleDetail(row: BpmProcessInstanceApi.ProcessInstance) {
/** 取消流程实例 */ /** 取消流程实例 */
function handleCancel(row: BpmProcessInstanceApi.ProcessInstance) { function handleCancel(row: BpmProcessInstanceApi.ProcessInstance) {
prompt({ prompt({
async beforeClose(scope) {
if (scope.isConfirm) {
if (scope.value) {
try {
await cancelProcessInstanceByAdmin(row.id, scope.value);
message.success('取消成功');
handleRefresh();
} catch {
return false;
}
} else {
message.error('请输入取消原因');
return false;
}
}
},
component: () => { component: () => {
return h(Textarea, { return h(Textarea, {
placeholder: '请输入取消原因', placeholder: '请输入取消原因',
allowClear: true, allowClear: true,
rows: 2, rows: 2,
rules: [{ required: true, message: '请输入取消原因' }],
}); });
}, },
content: '请输入取消原因', content: '请输入取消原因',
title: '取消流程', title: '取消流程',
modelPropName: 'value', modelPropName: 'value',
}) }).then(async (reason) => {
.then(() => {}) if (reason) {
.catch(() => {}); await cancelProcessInstanceByAdmin(row.id, reason);
message.success('取消成功');
handleRefresh();
}
});
} }
const [Grid, gridApi] = useVbenVxeGrid({ const [Grid, gridApi] = useVbenVxeGrid({
@@ -81,7 +72,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
schema: useGridFormSchema(), schema: useGridFormSchema(),
}, },
gridOptions: { gridOptions: {
columns: useGridColumns(onTaskClick), columns: useGridColumns(),
height: 'auto', height: 'auto',
keepSource: true, keepSource: true,
proxyConfig: { proxyConfig: {
@@ -97,6 +88,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
}, },
rowConfig: { rowConfig: {
keyField: 'id', keyField: 'id',
isHover: true,
}, },
toolbarConfig: { toolbarConfig: {
refresh: true, refresh: true,
@@ -113,6 +105,19 @@ const [Grid, gridApi] = useVbenVxeGrid({
</template> </template>
<Grid table-title="流程实例"> <Grid table-title="流程实例">
<template #tasks="{ row }">
<template v-if="row.tasks && row.tasks.length > 0">
<Button
v-for="task in row.tasks"
:key="task.id"
type="link"
@click="handleTaskDetail(row, task)"
>
{{ task.name }}
</Button>
</template>
<span v-else>-</span>
</template>
<template #actions="{ row }"> <template #actions="{ row }">
<TableAction <TableAction
:actions="[ :actions="[

View File

@@ -64,6 +64,7 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.BPM_PROCESS_LISTENER_TYPE, 'string'), options: getDictOptions(DICT_TYPE.BPM_PROCESS_LISTENER_TYPE, 'string'),
placeholder: '请选择类型',
allowClear: true, allowClear: true,
}, },
rules: 'required', rules: 'required',
@@ -74,6 +75,7 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: EVENT_OPTIONS, options: EVENT_OPTIONS,
placeholder: '请选择事件',
allowClear: true, allowClear: true,
}, },
rules: 'required', rules: 'required',
@@ -97,6 +99,7 @@ export function useFormSchema(): VbenFormSchema[] {
DICT_TYPE.BPM_PROCESS_LISTENER_VALUE_TYPE, DICT_TYPE.BPM_PROCESS_LISTENER_VALUE_TYPE,
'string', 'string',
), ),
placeholder: '请选择值类型',
allowClear: true, allowClear: true,
}, },
rules: 'required', rules: 'required',
@@ -165,6 +168,15 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
props: { type: DICT_TYPE.BPM_PROCESS_LISTENER_TYPE }, props: { type: DICT_TYPE.BPM_PROCESS_LISTENER_TYPE },
}, },
}, },
{
field: 'status',
title: '状态',
minWidth: 100,
cellRender: {
name: 'CellDict',
props: { type: DICT_TYPE.COMMON_STATUS },
},
},
{ {
field: 'event', field: 'event',
title: '事件', title: '事件',
@@ -191,9 +203,8 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
formatter: 'formatDateTime', formatter: 'formatDateTime',
}, },
{ {
field: 'actions',
title: '操作', title: '操作',
minWidth: 180, width: 180,
fixed: 'right', fixed: 'right',
slots: { default: 'actions' }, slots: { default: 'actions' },
}, },

View File

@@ -44,11 +44,9 @@ async function handleDelete(row: BpmProcessListenerApi.ProcessListener) {
}); });
try { try {
await deleteProcessListener(row.id as number); await deleteProcessListener(row.id as number);
message.success({ message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
});
handleRefresh(); handleRefresh();
} catch { } finally {
hideLoading(); hideLoading();
} }
} }
@@ -74,6 +72,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
}, },
rowConfig: { rowConfig: {
keyField: 'id', keyField: 'id',
isHover: true,
}, },
toolbarConfig: { toolbarConfig: {
refresh: true, refresh: true,

View File

@@ -55,9 +55,7 @@ const [Modal, modalApi] = useVbenModal({
// 关闭并提示 // 关闭并提示
await modalApi.close(); await modalApi.close();
emit('success'); emit('success');
message.success({ message.success($t('ui.actionMessage.operationSuccess'));
content: $t('ui.actionMessage.operationSuccess'),
});
} finally { } finally {
modalApi.unlock(); modalApi.unlock();
} }

View File

@@ -34,7 +34,6 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
field: 'processInstanceName', field: 'processInstanceName',
title: '流程名称', title: '流程名称',
minWidth: 200, minWidth: 200,
fixed: 'left',
}, },
{ {
field: 'summary', field: 'summary',
@@ -62,12 +61,12 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{ {
field: 'activityName', field: 'activityName',
title: '抄送节点', title: '抄送节点',
minWidth: 180, minWidth: 120,
}, },
{ {
field: 'createUser.nickname', field: 'createUser.nickname',
title: '抄送人', title: '抄送人',
minWidth: 180, minWidth: 120,
formatter: ({ cellValue }) => { formatter: ({ cellValue }) => {
return cellValue || '-'; return cellValue || '-';
}, },

View File

@@ -46,14 +46,12 @@ const [Grid] = useVbenVxeGrid({
}, },
rowConfig: { rowConfig: {
keyField: 'id', keyField: 'id',
isHover: true,
}, },
toolbarConfig: { toolbarConfig: {
refresh: true, refresh: true,
search: true, search: true,
}, },
cellConfig: {
height: 64,
},
} as VxeTableGridOptions<BpmProcessInstanceApi.Copy>, } as VxeTableGridOptions<BpmProcessInstanceApi.Copy>,
}); });
</script> </script>

View File

@@ -5,6 +5,7 @@ import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks'; import { getDictOptions } from '@vben/hooks';
import { getCategorySimpleList } from '#/api/bpm/category'; import { getCategorySimpleList } from '#/api/bpm/category';
import { getSimpleProcessDefinitionList } from '#/api/bpm/definition';
import { getRangePickerDefaultProps } from '#/utils'; import { getRangePickerDefaultProps } from '#/utils';
/** 列表的搜索表单 */ /** 列表的搜索表单 */
@@ -20,12 +21,15 @@ export function useGridFormSchema(): VbenFormSchema[] {
}, },
}, },
{ {
fieldName: 'processDefinitionId', fieldName: 'processDefinitionKey',
label: '所属流程', label: '所属流程',
component: 'Input', component: 'ApiSelect',
componentProps: { componentProps: {
placeholder: '请输入流程定义的编号', placeholder: '请选择流程定义',
allowClear: true, allowClear: true,
api: getSimpleProcessDefinitionList,
labelField: 'name',
valueField: 'key',
}, },
}, },
{ {
@@ -35,7 +39,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
componentProps: { componentProps: {
placeholder: '请输入流程分类', placeholder: '请输入流程分类',
allowClear: true, allowClear: true,
api: () => getCategorySimpleList(), api: getCategorySimpleList,
labelField: 'name', labelField: 'name',
valueField: 'code', valueField: 'code',
}, },
@@ -69,7 +73,6 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
field: 'processInstance.name', field: 'processInstance.name',
title: '流程', title: '流程',
minWidth: 200, minWidth: 200,
fixed: 'left',
}, },
{ {
field: 'processInstance.summary', field: 'processInstance.summary',
@@ -88,6 +91,12 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
title: '发起人', title: '发起人',
minWidth: 120, minWidth: 120,
}, },
{
field: 'processInstance.createTime',
title: '发起时间',
minWidth: 180,
formatter: 'formatDateTime',
},
{ {
field: 'name', field: 'name',
title: '当前任务', title: '当前任务',

View File

@@ -6,6 +6,8 @@ import { DocAlert, Page } from '@vben/common-ui';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
import { $t } from '#/locales';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { getTaskDonePage, withdrawTask } from '#/api/bpm/task'; import { getTaskDonePage, withdrawTask } from '#/api/bpm/task';
import { router } from '#/router'; import { router } from '#/router';
@@ -27,10 +29,17 @@ function handleHistory(row: BpmTaskApi.TaskManager) {
/** 撤回任务 */ /** 撤回任务 */
async function handleWithdraw(row: BpmTaskApi.TaskManager) { async function handleWithdraw(row: BpmTaskApi.TaskManager) {
await withdrawTask(row.id); const hideLoading = message.loading({
message.success('撤回成功'); content: '正在撤回中...',
// 刷新表格数据 duration: 0,
await gridApi.query(); });
try {
await withdrawTask(row.id);
message.success('撤回成功');
await gridApi.query();
} finally {
hideLoading();
}
} }
const [Grid, gridApi] = useVbenVxeGrid({ const [Grid, gridApi] = useVbenVxeGrid({
@@ -54,14 +63,12 @@ const [Grid, gridApi] = useVbenVxeGrid({
}, },
rowConfig: { rowConfig: {
keyField: 'id', keyField: 'id',
isHover: true,
}, },
toolbarConfig: { toolbarConfig: {
refresh: true, refresh: true,
search: true, search: true,
}, },
cellConfig: {
height: 64,
},
} as VxeTableGridOptions<BpmTaskApi.TaskManager>, } as VxeTableGridOptions<BpmTaskApi.TaskManager>,
}); });
</script> </script>
@@ -88,9 +95,12 @@ const [Grid, gridApi] = useVbenVxeGrid({
{ {
label: '撤回', label: '撤回',
type: 'link', type: 'link',
icon: ACTION_ICON.EDIT, danger: true,
color: 'warning', icon: ACTION_ICON.DELETE,
onClick: handleWithdraw.bind(null, row), popConfirm: {
title: '确定要撤回该任务吗?',
confirm: handleWithdraw.bind(null, row),
},
}, },
{ {
label: '历史', label: '历史',

View File

@@ -36,7 +36,6 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
field: 'processInstance.name', field: 'processInstance.name',
title: '流程', title: '流程',
minWidth: 200, minWidth: 200,
fixed: 'left',
}, },
{ {
field: 'processInstance.startUser.nickname', field: 'processInstance.startUser.nickname',

View File

@@ -43,14 +43,12 @@ const [Grid] = useVbenVxeGrid({
}, },
rowConfig: { rowConfig: {
keyField: 'id', keyField: 'id',
isHover: true,
}, },
toolbarConfig: { toolbarConfig: {
refresh: true, refresh: true,
search: true, search: true,
}, },
cellConfig: {
height: 64,
},
} as VxeTableGridOptions<BpmTaskApi.TaskManager>, } as VxeTableGridOptions<BpmTaskApi.TaskManager>,
}); });
</script> </script>
@@ -60,6 +58,7 @@ const [Grid] = useVbenVxeGrid({
<template #doc> <template #doc>
<DocAlert title="工作流手册" url="https://doc.iocoder.cn/bpm/" /> <DocAlert title="工作流手册" url="https://doc.iocoder.cn/bpm/" />
</template> </template>
<Grid table-title="流程任务"> <Grid table-title="流程任务">
<template #actions="{ row }"> <template #actions="{ row }">
<TableAction <TableAction

View File

@@ -5,6 +5,7 @@ import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks'; import { getDictOptions } from '@vben/hooks';
import { getCategorySimpleList } from '#/api/bpm/category'; import { getCategorySimpleList } from '#/api/bpm/category';
import { getSimpleProcessDefinitionList } from '#/api/bpm/definition';
import { getRangePickerDefaultProps } from '#/utils'; import { getRangePickerDefaultProps } from '#/utils';
/** 列表的搜索表单 */ /** 列表的搜索表单 */
@@ -20,12 +21,15 @@ export function useGridFormSchema(): VbenFormSchema[] {
}, },
}, },
{ {
fieldName: 'processDefinitionId', fieldName: 'processDefinitionKey',
label: '所属流程', label: '所属流程',
component: 'Input', component: 'ApiSelect',
componentProps: { componentProps: {
placeholder: '请输入流程定义的编号', placeholder: '请选择流程定义',
allowClear: true, allowClear: true,
api: getSimpleProcessDefinitionList,
labelField: 'name',
valueField: 'key',
}, },
}, },
{ {
@@ -35,7 +39,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
componentProps: { componentProps: {
placeholder: '请输入流程分类', placeholder: '请输入流程分类',
allowClear: true, allowClear: true,
api: () => getCategorySimpleList(), api: getCategorySimpleList,
labelField: 'name', labelField: 'name',
valueField: 'code', valueField: 'code',
}, },
@@ -72,7 +76,6 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
field: 'processInstance.name', field: 'processInstance.name',
title: '流程', title: '流程',
minWidth: 200, minWidth: 200,
fixed: 'left',
}, },
{ {
field: 'processInstance.summary', field: 'processInstance.summary',
@@ -91,6 +94,12 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
title: '发起人', title: '发起人',
minWidth: 120, minWidth: 120,
}, },
{
field: 'processInstance.createTime',
title: '发起时间',
minWidth: 180,
formatter: 'formatDateTime',
},
{ {
field: 'name', field: 'name',
title: '当前任务', title: '当前任务',

View File

@@ -14,11 +14,10 @@ defineOptions({ name: 'BpmTodoTask' });
/** 办理任务 */ /** 办理任务 */
function handleAudit(row: BpmTaskApi.Task) { function handleAudit(row: BpmTaskApi.Task) {
console.warn(row);
router.push({ router.push({
name: 'BpmProcessInstanceDetail', name: 'BpmProcessInstanceDetail',
query: { query: {
id: row.processInstance.id, id: row.processInstance!.id,
taskId: row.id, taskId: row.id,
}, },
}); });
@@ -45,14 +44,12 @@ const [Grid] = useVbenVxeGrid({
}, },
rowConfig: { rowConfig: {
keyField: 'id', keyField: 'id',
isHover: true,
}, },
toolbarConfig: { toolbarConfig: {
refresh: true, refresh: true,
search: true, search: true,
}, },
cellConfig: {
height: 64,
},
} as VxeTableGridOptions<BpmTaskApi.Task>, } as VxeTableGridOptions<BpmTaskApi.Task>,
}); });
</script> </script>

View File

@@ -40,7 +40,7 @@ export function useFormSchema(): VbenFormSchema[] {
disabled: (values) => values.id, disabled: (values) => values.id,
}, },
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
placeholder: '请选择负责人', placeholder: '请选择负责人',
@@ -54,7 +54,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '客户名称', label: '客户名称',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getCustomerSimpleList(), api: getCustomerSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择客户', placeholder: '请选择客户',
@@ -80,7 +80,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '商机状态组', label: '商机状态组',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getBusinessStatusTypeSimpleList(), api: getBusinessStatusTypeSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择商机状态组', placeholder: '请选择商机状态组',

View File

@@ -21,7 +21,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'totalPrice', field: 'totalPrice',
label: '商机金额(元)', label: '商机金额(元)',
content: (data) => erpPriceInputFormatter(data.totalPrice), render: (val) => erpPriceInputFormatter(val),
}, },
{ {
field: 'statusTypeName', field: 'statusTypeName',
@@ -34,7 +34,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'createTime', field: 'createTime',
label: '创建时间', label: '创建时间',
content: (data) => formatDateTime(data?.createTime) as string, render: (val) => formatDateTime(val) as string,
}, },
]; ];
} }
@@ -53,17 +53,17 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
{ {
field: 'totalPrice', field: 'totalPrice',
label: '商机金额(元)', label: '商机金额(元)',
content: (data) => erpPriceInputFormatter(data.totalPrice), render: (val) => erpPriceInputFormatter(val),
}, },
{ {
field: 'dealTime', field: 'dealTime',
label: '预计成交日期', label: '预计成交日期',
content: (data) => formatDateTime(data?.dealTime) as string, render: (val) => formatDateTime(val) as string,
}, },
{ {
field: 'contactNextTime', field: 'contactNextTime',
label: '下次联系时间', label: '下次联系时间',
content: (data) => formatDateTime(data?.contactNextTime) as string, render: (val) => formatDateTime(val) as string,
}, },
{ {
field: 'statusTypeName', field: 'statusTypeName',

View File

@@ -23,9 +23,9 @@ import { PermissionList, TransferForm } from '#/views/crm/permission';
import { ProductDetailsList } from '#/views/crm/product/components'; import { ProductDetailsList } from '#/views/crm/product/components';
import Form from '../modules/form.vue'; import Form from '../modules/form.vue';
import UpStatusForm from './modules/status-form.vue';
import { useDetailSchema } from './data'; import { useDetailSchema } from './data';
import BusinessDetailsInfo from './modules/info.vue'; import BusinessDetailsInfo from './modules/info.vue';
import UpStatusForm from './modules/status-form.vue';
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
@@ -38,11 +38,9 @@ const logList = ref<SystemOperateLogApi.OperateLog[]>([]);
const permissionListRef = ref<InstanceType<typeof PermissionList>>(); // 团队成员列表 Ref const permissionListRef = ref<InstanceType<typeof PermissionList>>(); // 团队成员列表 Ref
const [Descriptions] = useDescription({ const [Descriptions] = useDescription({
componentProps: { bordered: false,
bordered: false, column: 4,
column: 4, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailSchema(), schema: useDetailSchema(),
}); });

View File

@@ -12,31 +12,27 @@ defineProps<{
business: CrmBusinessApi.Business; // 商机信息 business: CrmBusinessApi.Business; // 商机信息
}>(); }>();
const [BaseDescriptions] = useDescription({ const [BaseDescription] = useDescription({
componentProps: { title: '基本信息',
title: '基本信息', bordered: false,
bordered: false, column: 4,
column: 4, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailBaseSchema(), schema: useDetailBaseSchema(),
}); });
const [SystemDescriptions] = useDescription({ const [SystemDescription] = useDescription({
componentProps: { title: '系统信息',
title: '系统信息', bordered: false,
bordered: false, column: 3,
column: 3, class: 'mx-4',
class: 'mx-4',
},
schema: useFollowUpDetailSchema(), schema: useFollowUpDetailSchema(),
}); });
</script> </script>
<template> <template>
<div class="p-4"> <div class="p-4">
<BaseDescriptions :data="business" /> <BaseDescription :data="business" />
<Divider /> <Divider />
<SystemDescriptions :data="business" /> <SystemDescription :data="business" />
</div> </div>
</template> </template>

View File

@@ -53,7 +53,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '负责人', label: '负责人',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
allowClear: true, allowClear: true,
@@ -121,7 +121,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '地址', label: '地址',
component: 'ApiTreeSelect', component: 'ApiTreeSelect',
componentProps: { componentProps: {
api: () => getAreaTree(), api: getAreaTree,
fieldNames: { label: 'name', value: 'id', children: 'children' }, fieldNames: { label: 'name', value: 'id', children: 'children' },
placeholder: '请选择地址', placeholder: '请选择地址',
}, },

View File

@@ -13,10 +13,10 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'source', field: 'source',
label: '线索来源', label: '线索来源',
content: (data) => render: (val) =>
h(DictTag, { h(DictTag, {
type: DICT_TYPE.CRM_CUSTOMER_SOURCE, type: DICT_TYPE.CRM_CUSTOMER_SOURCE,
value: data?.source, value: val,
}), }),
}, },
{ {
@@ -30,7 +30,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'createTime', field: 'createTime',
label: '创建时间', label: '创建时间',
content: (data) => formatDateTime(data?.createTime) as string, render: (val) => formatDateTime(val) as string,
}, },
]; ];
} }
@@ -45,10 +45,10 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
{ {
field: 'source', field: 'source',
label: '客户来源', label: '客户来源',
content: (data) => render: (val) =>
h(DictTag, { h(DictTag, {
type: DICT_TYPE.CRM_CUSTOMER_SOURCE, type: DICT_TYPE.CRM_CUSTOMER_SOURCE,
value: data?.source, value: val,
}), }),
}, },
{ {
@@ -66,8 +66,8 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
{ {
field: 'areaName', field: 'areaName',
label: '地址', label: '地址',
content: (data) => { render: (val, data) => {
const areaName = data.areaName ?? ''; const areaName = val ?? '';
const detailAddress = data?.detailAddress ?? ''; const detailAddress = data?.detailAddress ?? '';
return [areaName, detailAddress].filter((item) => !!item).join(' '); return [areaName, detailAddress].filter((item) => !!item).join(' ');
}, },
@@ -83,25 +83,25 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
{ {
field: 'industryId', field: 'industryId',
label: '客户行业', label: '客户行业',
content: (data) => render: (val) =>
h(DictTag, { h(DictTag, {
type: DICT_TYPE.CRM_CUSTOMER_INDUSTRY, type: DICT_TYPE.CRM_CUSTOMER_INDUSTRY,
value: data?.industryId, value: val,
}), }),
}, },
{ {
field: 'level', field: 'level',
label: '客户级别', label: '客户级别',
content: (data) => render: (val) =>
h(DictTag, { h(DictTag, {
type: DICT_TYPE.CRM_CUSTOMER_LEVEL, type: DICT_TYPE.CRM_CUSTOMER_LEVEL,
value: data?.level, value: val,
}), }),
}, },
{ {
field: 'contactNextTime', field: 'contactNextTime',
label: '下次联系时间', label: '下次联系时间',
content: (data) => formatDateTime(data?.contactNextTime) as string, render: (val) => formatDateTime(val) as string,
}, },
{ {
field: 'remark', field: 'remark',

View File

@@ -34,11 +34,9 @@ const logList = ref<SystemOperateLogApi.OperateLog[]>([]); // 操作日志
const permissionListRef = ref<InstanceType<typeof PermissionList>>(); // 团队成员列表 Ref const permissionListRef = ref<InstanceType<typeof PermissionList>>(); // 团队成员列表 Ref
const [Descriptions] = useDescription({ const [Descriptions] = useDescription({
componentProps: { bordered: false,
bordered: false, column: 4,
column: 4, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailSchema(), schema: useDetailSchema(),
}); });

View File

@@ -13,22 +13,18 @@ defineProps<{
}>(); }>();
const [BaseDescriptions] = useDescription({ const [BaseDescriptions] = useDescription({
componentProps: { title: '基本信息',
title: '基本信息', bordered: false,
bordered: false, column: 4,
column: 4, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailBaseSchema(), schema: useDetailBaseSchema(),
}); });
const [SystemDescriptions] = useDescription({ const [SystemDescriptions] = useDescription({
componentProps: { title: '系统信息',
title: '系统信息', bordered: false,
bordered: false, column: 3,
column: 3, class: 'mx-4',
class: 'mx-4',
},
schema: useFollowUpDetailSchema(), schema: useFollowUpDetailSchema(),
}); });
</script> </script>

View File

@@ -41,7 +41,7 @@ export function useFormSchema(): VbenFormSchema[] {
disabled: (values) => values.id, disabled: (values) => values.id,
}, },
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
placeholder: '请选择负责人', placeholder: '请选择负责人',
@@ -54,7 +54,7 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
rules: 'required', rules: 'required',
componentProps: { componentProps: {
api: () => getCustomerSimpleList(), api: getCustomerSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择客户', placeholder: '请选择客户',
@@ -134,7 +134,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '直属上级', label: '直属上级',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleContactList(), api: getSimpleContactList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择直属上级', placeholder: '请选择直属上级',
@@ -145,7 +145,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '地址', label: '地址',
component: 'ApiTreeSelect', component: 'ApiTreeSelect',
componentProps: { componentProps: {
api: () => getAreaTree(), api: getAreaTree,
fieldNames: { label: 'name', value: 'id', children: 'children' }, fieldNames: { label: 'name', value: 'id', children: 'children' },
placeholder: '请选择地址', placeholder: '请选择地址',
}, },
@@ -188,7 +188,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '客户', label: '客户',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getCustomerSimpleList(), api: getCustomerSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择客户', placeholder: '请选择客户',

View File

@@ -25,7 +25,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'createTime', field: 'createTime',
label: '创建时间', label: '创建时间',
content: (data) => formatDateTime(data?.createTime) as string, render: (val) => formatDateTime(val) as string,
}, },
]; ];
} }
@@ -64,10 +64,10 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
{ {
field: 'areaName', field: 'areaName',
label: '地址', label: '地址',
content: (data) => { render: (val, data) => {
const areaName = data?.areaName ?? ''; const areaName = val ?? '';
const detailAddress = data?.detailAddress ?? ''; const detailAddress = data?.detailAddress ?? '';
return [areaName, detailAddress].filter(Boolean).join(' '); return [areaName, detailAddress].filter((item) => !!item).join(' ');
}, },
}, },
{ {
@@ -81,22 +81,22 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
{ {
field: 'master', field: 'master',
label: '关键决策人', label: '关键决策人',
content: (data) => render: (val) =>
h(DictTag, { h(DictTag, {
type: DICT_TYPE.INFRA_BOOLEAN_STRING, type: DICT_TYPE.INFRA_BOOLEAN_STRING,
value: data?.master, value: val,
}), }),
}, },
{ {
field: 'sex', field: 'sex',
label: '性别', label: '性别',
content: (data) => render: (val) =>
h(DictTag, { type: DICT_TYPE.SYSTEM_USER_SEX, value: data?.sex }), h(DictTag, { type: DICT_TYPE.SYSTEM_USER_SEX, value: val }),
}, },
{ {
field: 'contactNextTime', field: 'contactNextTime',
label: '下次联系时间', label: '下次联系时间',
content: (data) => formatDateTime(data?.contactNextTime) as string, render: (val) => formatDateTime(val) as string,
}, },
{ {
field: 'remark', field: 'remark',

View File

@@ -36,11 +36,9 @@ const logList = ref<SystemOperateLogApi.OperateLog[]>([]); // 操作日志
const permissionListRef = ref<InstanceType<typeof PermissionList>>(); // 团队成员列表 Ref const permissionListRef = ref<InstanceType<typeof PermissionList>>(); // 团队成员列表 Ref
const [Descriptions] = useDescription({ const [Descriptions] = useDescription({
componentProps: { bordered: false,
bordered: false, column: 4,
column: 4, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailSchema(), schema: useDetailSchema(),
}); });

View File

@@ -13,22 +13,18 @@ defineProps<{
}>(); }>();
const [BaseDescriptions] = useDescription({ const [BaseDescriptions] = useDescription({
componentProps: { title: '基本信息',
title: '基本信息', bordered: false,
bordered: false, column: 4,
column: 4, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailBaseSchema(), schema: useDetailBaseSchema(),
}); });
const [SystemDescriptions] = useDescription({ const [SystemDescriptions] = useDescription({
componentProps: { title: '系统信息',
title: '系统信息', bordered: false,
bordered: false, column: 3,
column: 3, class: 'mx-4',
class: 'mx-4',
},
schema: useFollowUpDetailSchema(), schema: useFollowUpDetailSchema(),
}); });
</script> </script>

View File

@@ -46,7 +46,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '负责人', label: '负责人',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },
@@ -63,7 +63,7 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
rules: 'required', rules: 'required',
componentProps: { componentProps: {
api: () => getCustomerSimpleList(), api: getCustomerSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择客户', placeholder: '请选择客户',
@@ -137,7 +137,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '公司签约人', label: '公司签约人',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },
@@ -263,7 +263,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '客户', label: '客户',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getCustomerSimpleList(), api: getCustomerSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择客户', placeholder: '请选择客户',

View File

@@ -17,18 +17,17 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'totalPrice', field: 'totalPrice',
label: '合同金额(元)', label: '合同金额(元)',
content: (data) => erpPriceInputFormatter(data?.totalPrice) as string, render: (val) => erpPriceInputFormatter(val) as string,
}, },
{ {
field: 'orderDate', field: 'orderDate',
label: '下单时间', label: '下单时间',
content: (data) => formatDateTime(data?.orderDate) as string, render: (val) => formatDateTime(val) as string,
}, },
{ {
field: 'totalReceivablePrice', field: 'totalReceivablePrice',
label: '回款金额(元)', label: '回款金额(元)',
content: (data) => render: (val) => erpPriceInputFormatter(val) as string,
erpPriceInputFormatter(data?.totalReceivablePrice) as string,
}, },
{ {
field: 'ownerUserName', field: 'ownerUserName',
@@ -59,22 +58,22 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
{ {
field: 'totalPrice', field: 'totalPrice',
label: '合同金额(元)', label: '合同金额(元)',
content: (data) => erpPriceInputFormatter(data?.totalPrice) as string, render: (val) => erpPriceInputFormatter(val) as string,
}, },
{ {
field: 'orderDate', field: 'orderDate',
label: '下单时间', label: '下单时间',
content: (data) => formatDateTime(data?.orderDate) as string, render: (val) => formatDateTime(val) as string,
}, },
{ {
field: 'startTime', field: 'startTime',
label: '合同开始时间', label: '合同开始时间',
content: (data) => formatDateTime(data?.startTime) as string, render: (val) => formatDateTime(val) as string,
}, },
{ {
field: 'endTime', field: 'endTime',
label: '合同结束时间', label: '合同结束时间',
content: (data) => formatDateTime(data?.endTime) as string, render: (val) => formatDateTime(val) as string,
}, },
{ {
field: 'signContactName', field: 'signContactName',
@@ -91,10 +90,10 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
{ {
field: 'auditStatus', field: 'auditStatus',
label: '合同状态', label: '合同状态',
content: (data) => render: (val) =>
h(DictTag, { h(DictTag, {
type: DICT_TYPE.CRM_AUDIT_STATUS, type: DICT_TYPE.CRM_AUDIT_STATUS,
value: data?.auditStatus, value: val,
}), }),
}, },
]; ];

View File

@@ -40,11 +40,9 @@ const logList = ref<SystemOperateLogApi.OperateLog[]>([]); // 操作日志
const permissionListRef = ref<InstanceType<typeof PermissionList>>(); // 团队成员列表 Ref const permissionListRef = ref<InstanceType<typeof PermissionList>>(); // 团队成员列表 Ref
const [Descriptions] = useDescription({ const [Descriptions] = useDescription({
componentProps: { bordered: false,
bordered: false, column: 4,
column: 4, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailSchema(), schema: useDetailSchema(),
}); });

View File

@@ -13,22 +13,18 @@ defineProps<{
}>(); }>();
const [BaseDescriptions] = useDescription({ const [BaseDescriptions] = useDescription({
componentProps: { title: '基本信息',
title: '基本信息', bordered: false,
bordered: false, column: 4,
column: 4, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailBaseSchema(), schema: useDetailBaseSchema(),
}); });
const [SystemDescriptions] = useDescription({ const [SystemDescriptions] = useDescription({
componentProps: { title: '系统信息',
title: '系统信息', bordered: false,
bordered: false, column: 3,
column: 3, class: 'mx-4',
class: 'mx-4',
},
schema: useFollowUpDetailSchema(), schema: useFollowUpDetailSchema(),
}); });
</script> </script>

View File

@@ -60,7 +60,7 @@ export function useFormSchema(): VbenFormSchema[] {
disabled: (values) => values.id, disabled: (values) => values.id,
}, },
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
placeholder: '请选择负责人', placeholder: '请选择负责人',
@@ -130,7 +130,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '地址', label: '地址',
component: 'ApiTreeSelect', component: 'ApiTreeSelect',
componentProps: { componentProps: {
api: () => getAreaTree(), api: getAreaTree,
fieldNames: { label: 'name', value: 'id', children: 'children' }, fieldNames: { label: 'name', value: 'id', children: 'children' },
placeholder: '请选择地址', placeholder: '请选择地址',
allowClear: true, allowClear: true,
@@ -220,7 +220,7 @@ export function useImportFormSchema(): VbenFormSchema[] {
label: '负责人', label: '负责人',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
placeholder: '请选择负责人', placeholder: '请选择负责人',

View File

@@ -27,7 +27,7 @@ export function useDistributeFormSchema(): VbenFormSchema[] {
label: '负责人', label: '负责人',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },
@@ -43,13 +43,13 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'level', field: 'level',
label: '客户级别', label: '客户级别',
content: (data) => render: (val) =>
h(DictTag, { type: DICT_TYPE.CRM_CUSTOMER_LEVEL, value: data?.level }), h(DictTag, { type: DICT_TYPE.CRM_CUSTOMER_LEVEL, value: val }),
}, },
{ {
field: 'dealStatus', field: 'dealStatus',
label: '成交状态', label: '成交状态',
content: (data) => (data.dealStatus ? '已成交' : '未成交'), render: (val) => (val ? '已成交' : '未成交'),
}, },
{ {
field: 'ownerUserName', field: 'ownerUserName',
@@ -58,7 +58,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'createTime', field: 'createTime',
label: '创建时间', label: '创建时间',
content: (data) => formatDateTime(data?.createTime) as string, render: (val) => formatDateTime(val) as string,
}, },
]; ];
} }
@@ -73,10 +73,10 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
{ {
field: 'source', field: 'source',
label: '客户来源', label: '客户来源',
content: (data) => render: (val) =>
h(DictTag, { h(DictTag, {
type: DICT_TYPE.CRM_CUSTOMER_SOURCE, type: DICT_TYPE.CRM_CUSTOMER_SOURCE,
value: data?.source, value: val,
}), }),
}, },
{ {
@@ -94,8 +94,8 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
{ {
field: 'areaName', field: 'areaName',
label: '地址', label: '地址',
content: (data) => { render: (val, data) => {
const areaName = data?.areaName ?? ''; const areaName = val ?? '';
const detailAddress = data?.detailAddress ?? ''; const detailAddress = data?.detailAddress ?? '';
return [areaName, detailAddress].filter(Boolean).join(' '); return [areaName, detailAddress].filter(Boolean).join(' ');
}, },
@@ -111,16 +111,16 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
{ {
field: 'industryId', field: 'industryId',
label: '客户行业', label: '客户行业',
content: (data) => render: (val) =>
h(DictTag, { h(DictTag, {
type: DICT_TYPE.CRM_CUSTOMER_INDUSTRY, type: DICT_TYPE.CRM_CUSTOMER_INDUSTRY,
value: data?.industryId, value: val,
}), }),
}, },
{ {
field: 'contactNextTime', field: 'contactNextTime',
label: '下次联系时间', label: '下次联系时间',
content: (data) => formatDateTime(data?.contactNextTime) as string, render: (val) => formatDateTime(val) as string,
}, },
{ {
field: 'remark', field: 'remark',

View File

@@ -47,11 +47,9 @@ const logList = ref<SystemOperateLogApi.OperateLog[]>([]); // 操作日志
const permissionListRef = ref<InstanceType<typeof PermissionList>>(); // 团队成员列表 Ref const permissionListRef = ref<InstanceType<typeof PermissionList>>(); // 团队成员列表 Ref
const [Descriptions] = useDescription({ const [Descriptions] = useDescription({
componentProps: { bordered: false,
bordered: false, column: 4,
column: 4, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailSchema(), schema: useDetailSchema(),
}); });

View File

@@ -13,22 +13,18 @@ defineProps<{
}>(); }>();
const [BaseDescriptions] = useDescription({ const [BaseDescriptions] = useDescription({
componentProps: { title: '基本信息',
title: '基本信息', bordered: false,
bordered: false, column: 4,
column: 4, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailBaseSchema(), schema: useDetailBaseSchema(),
}); });
const [SystemDescriptions] = useDescription({ const [SystemDescriptions] = useDescription({
componentProps: { title: '系统信息',
title: '系统信息', bordered: false,
bordered: false, column: 3,
column: 3, class: 'mx-4',
class: 'mx-4',
},
schema: useFollowUpDetailSchema(), schema: useFollowUpDetailSchema(),
}); });
</script> </script>

View File

@@ -34,7 +34,7 @@ export function useFormSchema(confType: LimitConfType): VbenFormSchema[] {
label: '规则适用人群', label: '规则适用人群',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
mode: 'multiple', mode: 'multiple',

View File

@@ -173,7 +173,7 @@ export function useFollowUpDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'contactLastTime', field: 'contactLastTime',
label: '最后跟进时间', label: '最后跟进时间',
content: (data) => formatDateTime(data?.contactLastTime) as string, render: (val) => formatDateTime(val) as string,
}, },
{ {
field: 'creatorName', field: 'creatorName',
@@ -182,12 +182,12 @@ export function useFollowUpDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'createTime', field: 'createTime',
label: '创建时间', label: '创建时间',
content: (data) => formatDateTime(data?.createTime) as string, render: (val) => formatDateTime(val) as string,
}, },
{ {
field: 'updateTime', field: 'updateTime',
label: '更新时间', label: '更新时间',
content: (data) => formatDateTime(data?.updateTime) as string, render: (val) => formatDateTime(val) as string,
}, },
]; ];
} }

View File

@@ -23,7 +23,7 @@ export function useTransferFormSchema(): VbenFormSchema[] {
label: '选择新负责人', label: '选择新负责人',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },
@@ -116,7 +116,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '选择人员', label: '选择人员',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -42,7 +42,7 @@ export function useFormSchema(): VbenFormSchema[] {
disabled: (values) => values.id, disabled: (values) => values.id,
}, },
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
placeholder: '请选择负责人', placeholder: '请选择负责人',

View File

@@ -17,13 +17,13 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'unit', field: 'unit',
label: '产品单位', label: '产品单位',
content: (data) => render: (val) =>
h(DictTag, { type: DICT_TYPE.CRM_PRODUCT_UNIT, value: data?.unit }), h(DictTag, { type: DICT_TYPE.CRM_PRODUCT_UNIT, value: val }),
}, },
{ {
field: 'price', field: 'price',
label: '产品价格(元)', label: '产品价格(元)',
content: (data) => erpPriceInputFormatter(data.price), render: (val) => erpPriceInputFormatter(val),
}, },
{ {
field: 'no', field: 'no',
@@ -46,7 +46,7 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
{ {
field: 'price', field: 'price',
label: '价格(元)', label: '价格(元)',
content: (data) => erpPriceInputFormatter(data.price), render: (val) => erpPriceInputFormatter(val),
}, },
{ {
field: 'description', field: 'description',
@@ -59,14 +59,14 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
{ {
field: 'status', field: 'status',
label: '是否上下架', label: '是否上下架',
content: (data) => render: (val) =>
h(DictTag, { type: DICT_TYPE.CRM_PRODUCT_STATUS, value: data?.status }), h(DictTag, { type: DICT_TYPE.CRM_PRODUCT_STATUS, value: val }),
}, },
{ {
field: 'unit', field: 'unit',
label: '产品单位', label: '产品单位',
content: (data) => render: (val) =>
h(DictTag, { type: DICT_TYPE.CRM_PRODUCT_UNIT, value: data?.unit }), h(DictTag, { type: DICT_TYPE.CRM_PRODUCT_UNIT, value: val }),
}, },
]; ];
} }

View File

@@ -29,11 +29,9 @@ const product = ref<CrmProductApi.Product>({} as CrmProductApi.Product); // 产
const logList = ref<SystemOperateLogApi.OperateLog[]>([]); // 操作日志 const logList = ref<SystemOperateLogApi.OperateLog[]>([]); // 操作日志
const [Descriptions] = useDescription({ const [Descriptions] = useDescription({
componentProps: { bordered: false,
bordered: false, column: 4,
column: 4, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailSchema(), schema: useDetailSchema(),
}); });

View File

@@ -10,12 +10,10 @@ defineProps<{
}>(); }>();
const [ProductDescriptions] = useDescription({ const [ProductDescriptions] = useDescription({
componentProps: { title: '基本信息',
title: '基本信息', bordered: false,
bordered: false, column: 4,
column: 4, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailBaseSchema(), schema: useDetailBaseSchema(),
}); });
</script> </script>

View File

@@ -44,7 +44,7 @@ export function useFormSchema(): VbenFormSchema[] {
disabled: (values) => values.id, disabled: (values) => values.id,
}, },
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
placeholder: '请选择负责人', placeholder: '请选择负责人',
@@ -58,7 +58,7 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
rules: 'required', rules: 'required',
componentProps: { componentProps: {
api: () => getCustomerSimpleList(), api: getCustomerSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择客户', placeholder: '请选择客户',
@@ -188,7 +188,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '客户', label: '客户',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getCustomerSimpleList(), api: getCustomerSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择客户', placeholder: '请选择客户',

View File

@@ -17,18 +17,18 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'totalPrice', field: 'totalPrice',
label: '合同金额(元)', label: '合同金额(元)',
content: (data) => render: (val, data) =>
erpPriceInputFormatter(data?.contract?.totalPrice ?? data.totalPrice), erpPriceInputFormatter(val ?? data?.contract?.totalPrice ?? 0),
}, },
{ {
field: 'returnTime', field: 'returnTime',
label: '回款日期', label: '回款日期',
content: (data) => formatDateTime(data?.returnTime) as string, render: (val) => formatDateTime(val) as string,
}, },
{ {
field: 'price', field: 'price',
label: '回款金额(元)', label: '回款金额(元)',
content: (data) => erpPriceInputFormatter(data.price), render: (val) => erpPriceInputFormatter(val),
}, },
{ {
field: 'ownerUserName', field: 'ownerUserName',
@@ -51,25 +51,26 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
{ {
field: 'contract', field: 'contract',
label: '合同编号', label: '合同编号',
content: (data) => data?.contract?.no, render: (val, data) =>
val && data?.contract?.no ? data?.contract?.no : '',
}, },
{ {
field: 'returnTime', field: 'returnTime',
label: '回款日期', label: '回款日期',
content: (data) => formatDateTime(data?.returnTime) as string, render: (val) => formatDateTime(val) as string,
}, },
{ {
field: 'price', field: 'price',
label: '回款金额', label: '回款金额',
content: (data) => erpPriceInputFormatter(data.price), render: (val) => erpPriceInputFormatter(val),
}, },
{ {
field: 'returnType', field: 'returnType',
label: '回款方式', label: '回款方式',
content: (data) => render: (val) =>
h(DictTag, { h(DictTag, {
type: DICT_TYPE.CRM_RECEIVABLE_RETURN_TYPE, type: DICT_TYPE.CRM_RECEIVABLE_RETURN_TYPE,
value: data?.returnType, value: val,
}), }),
}, },
{ {
@@ -93,12 +94,12 @@ export function useDetailSystemSchema(): DescriptionItemSchema[] {
{ {
field: 'createTime', field: 'createTime',
label: '创建时间', label: '创建时间',
content: (data) => formatDateTime(data?.createTime) as string, render: (val) => formatDateTime(val) as string,
}, },
{ {
field: 'updateTime', field: 'updateTime',
label: '更新时间', label: '更新时间',
content: (data) => formatDateTime(data?.updateTime) as string, render: (val) => formatDateTime(val) as string,
}, },
]; ];
} }

View File

@@ -38,11 +38,9 @@ const logList = ref<SystemOperateLogApi.OperateLog[]>([]); // 操作日志
const permissionListRef = ref<InstanceType<typeof PermissionList>>(); // 团队成员列表 Ref const permissionListRef = ref<InstanceType<typeof PermissionList>>(); // 团队成员列表 Ref
const [Descriptions] = useDescription({ const [Descriptions] = useDescription({
componentProps: { bordered: false,
bordered: false, column: 4,
column: 4, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailSchema(), schema: useDetailSchema(),
}); });

View File

@@ -12,22 +12,18 @@ defineProps<{
}>(); }>();
const [BaseDescriptions] = useDescription({ const [BaseDescriptions] = useDescription({
componentProps: { title: '基本信息',
title: '基本信息', bordered: false,
bordered: false, column: 4,
column: 4, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailBaseSchema(), schema: useDetailBaseSchema(),
}); });
const [SystemDescriptions] = useDescription({ const [SystemDescriptions] = useDescription({
componentProps: { title: '系统信息',
title: '系统信息', bordered: false,
bordered: false, column: 3,
column: 3, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailSystemSchema(), schema: useDetailSystemSchema(),
}); });
</script> </script>

View File

@@ -28,7 +28,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '负责人', label: '负责人',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },
@@ -45,7 +45,7 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
rules: 'required', rules: 'required',
componentProps: { componentProps: {
api: () => getCustomerSimpleList(), api: getCustomerSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择客户', placeholder: '请选择客户',
@@ -153,7 +153,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '客户', label: '客户',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getCustomerSimpleList(), api: getCustomerSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择客户', placeholder: '请选择客户',

View File

@@ -21,17 +21,17 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'price', field: 'price',
label: '计划回款金额', label: '计划回款金额',
content: (data) => erpPriceInputFormatter(data.price), render: (val) => erpPriceInputFormatter(val),
}, },
{ {
field: 'returnTime', field: 'returnTime',
label: '计划回款日期', label: '计划回款日期',
content: (data) => formatDateTime(data?.returnTime) as string, render: (val) => formatDateTime(val) as string,
}, },
{ {
field: 'receivable', field: 'receivable',
label: '实际回款金额', label: '实际回款金额',
content: (data) => erpPriceInputFormatter(data?.receivable?.price ?? 0), render: (val) => erpPriceInputFormatter(val?.price ?? 0),
}, },
]; ];
} }
@@ -54,20 +54,20 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
{ {
field: 'returnTime', field: 'returnTime',
label: '计划回款日期', label: '计划回款日期',
content: (data) => formatDateTime(data?.returnTime) as string, render: (val) => formatDateTime(val) as string,
}, },
{ {
field: 'price', field: 'price',
label: '计划回款金额', label: '计划回款金额',
content: (data) => erpPriceInputFormatter(data.price), render: (val) => erpPriceInputFormatter(val),
}, },
{ {
field: 'returnType', field: 'returnType',
label: '计划回款方式', label: '计划回款方式',
content: (data) => render: (val) =>
h(DictTag, { h(DictTag, {
type: DICT_TYPE.CRM_RECEIVABLE_RETURN_TYPE, type: DICT_TYPE.CRM_RECEIVABLE_RETURN_TYPE,
value: data?.returnType, value: val,
}), }),
}, },
{ {
@@ -77,20 +77,20 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
{ {
field: 'receivable', field: 'receivable',
label: '实际回款金额', label: '实际回款金额',
content: (data) => erpPriceInputFormatter(data?.receivable?.price ?? 0), render: (val) => erpPriceInputFormatter(val ?? 0),
}, },
{ {
field: 'receivableRemain', field: 'receivableRemain',
label: '未回款金额', label: '未回款金额',
content: (data) => { render: (val, data) => {
const paid = data?.receivable?.price ?? 0; const paid = data?.receivable?.price ?? 0;
return erpPriceInputFormatter(Math.max(data.price - paid, 0)); return erpPriceInputFormatter(Math.max(val - paid, 0));
}, },
}, },
{ {
field: 'receivable.returnTime', field: 'receivable.returnTime',
label: '实际回款日期', label: '实际回款日期',
content: (data) => formatDateTime(data?.receivable?.returnTime) as string, render: (val) => formatDateTime(val) as string,
}, },
{ {
field: 'remark', field: 'remark',
@@ -113,12 +113,12 @@ export function useDetailSystemSchema(): DescriptionItemSchema[] {
{ {
field: 'createTime', field: 'createTime',
label: '创建时间', label: '创建时间',
content: (data) => formatDateTime(data?.createTime) as string, render: (val) => formatDateTime(val) as string,
}, },
{ {
field: 'updateTime', field: 'updateTime',
label: '更新时间', label: '更新时间',
content: (data) => formatDateTime(data?.updateTime) as string, render: (val) => formatDateTime(val) as string,
}, },
]; ];
} }

View File

@@ -39,11 +39,9 @@ const permissionListRef = ref<InstanceType<typeof PermissionList>>(); // 团队
const validateWrite = () => permissionListRef.value?.validateWrite; const validateWrite = () => permissionListRef.value?.validateWrite;
const [Descriptions] = useDescription({ const [Descriptions] = useDescription({
componentProps: { bordered: false,
bordered: false, column: 4,
column: 4, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailSchema(), schema: useDetailSchema(),
}); });

View File

@@ -12,22 +12,18 @@ defineProps<{
}>(); }>();
const [BaseDescriptions] = useDescription({ const [BaseDescriptions] = useDescription({
componentProps: { title: '基本信息',
title: '基本信息', bordered: false,
bordered: false, column: 4,
column: 4, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailBaseSchema(), schema: useDetailBaseSchema(),
}); });
const [SystemDescriptions] = useDescription({ const [SystemDescriptions] = useDescription({
componentProps: { title: '系统信息',
title: '系统信息', bordered: false,
bordered: false, column: 3,
column: 3, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailSystemSchema(), schema: useDetailSystemSchema(),
}); });
</script> </script>

View File

@@ -99,7 +99,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '员工', label: '员工',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
placeholder: '请选择员工', placeholder: '请选择员工',

View File

@@ -73,7 +73,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '员工', label: '员工',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
allowClear: true, allowClear: true,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',

View File

@@ -64,7 +64,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '员工', label: '员工',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
placeholder: '请选择员工', placeholder: '请选择员工',

View File

@@ -68,7 +68,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '员工', label: '员工',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
placeholder: '请选择员工', placeholder: '请选择员工',

View File

@@ -52,7 +52,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择供应商', placeholder: '请选择供应商',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSupplierSimpleList(), api: getSupplierSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -66,7 +66,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择财务人员', placeholder: '请选择财务人员',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },
@@ -119,7 +119,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择付款账户', placeholder: '请选择付款账户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getAccountSimpleList(), api: getAccountSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -241,7 +241,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择供应商', placeholder: '请选择供应商',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSupplierSimpleList(), api: getSupplierSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -254,7 +254,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择创建人', placeholder: '请选择创建人',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },
@@ -267,7 +267,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择财务人员', placeholder: '请选择财务人员',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },
@@ -280,7 +280,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择付款账户', placeholder: '请选择付款账户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getAccountSimpleList(), api: getAccountSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -52,7 +52,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择客户', placeholder: '请选择客户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getCustomerSimpleList(), api: getCustomerSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -66,7 +66,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择财务人员', placeholder: '请选择财务人员',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },
@@ -119,7 +119,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择收款账户', placeholder: '请选择收款账户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getAccountSimpleList(), api: getAccountSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -241,7 +241,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择客户', placeholder: '请选择客户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getCustomerSimpleList(), api: getCustomerSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -254,7 +254,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择创建人', placeholder: '请选择创建人',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },
@@ -267,7 +267,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择财务人员', placeholder: '请选择财务人员',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },
@@ -280,7 +280,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择收款账户', placeholder: '请选择收款账户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getAccountSimpleList(), api: getAccountSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -61,7 +61,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '单位', label: '单位',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getProductUnitSimpleList(), api: getProductUnitSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择单位', placeholder: '请选择单位',

View File

@@ -66,7 +66,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择供应商', placeholder: '请选择供应商',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSupplierSimpleList(), api: getSupplierSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -174,7 +174,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择结算账户', placeholder: '请选择结算账户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getAccountSimpleList(), api: getAccountSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -319,7 +319,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getProductSimpleList(), api: getProductSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -341,7 +341,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择供应商', placeholder: '请选择供应商',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSupplierSimpleList(), api: getSupplierSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -354,7 +354,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择仓库', placeholder: '请选择仓库',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getWarehouseSimpleList(), api: getWarehouseSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -367,7 +367,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择创建人', placeholder: '请选择创建人',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },
@@ -389,7 +389,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择结算账户', placeholder: '请选择结算账户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getAccountSimpleList(), api: getAccountSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -530,7 +530,7 @@ export function useOrderGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getProductSimpleList(), api: getProductSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -52,7 +52,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择供应商', placeholder: '请选择供应商',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSupplierSimpleList(), api: getSupplierSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -140,7 +140,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择结算账户', placeholder: '请选择结算账户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getAccountSimpleList(), api: getAccountSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -261,7 +261,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getProductSimpleList(), api: getProductSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -283,7 +283,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择供应商', placeholder: '请选择供应商',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSupplierSimpleList(), api: getSupplierSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -296,7 +296,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择创建人', placeholder: '请选择创建人',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -66,7 +66,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择供应商', placeholder: '请选择供应商',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSupplierSimpleList(), api: getSupplierSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -173,7 +173,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择结算账户', placeholder: '请选择结算账户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getAccountSimpleList(), api: getAccountSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -319,7 +319,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getProductSimpleList(), api: getProductSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -341,7 +341,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择供应商', placeholder: '请选择供应商',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSupplierSimpleList(), api: getSupplierSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -354,7 +354,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择仓库', placeholder: '请选择仓库',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getWarehouseSimpleList(), api: getWarehouseSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -367,7 +367,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择创建人', placeholder: '请选择创建人',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },
@@ -516,7 +516,7 @@ export function useOrderGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getProductSimpleList(), api: getProductSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -52,7 +52,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择客户', placeholder: '请选择客户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getCustomerSimpleList(), api: getCustomerSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -66,7 +66,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择销售人员', placeholder: '请选择销售人员',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },
@@ -153,7 +153,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择结算账户', placeholder: '请选择结算账户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getAccountSimpleList(), api: getAccountSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -275,7 +275,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getProductSimpleList(), api: getProductSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -297,7 +297,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择客户', placeholder: '请选择客户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getCustomerSimpleList(), api: getCustomerSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -310,7 +310,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择创建人', placeholder: '请选择创建人',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -544,7 +544,7 @@ export function useOrderGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getProductSimpleList(), api: getProductSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -66,7 +66,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择客户', placeholder: '请选择客户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getCustomerSimpleList(), api: getCustomerSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -80,7 +80,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择销售人员', placeholder: '请选择销售人员',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },
@@ -187,7 +187,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
disabled: true, disabled: true,
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getAccountSimpleList(), api: getAccountSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -333,7 +333,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getProductSimpleList(), api: getProductSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -355,7 +355,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择客户', placeholder: '请选择客户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getCustomerSimpleList(), api: getCustomerSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -368,7 +368,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择仓库', placeholder: '请选择仓库',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getWarehouseSimpleList(), api: getWarehouseSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -381,7 +381,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择创建人', placeholder: '请选择创建人',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },
@@ -531,7 +531,7 @@ export function useOrderGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getProductSimpleList(), api: getProductSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -180,7 +180,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getProductSimpleList(), api: getProductSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -202,7 +202,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择仓库', placeholder: '请选择仓库',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getWarehouseSimpleList(), api: getWarehouseSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -215,7 +215,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择创建人', placeholder: '请选择创建人',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -50,7 +50,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择供应商', placeholder: '请选择供应商',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSupplierSimpleList(), api: getSupplierSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -187,7 +187,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getProductSimpleList(), api: getProductSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -209,7 +209,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择供应商', placeholder: '请选择供应商',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSupplierSimpleList(), api: getSupplierSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -222,7 +222,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择仓库', placeholder: '请选择仓库',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getWarehouseSimpleList(), api: getWarehouseSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -235,7 +235,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择创建人', placeholder: '请选择创建人',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -178,7 +178,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getProductSimpleList(), api: getProductSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -200,7 +200,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择调出仓库', placeholder: '请选择调出仓库',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getWarehouseSimpleList(), api: getWarehouseSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -213,7 +213,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择调入仓库', placeholder: '请选择调入仓库',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getWarehouseSimpleList(), api: getWarehouseSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -226,7 +226,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择创建人', placeholder: '请选择创建人',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -19,7 +19,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getProductSimpleList(), api: getProductSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -32,7 +32,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择仓库', placeholder: '请选择仓库',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getWarehouseSimpleList(), api: getWarehouseSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -15,7 +15,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getProductSimpleList(), api: getProductSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -28,7 +28,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择仓库', placeholder: '请选择仓库',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => getWarehouseSimpleList(), api: getWarehouseSimpleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -1,6 +1,5 @@
import type { VbenFormSchema } from '#/adapter/form'; import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { InfraApiAccessLogApi } from '#/api/infra/api-access-log';
import type { DescriptionItemSchema } from '#/components/description'; import type { DescriptionItemSchema } from '#/components/description';
import { h } from 'vue'; import { h } from 'vue';
@@ -181,10 +180,10 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'userType', field: 'userType',
label: '用户类型', label: '用户类型',
content: (data: InfraApiAccessLogApi.ApiAccessLog) => { render: (val) => {
return h(DictTag, { return h(DictTag, {
type: DICT_TYPE.USER_TYPE, type: DICT_TYPE.USER_TYPE,
value: data.userType, value: val,
}); });
}, },
}, },
@@ -198,9 +197,10 @@ export function useDetailSchema(): DescriptionItemSchema[] {
}, },
{ {
label: '请求信息', label: '请求信息',
content: (data: InfraApiAccessLogApi.ApiAccessLog) => { field: 'requestMethod',
if (data?.requestMethod && data?.requestUrl) { render: (val, data) => {
return `${data.requestMethod} ${data.requestUrl}`; if (val && data?.requestUrl) {
return `${val} ${data.requestUrl}`;
} }
return ''; return '';
}, },
@@ -208,10 +208,10 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'requestParams', field: 'requestParams',
label: '请求参数', label: '请求参数',
content: (data: InfraApiAccessLogApi.ApiAccessLog) => { render: (val) => {
if (data.requestParams) { if (val) {
return h(JsonViewer, { return h(JsonViewer, {
value: JSON.parse(data.requestParams), value: JSON.parse(val),
previewMode: true, previewMode: true,
}); });
} }
@@ -224,26 +224,29 @@ export function useDetailSchema(): DescriptionItemSchema[] {
}, },
{ {
label: '请求时间', label: '请求时间',
content: (data: InfraApiAccessLogApi.ApiAccessLog) => { field: 'beginTime',
if (data?.beginTime && data?.endTime) { render: (val, data) => {
return `${formatDateTime(data.beginTime)} ~ ${formatDateTime(data.endTime)}`; if (val && data?.endTime) {
return `${formatDateTime(val)} ~ ${formatDateTime(data.endTime)}`;
} }
return ''; return '';
}, },
}, },
{ {
label: '请求耗时', label: '请求耗时',
content: (data: InfraApiAccessLogApi.ApiAccessLog) => { field: 'duration',
return data?.duration ? `${data.duration} ms` : ''; render: (val) => {
return val ? `${val} ms` : '';
}, },
}, },
{ {
label: '操作结果', label: '操作结果',
content: (data: InfraApiAccessLogApi.ApiAccessLog) => { field: 'resultCode',
if (data?.resultCode === 0) { render: (val, data) => {
if (val === 0) {
return '正常'; return '正常';
} else if (data && data.resultCode > 0) { } else if (val > 0 && data?.resultMsg) {
return `失败 | ${data.resultCode} | ${data.resultMsg}`; return `失败 | ${val} | ${data.resultMsg}`;
} }
return ''; return '';
}, },
@@ -259,10 +262,10 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'operateType', field: 'operateType',
label: '操作类型', label: '操作类型',
content: (data: InfraApiAccessLogApi.ApiAccessLog) => { render: (val) => {
return h(DictTag, { return h(DictTag, {
type: DICT_TYPE.INFRA_OPERATE_TYPE, type: DICT_TYPE.INFRA_OPERATE_TYPE,
value: data?.operateType, value: val,
}); });
}, },
}, },

View File

@@ -12,11 +12,9 @@ import { useDetailSchema } from '../data';
const formData = ref<InfraApiAccessLogApi.ApiAccessLog>(); const formData = ref<InfraApiAccessLogApi.ApiAccessLog>();
const [Descriptions] = useDescription({ const [Descriptions] = useDescription({
componentProps: { bordered: true,
bordered: true, column: 1,
column: 1, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailSchema(), schema: useDetailSchema(),
}); });

View File

@@ -1,6 +1,5 @@
import type { VbenFormSchema } from '#/adapter/form'; import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { InfraApiErrorLogApi } from '#/api/infra/api-error-log';
import type { DescriptionItemSchema } from '#/components/description'; import type { DescriptionItemSchema } from '#/components/description';
import { h } from 'vue'; import { h } from 'vue';
@@ -158,10 +157,10 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'userType', field: 'userType',
label: '用户类型', label: '用户类型',
content: (data: InfraApiErrorLogApi.ApiErrorLog) => { render: (val) => {
return h(DictTag, { return h(DictTag, {
type: DICT_TYPE.USER_TYPE, type: DICT_TYPE.USER_TYPE,
value: data.userType, value: val,
}); });
}, },
}, },
@@ -176,9 +175,9 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'requestMethod', field: 'requestMethod',
label: '请求信息', label: '请求信息',
content: (data: InfraApiErrorLogApi.ApiErrorLog) => { render: (val, data) => {
if (data?.requestMethod && data?.requestUrl) { if (val && data?.requestUrl) {
return `${data.requestMethod} ${data.requestUrl}`; return `${val} ${data.requestUrl}`;
} }
return ''; return '';
}, },
@@ -186,10 +185,10 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'requestParams', field: 'requestParams',
label: '请求参数', label: '请求参数',
content: (data: InfraApiErrorLogApi.ApiErrorLog) => { render: (val) => {
if (data.requestParams) { if (val) {
return h(JsonViewer, { return h(JsonViewer, {
value: JSON.parse(data.requestParams), value: JSON.parse(val),
previewMode: true, previewMode: true,
}); });
} }
@@ -199,8 +198,8 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'exceptionTime', field: 'exceptionTime',
label: '异常时间', label: '异常时间',
content: (data: InfraApiErrorLogApi.ApiErrorLog) => { render: (val) => {
return formatDateTime(data?.exceptionTime || '') as string; return formatDateTime(val) as string;
}, },
}, },
{ {
@@ -210,12 +209,11 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'exceptionStackTrace', field: 'exceptionStackTrace',
label: '异常堆栈', label: '异常堆栈',
hidden: (data: InfraApiErrorLogApi.ApiErrorLog) => show: (val) => !val,
!data?.exceptionStackTrace, render: (val) => {
content: (data: InfraApiErrorLogApi.ApiErrorLog) => { if (val) {
if (data?.exceptionStackTrace) {
return h('textarea', { return h('textarea', {
value: data.exceptionStackTrace, value: val,
style: style:
'width: 100%; min-height: 200px; max-height: 400px; resize: vertical;', 'width: 100%; min-height: 200px; max-height: 400px; resize: vertical;',
readonly: true, readonly: true,
@@ -227,24 +225,24 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'processStatus', field: 'processStatus',
label: '处理状态', label: '处理状态',
content: (data: InfraApiErrorLogApi.ApiErrorLog) => { render: (val) => {
return h(DictTag, { return h(DictTag, {
type: DICT_TYPE.INFRA_API_ERROR_LOG_PROCESS_STATUS, type: DICT_TYPE.INFRA_API_ERROR_LOG_PROCESS_STATUS,
value: data?.processStatus, value: val,
}); });
}, },
}, },
{ {
field: 'processUserId', field: 'processUserId',
label: '处理人', label: '处理人',
hidden: (data: InfraApiErrorLogApi.ApiErrorLog) => !data?.processUserId, show: (val) => !val,
}, },
{ {
field: 'processTime', field: 'processTime',
label: '处理时间', label: '处理时间',
hidden: (data: InfraApiErrorLogApi.ApiErrorLog) => !data?.processTime, show: (val) => !val,
content: (data: InfraApiErrorLogApi.ApiErrorLog) => { render: (val) => {
return formatDateTime(data?.processTime || '') as string; return formatDateTime(val) as string;
}, },
}, },
]; ];

View File

@@ -12,11 +12,9 @@ import { useDetailSchema } from '../data';
const formData = ref<InfraApiErrorLogApi.ApiErrorLog>(); const formData = ref<InfraApiErrorLogApi.ApiErrorLog>();
const [Descriptions] = useDescription({ const [Descriptions] = useDescription({
componentProps: { bordered: true,
bordered: true, column: 1,
column: 1, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailSchema(), schema: useDetailSchema(),
}); });

View File

@@ -25,7 +25,7 @@ export function useImportTableFormSchema(): VbenFormSchema[] {
label: '数据源', label: '数据源',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getDataSourceConfigList(), api: getDataSourceConfigList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
autoSelect: 'first', autoSelect: 'first',

View File

@@ -1,6 +1,5 @@
import type { VbenFormSchema } from '#/adapter/form'; import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { InfraJobApi } from '#/api/infra/job';
import type { DescriptionItemSchema } from '#/components/description'; import type { DescriptionItemSchema } from '#/components/description';
import { h, markRaw } from 'vue'; import { h, markRaw } from 'vue';
@@ -191,10 +190,10 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'status', field: 'status',
label: '任务状态', label: '任务状态',
content: (data: InfraJobApi.Job) => { render: (val) => {
return h(DictTag, { return h(DictTag, {
type: DICT_TYPE.INFRA_JOB_STATUS, type: DICT_TYPE.INFRA_JOB_STATUS,
value: data?.status, value: val,
}); });
}, },
}, },
@@ -216,27 +215,27 @@ export function useDetailSchema(): DescriptionItemSchema[] {
}, },
{ {
label: '重试间隔', label: '重试间隔',
content: (data: InfraJobApi.Job) => { field: 'retryInterval',
return data?.retryInterval ? `${data.retryInterval} 毫秒` : '无间隔'; render: (val) => {
return val ? `${val} 毫秒` : '无间隔';
}, },
}, },
{ {
label: '监控超时时间', label: '监控超时时间',
content: (data: InfraJobApi.Job) => { field: 'monitorTimeout',
return data?.monitorTimeout && data.monitorTimeout > 0 render: (val) => {
? `${data.monitorTimeout} 毫秒` return val && val > 0 ? `${val} 毫秒` : '未开启';
: '未开启';
}, },
}, },
{ {
field: 'nextTimes', field: 'nextTimes',
label: '后续执行时间', label: '后续执行时间',
content: (data: InfraJobApi.Job) => { render: (val) => {
if (!data?.nextTimes || data.nextTimes.length === 0) { if (!val || val.length === 0) {
return '无后续执行时间'; return '无后续执行时间';
} }
return h(Timeline, {}, () => return h(Timeline, {}, () =>
data.nextTimes?.map((time: Date) => val?.map((time: Date) =>
h(Timeline.Item, {}, () => formatDateTime(time)), h(Timeline.Item, {}, () => formatDateTime(time)),
), ),
); );

View File

@@ -1,6 +1,5 @@
import type { VbenFormSchema } from '#/adapter/form'; import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { InfraJobLogApi } from '#/api/infra/job-log';
import type { DescriptionItemSchema } from '#/components/description'; import type { DescriptionItemSchema } from '#/components/description';
import { h } from 'vue'; import { h } from 'vue';
@@ -154,9 +153,9 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'beginTime', field: 'beginTime',
label: '执行时间', label: '执行时间',
content: (data: InfraJobLogApi.JobLog) => { render: (val, data) => {
if (data?.beginTime && data?.endTime) { if (val && data?.endTime) {
return `${formatDateTime(data.beginTime)} ~ ${formatDateTime(data.endTime)}`; return `${formatDateTime(val)} ~ ${formatDateTime(data.endTime)}`;
} }
return ''; return '';
}, },
@@ -164,17 +163,17 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{ {
field: 'duration', field: 'duration',
label: '执行时长', label: '执行时长',
content: (data: InfraJobLogApi.JobLog) => { render: (val) => {
return data?.duration ? `${data.duration} 毫秒` : ''; return val ? `${val} 毫秒` : '';
}, },
}, },
{ {
field: 'status', field: 'status',
label: '任务状态', label: '任务状态',
content: (data: InfraJobLogApi.JobLog) => { render: (val) => {
return h(DictTag, { return h(DictTag, {
type: DICT_TYPE.INFRA_JOB_LOG_STATUS, type: DICT_TYPE.INFRA_JOB_LOG_STATUS,
value: data?.status, value: val,
}); });
}, },
}, },

View File

@@ -13,11 +13,9 @@ import { useDetailSchema } from '../data';
const formData = ref<InfraJobLogApi.JobLog>(); const formData = ref<InfraJobLogApi.JobLog>();
const [Descriptions] = useDescription({ const [Descriptions] = useDescription({
componentProps: { bordered: true,
bordered: true, column: 1,
column: 1, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailSchema(), schema: useDetailSchema(),
}); });

View File

@@ -14,11 +14,9 @@ const formData = ref<InfraJobApi.Job>(); // 任务详情
const nextTimes = ref<Date[]>([]); // 下一次执行时间 const nextTimes = ref<Date[]>([]); // 下一次执行时间
const [Descriptions] = useDescription({ const [Descriptions] = useDescription({
componentProps: { bordered: true,
bordered: true, column: 1,
column: 1, class: 'mx-4',
class: 'mx-4',
},
schema: useDetailSchema(), schema: useDetailSchema(),
}); });

View File

@@ -1,60 +1,74 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { InfraRedisApi } from '#/api/infra/redis'; import type { InfraRedisApi } from '#/api/infra/redis';
import { Descriptions } from 'ant-design-vue'; import { useDescription } from '#/components/description';
defineProps<{ defineProps<{
redisData?: InfraRedisApi.RedisMonitorInfo; redisData?: InfraRedisApi.RedisMonitorInfo;
}>(); }>();
const [Descriptions] = useDescription({
bordered: false,
column: 6,
class: 'mx-4',
schema: [
{
field: 'info.redis_version',
label: 'Redis 版本',
},
{
field: 'info.redis_mode',
label: '运行模式',
render: (val) => (val === 'standalone' ? '单机' : '集群'),
},
{
field: 'info.tcp_port',
label: '端口',
},
{
field: 'info.connected_clients',
label: '客户端数',
},
{
field: 'info.uptime_in_days',
label: '运行时间(天)',
},
{
field: 'info.used_memory_human',
label: '使用内存',
},
{
field: 'info.used_cpu_user_children',
label: '使用 CPU',
render: (val) => Number.parseFloat(val).toFixed(2),
},
{
field: 'info.maxmemory_human',
label: '内存配置',
},
{
field: 'info.aof_enabled',
label: 'AOF 是否开启',
render: (val) => (val === '0' ? '否' : '是'),
},
{
field: 'info.rdb_last_bgsave_status',
label: 'RDB 是否成功',
},
{
field: 'dbSize',
label: 'Key 数量',
},
{
field: 'info.instantaneous_input_kbps',
label: '网络入口/出口',
render: (val, data) =>
`${val}kps / ${data?.info?.instantaneous_output_kbps}kps`,
},
],
});
</script> </script>
<template> <template>
<Descriptions <Descriptions :data="redisData" />
:column="6"
bordered
size="middle"
:label-style="{ width: '138px' }"
>
<Descriptions.Item label="Redis 版本">
{{ redisData?.info?.redis_version }}
</Descriptions.Item>
<Descriptions.Item label="运行模式">
{{ redisData?.info?.redis_mode === 'standalone' ? '单机' : '集群' }}
</Descriptions.Item>
<Descriptions.Item label="端口">
{{ redisData?.info?.tcp_port }}
</Descriptions.Item>
<Descriptions.Item label="客户端数">
{{ redisData?.info?.connected_clients }}
</Descriptions.Item>
<Descriptions.Item label="运行时间(天)">
{{ redisData?.info?.uptime_in_days }}
</Descriptions.Item>
<Descriptions.Item label="使用内存">
{{ redisData?.info?.used_memory_human }}
</Descriptions.Item>
<Descriptions.Item label="使用 CPU">
{{
redisData?.info
? parseFloat(redisData?.info?.used_cpu_user_children).toFixed(2)
: ''
}}
</Descriptions.Item>
<Descriptions.Item label="内存配置">
{{ redisData?.info?.maxmemory_human }}
</Descriptions.Item>
<Descriptions.Item label="AOF 是否开启">
{{ redisData?.info?.aof_enabled === '0' ? '否' : '是' }}
</Descriptions.Item>
<Descriptions.Item label="RDB 是否成功">
{{ redisData?.info?.rdb_last_bgsave_status }}
</Descriptions.Item>
<Descriptions.Item label="Key 数量">
{{ redisData?.dbSize }}
</Descriptions.Item>
<Descriptions.Item label="网络入口/出口">
{{ redisData?.info?.instantaneous_input_kbps }}kps /
{{ redisData?.info?.instantaneous_output_kbps }}kps
</Descriptions.Item>
</Descriptions>
</template> </template>

View File

@@ -94,7 +94,7 @@ function renderMemoryChart() {
detail: { detail: {
show: true, show: true,
offsetCenter: [0, '50%'], offsetCenter: [0, '50%'],
color: 'auto', color: 'inherit',
fontSize: 30, fontSize: 30,
formatter: usedMemory, formatter: usedMemory,
}, },

View File

@@ -63,7 +63,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '关联场景联动规则', label: '关联场景联动规则',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleRuleSceneList(), api: getSimpleRuleSceneList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
mode: 'multiple', mode: 'multiple',
@@ -76,7 +76,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '接收的用户', label: '接收的用户',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: getSimpleUserList,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
mode: 'multiple', mode: 'multiple',

View File

@@ -17,7 +17,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '告警配置', label: '告警配置',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleAlertConfigList(), api: getSimpleAlertConfigList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择告警配置', placeholder: '请选择告警配置',
@@ -40,7 +40,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '产品', label: '产品',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleProductList(), api: getSimpleProductList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择产品', placeholder: '请选择产品',
@@ -53,7 +53,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '设备', label: '设备',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleDeviceList(), api: getSimpleDeviceList,
labelField: 'deviceName', labelField: 'deviceName',
valueField: 'id', valueField: 'id',
placeholder: '请选择设备', placeholder: '请选择设备',

View File

@@ -28,7 +28,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '产品', label: '产品',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleProductList(), api: getSimpleProductList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择产品', placeholder: '请选择产品',
@@ -89,7 +89,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '设备分组', label: '设备分组',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleDeviceGroupList(), api: getSimpleDeviceGroupList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
mode: 'multiple', mode: 'multiple',
@@ -156,7 +156,7 @@ export function useGroupFormSchema(): VbenFormSchema[] {
label: '设备分组', label: '设备分组',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleDeviceGroupList(), api: getSimpleDeviceGroupList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
mode: 'multiple', mode: 'multiple',
@@ -199,7 +199,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '产品', label: '产品',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleProductList(), api: getSimpleProductList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择产品', placeholder: '请选择产品',
@@ -249,7 +249,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '设备分组', label: '设备分组',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleDeviceGroupList(), api: getSimpleDeviceGroupList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择设备分组', placeholder: '请选择设备分组',

Some files were not shown because too many files have changed in this diff Show More