diff --git a/apps/web-antdv-next/src/components/form-create/components/dict-select.vue b/apps/web-antdv-next/src/components/form-create/components/dict-select.vue
index 11b961c5f..04a62f109 100644
--- a/apps/web-antdv-next/src/components/form-create/components/dict-select.vue
+++ b/apps/web-antdv-next/src/components/form-create/components/dict-select.vue
@@ -6,14 +6,7 @@ import { computed, useAttrs } from 'vue';
import { getDictOptions } from '@vben/hooks';
-import {
- Checkbox,
- CheckboxGroup,
- Radio,
- RadioGroup,
- Select,
- SelectOption,
-} from 'antdv-next';
+import { Checkbox, CheckboxGroup, Radio, RadioGroup, Select } from 'antdv-next';
defineOptions({ name: 'DictSelect' });
@@ -41,18 +34,22 @@ const getDictOption = computed(() => {
}
}
});
+
+const selectOptions = computed(() =>
+ getDictOption.value.map((dict) => ({
+ label: dict.label,
+ value: dict.value as any,
+ })),
+);
-
+
- {options.value.map(
- (item: { label: any; value: any }, index: any) => (
-
- {item.label}
-
- ),
- )}
-
+ />
);
}
return (
@@ -277,18 +263,11 @@ export function useApiSelect(option: ApiSelectProps) {
onUpdate:value={onUpdateModelValue as any}
value={modelValue as any}
{...restAttrs}
+ options={options.value}
// TODO: @xingyu remote 对等实现, 还是说没作用
// remote={props.remote}
{...(props.remote && { remoteMethod })}
- >
- {options.value.map(
- (item: { label: any; value: any }, index: any) => (
-
- {item.label}
-
- ),
- )}
-
+ />
);
};
const buildCheckbox = () => {
diff --git a/apps/web-antdv-next/src/views/bpm/components/simple-process-design/components/nodes-config/modules/condition.vue b/apps/web-antdv-next/src/views/bpm/components/simple-process-design/components/nodes-config/modules/condition.vue
index c00f79adc..043058f5b 100644
--- a/apps/web-antdv-next/src/views/bpm/components/simple-process-design/components/nodes-config/modules/condition.vue
+++ b/apps/web-antdv-next/src/views/bpm/components/simple-process-design/components/nodes-config/modules/condition.vue
@@ -17,7 +17,6 @@ import {
RadioGroup,
Row,
Select,
- SelectOption,
Space,
Switch,
TextArea,
@@ -69,6 +68,14 @@ const conditionConfigTypes = computed(() => {
/** 条件规则可选择的表单字段 */
const fieldOptions = useFormFieldsAndStartUser();
+const fieldSelectOptions = computed(() =>
+ fieldOptions.map((field) => ({
+ label: field.title,
+ value: field.field,
+ disabled: !field.required,
+ raw: field,
+ })),
+);
// 表单校验规则
const formRules: Record = reactive({
@@ -172,10 +179,12 @@ defineExpose({ validate });
/>
-
-
- {{ condition.conditionGroups.and ? '且' : '或' }}
-
+
@@ -236,23 +248,18 @@ defineExpose({ validate });
v-model:value="rule.leftSide"
allow-clear
placeholder="请选择表单字段"
+ :options="fieldSelectOptions"
>
-
+
- {{ field.title }}
+ {{ option.data.raw.title }}
- {{ field.title }}
-
+ {{ option.data.raw.title }}
+
@@ -292,11 +299,11 @@ defineExpose({ validate });
diff --git a/apps/web-antdv-next/src/views/bpm/model/form/modules/form-design.vue b/apps/web-antdv-next/src/views/bpm/model/form/modules/form-design.vue
index 63a2ad82b..5eae500e8 100644
--- a/apps/web-antdv-next/src/views/bpm/model/form/modules/form-design.vue
+++ b/apps/web-antdv-next/src/views/bpm/model/form/modules/form-design.vue
@@ -15,7 +15,6 @@ import {
Radio,
RadioGroup,
Select,
- SelectOption,
Tooltip,
} from 'antdv-next';
@@ -107,16 +106,12 @@ defineExpose({ validate });
name="formId"
class="mb-5"
>
-
+
{
/** 发送消息 */
const sendText = ref(''); // 发送内容
-const sendUserId = ref('all'); // 发送人
+const sendUserId = ref<'all' | number>('all'); // 发送人
+const sendUserOptions = computed(() => [
+ { label: '所有人', value: 'all', raw: null },
+ ...userList.value.map((user) => ({
+ label: user.nickname,
+ value: user.id,
+ raw: user,
+ })),
+]);
function handlerSend() {
if (!sendText.value.trim()) {
message.warning('消息内容不能为空');
@@ -229,26 +236,20 @@ onMounted(async () => {
size="large"
placeholder="请选择接收人"
:disabled="!getIsOpen"
+ :options="sendUserOptions"
>
-
-
+
+
-
-
-
+
- {{ user.nickname.slice(0, 1) }}
+ {{ option.data.raw.nickname?.slice(0, 1) }}
-
{{ user.nickname }}
+
{{ option.data.raw.nickname }}
-
+