refactor(@vben/web-antdv-next): migrate plain SelectOption usages to options API
Replace simple label/value SelectOption children with Select options across BPM, IoT, AI, MP, Mall, codegen, and demo pages. Keep custom option markup cases unchanged.pull/364/head
parent
1f7d21d8e6
commit
456a91dfc2
|
|
@ -16,7 +16,6 @@ import {
|
||||||
RadioButton,
|
RadioButton,
|
||||||
RadioGroup,
|
RadioGroup,
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
|
||||||
TabPane,
|
TabPane,
|
||||||
Tabs,
|
Tabs,
|
||||||
} from 'antdv-next';
|
} from 'antdv-next';
|
||||||
|
|
@ -419,22 +418,21 @@ function inputChange() {
|
||||||
@input="inputChange"
|
@input="inputChange"
|
||||||
>
|
>
|
||||||
<template #addonAfter>
|
<template #addonAfter>
|
||||||
<Select v-model:value="select" placeholder="生成器" class="w-36">
|
<Select
|
||||||
<SelectOption value="0 * * * * ?">每分钟</SelectOption>
|
v-model:value="select"
|
||||||
<SelectOption value="0 0 * * * ?">每小时</SelectOption>
|
placeholder="生成器"
|
||||||
<SelectOption value="0 0 0 * * ?">每天零点</SelectOption>
|
class="w-36"
|
||||||
<SelectOption value="0 0 0 1 * ?">每月一号零点</SelectOption>
|
:options="[
|
||||||
<SelectOption value="0 0 0 L * ?">每月最后一天零点</SelectOption>
|
{ label: '每分钟', value: '0 * * * * ?' },
|
||||||
<SelectOption value="0 0 0 ? * 1">每周星期日零点</SelectOption>
|
{ label: '每小时', value: '0 0 * * * ?' },
|
||||||
<SelectOption
|
{ label: '每天零点', value: '0 0 0 * * ?' },
|
||||||
v-for="(item, index) in shortcuts"
|
{ label: '每月一号零点', value: '0 0 0 1 * ?' },
|
||||||
:key="index"
|
{ label: '每月最后一天零点', value: '0 0 0 L * ?' },
|
||||||
:value="item.value"
|
{ label: '每周星期日零点', value: '0 0 0 ? * 1' },
|
||||||
>
|
...shortcuts.map((item) => ({ label: item.text, value: item.value })),
|
||||||
{{ item.text }}
|
{ label: '自定义', value: 'custom' },
|
||||||
</SelectOption>
|
]"
|
||||||
<SelectOption value="custom">自定义</SelectOption>
|
/>
|
||||||
</Select>
|
|
||||||
</template>
|
</template>
|
||||||
</Input>
|
</Input>
|
||||||
|
|
||||||
|
|
@ -498,14 +496,10 @@ function inputChange() {
|
||||||
v-model:value="cronValue.second.appoint"
|
v-model:value="cronValue.second.appoint"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
:options="
|
||||||
<SelectOption
|
data.second.map((item) => ({ label: item, value: item }))
|
||||||
v-for="(item, index) in data.second"
|
"
|
||||||
:key="index"
|
/>
|
||||||
:label="item"
|
|
||||||
:value="item"
|
|
||||||
/>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
</TabPane>
|
</TabPane>
|
||||||
|
|
@ -562,14 +556,10 @@ function inputChange() {
|
||||||
v-model:value="cronValue.minute.appoint"
|
v-model:value="cronValue.minute.appoint"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
:options="
|
||||||
<SelectOption
|
data.minute.map((item) => ({ label: item, value: item }))
|
||||||
v-for="(item, index) in data.minute"
|
"
|
||||||
:key="index"
|
/>
|
||||||
:label="item"
|
|
||||||
:value="item"
|
|
||||||
/>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
</TabPane>
|
</TabPane>
|
||||||
|
|
@ -626,14 +616,10 @@ function inputChange() {
|
||||||
v-model:value="cronValue.hour.appoint"
|
v-model:value="cronValue.hour.appoint"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
:options="
|
||||||
<SelectOption
|
data.hour.map((item) => ({ label: item, value: item }))
|
||||||
v-for="(item, index) in data.hour"
|
"
|
||||||
:key="index"
|
/>
|
||||||
:label="item"
|
|
||||||
:value="item"
|
|
||||||
/>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
</TabPane>
|
</TabPane>
|
||||||
|
|
@ -692,14 +678,10 @@ function inputChange() {
|
||||||
v-model:value="cronValue.day.appoint"
|
v-model:value="cronValue.day.appoint"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
:options="
|
||||||
<SelectOption
|
data.day.map((item) => ({ label: item, value: item }))
|
||||||
v-for="(item, index) in data.day"
|
"
|
||||||
:key="index"
|
/>
|
||||||
:label="item"
|
|
||||||
:value="item"
|
|
||||||
/>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
</TabPane>
|
</TabPane>
|
||||||
|
|
@ -756,14 +738,10 @@ function inputChange() {
|
||||||
v-model:value="cronValue.month.appoint"
|
v-model:value="cronValue.month.appoint"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
:options="
|
||||||
<SelectOption
|
data.month.map((item) => ({ label: item, value: item }))
|
||||||
v-for="(item, index) in data.month"
|
"
|
||||||
:key="index"
|
/>
|
||||||
:label="item"
|
|
||||||
:value="item"
|
|
||||||
/>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
</TabPane>
|
</TabPane>
|
||||||
|
|
@ -787,23 +765,15 @@ function inputChange() {
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem v-if="cronValue.week.type === '1'" label="范围">
|
<FormItem v-if="cronValue.week.type === '1'" label="范围">
|
||||||
<Select v-model:value="cronValue.week.range.start">
|
<Select
|
||||||
<SelectOption
|
v-model:value="cronValue.week.range.start"
|
||||||
v-for="(item, index) in data.week"
|
:options="data.week"
|
||||||
:key="index"
|
/>
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</Select>
|
|
||||||
<span style="padding: 0 15px">-</span>
|
<span style="padding: 0 15px">-</span>
|
||||||
<Select v-model:value="cronValue.week.range.end">
|
<Select
|
||||||
<SelectOption
|
v-model:value="cronValue.week.range.end"
|
||||||
v-for="(item, index) in data.week"
|
:options="data.week"
|
||||||
:key="index"
|
/>
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem v-if="cronValue.week.type === '2'" label="间隔">
|
<FormItem v-if="cronValue.week.type === '2'" label="间隔">
|
||||||
第
|
第
|
||||||
|
|
@ -814,14 +784,10 @@ function inputChange() {
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
/>
|
/>
|
||||||
周的星期
|
周的星期
|
||||||
<Select v-model:value="cronValue.week.loop.end">
|
<Select
|
||||||
<SelectOption
|
v-model:value="cronValue.week.loop.end"
|
||||||
v-for="(item, index) in data.week"
|
:options="data.week"
|
||||||
:key="index"
|
/>
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</Select>
|
|
||||||
执行一次
|
执行一次
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem v-if="cronValue.week.type === '3'" label="指定">
|
<FormItem v-if="cronValue.week.type === '3'" label="指定">
|
||||||
|
|
@ -829,24 +795,14 @@ function inputChange() {
|
||||||
v-model:value="cronValue.week.appoint"
|
v-model:value="cronValue.week.appoint"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
:options="data.week"
|
||||||
<SelectOption
|
/>
|
||||||
v-for="(item, index) in data.week"
|
|
||||||
:key="index"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem v-if="cronValue.week.type === '4'" label="最后一周">
|
<FormItem v-if="cronValue.week.type === '4'" label="最后一周">
|
||||||
<Select v-model:value="cronValue.week.last">
|
<Select
|
||||||
<SelectOption
|
v-model:value="cronValue.week.last"
|
||||||
v-for="(item, index) in data.week"
|
:options="data.week"
|
||||||
:key="index"
|
/>
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
</TabPane>
|
</TabPane>
|
||||||
|
|
@ -897,14 +853,10 @@ function inputChange() {
|
||||||
v-model:value="cronValue.year.appoint"
|
v-model:value="cronValue.year.appoint"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
:options="
|
||||||
<SelectOption
|
data.year.map((item) => ({ label: item, value: item }))
|
||||||
v-for="(item, index) in data.year"
|
"
|
||||||
:key="index"
|
/>
|
||||||
:label="item"
|
|
||||||
:value="item"
|
|
||||||
/>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
</TabPane>
|
</TabPane>
|
||||||
|
|
|
||||||
|
|
@ -12,14 +12,7 @@ import {
|
||||||
OtherPlatformEnum,
|
OtherPlatformEnum,
|
||||||
} from '@vben/constants';
|
} from '@vben/constants';
|
||||||
|
|
||||||
import {
|
import { Button, InputNumber, Select, Space, TextArea } from 'antdv-next';
|
||||||
Button,
|
|
||||||
InputNumber,
|
|
||||||
Select,
|
|
||||||
SelectOption,
|
|
||||||
Space,
|
|
||||||
TextArea,
|
|
||||||
} from 'antdv-next';
|
|
||||||
|
|
||||||
import { drawImage } from '#/api/ai/image';
|
import { drawImage } from '#/api/ai/image';
|
||||||
|
|
||||||
|
|
@ -154,15 +147,9 @@ defineExpose({ settingValues });
|
||||||
size="large"
|
size="large"
|
||||||
class="!w-80"
|
class="!w-80"
|
||||||
@change="handlerPlatformChange"
|
@change="handlerPlatformChange"
|
||||||
>
|
:options="OtherPlatformEnum"
|
||||||
<SelectOption
|
:field-names="{ label: 'name', value: 'key' }"
|
||||||
v-for="item in OtherPlatformEnum"
|
/>
|
||||||
:key="item.key"
|
|
||||||
:value="item.key"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</Space>
|
</Space>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -176,15 +163,9 @@ defineExpose({ settingValues });
|
||||||
placeholder="Select"
|
placeholder="Select"
|
||||||
size="large"
|
size="large"
|
||||||
class="!w-80"
|
class="!w-80"
|
||||||
>
|
:options="platformModels"
|
||||||
<SelectOption
|
:field-names="{ label: 'name', value: 'id' }"
|
||||||
v-for="item in platformModels"
|
/>
|
||||||
:key="item.id"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</Space>
|
</Space>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,15 +17,7 @@ import {
|
||||||
NijiVersionList,
|
NijiVersionList,
|
||||||
} from '@vben/constants';
|
} from '@vben/constants';
|
||||||
|
|
||||||
import {
|
import { Button, Image, message, Select, Space, TextArea } from 'antdv-next';
|
||||||
Button,
|
|
||||||
Image,
|
|
||||||
message,
|
|
||||||
Select,
|
|
||||||
SelectOption,
|
|
||||||
Space,
|
|
||||||
TextArea,
|
|
||||||
} from 'antdv-next';
|
|
||||||
|
|
||||||
import { midjourneyImagine } from '#/api/ai/image';
|
import { midjourneyImagine } from '#/api/ai/image';
|
||||||
import { ImageUpload } from '#/components/upload';
|
import { ImageUpload } from '#/components/upload';
|
||||||
|
|
@ -222,15 +214,8 @@ defineExpose({ settingValues });
|
||||||
class="!w-80"
|
class="!w-80"
|
||||||
allow-clear
|
allow-clear
|
||||||
placeholder="请选择版本"
|
placeholder="请选择版本"
|
||||||
>
|
:options="versionList"
|
||||||
<SelectOption
|
/>
|
||||||
v-for="item in versionList"
|
|
||||||
:key="item.value"
|
|
||||||
:value="item.value"
|
|
||||||
>
|
|
||||||
{{ item.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</Space>
|
</Space>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ import {
|
||||||
InputNumber,
|
InputNumber,
|
||||||
message,
|
message,
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
|
||||||
Space,
|
Space,
|
||||||
TextArea,
|
TextArea,
|
||||||
} from 'antdv-next';
|
} from 'antdv-next';
|
||||||
|
|
@ -169,15 +168,9 @@ defineExpose({ settingValues });
|
||||||
placeholder="Select"
|
placeholder="Select"
|
||||||
size="large"
|
size="large"
|
||||||
class="!w-80"
|
class="!w-80"
|
||||||
>
|
:options="StableDiffusionSamplers"
|
||||||
<SelectOption
|
:field-names="{ label: 'name', value: 'key' }"
|
||||||
v-for="item in StableDiffusionSamplers"
|
/>
|
||||||
:key="item.key"
|
|
||||||
:value="item.key"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</Space>
|
</Space>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -190,15 +183,9 @@ defineExpose({ settingValues });
|
||||||
placeholder="Select"
|
placeholder="Select"
|
||||||
size="large"
|
size="large"
|
||||||
class="!w-80"
|
class="!w-80"
|
||||||
>
|
:options="StableDiffusionClipGuidancePresets"
|
||||||
<SelectOption
|
:field-names="{ label: 'name', value: 'key' }"
|
||||||
v-for="item in StableDiffusionClipGuidancePresets"
|
/>
|
||||||
:key="item.key"
|
|
||||||
:value="item.key"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</Space>
|
</Space>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -211,16 +198,9 @@ defineExpose({ settingValues });
|
||||||
placeholder="Select"
|
placeholder="Select"
|
||||||
size="large"
|
size="large"
|
||||||
class="!w-80"
|
class="!w-80"
|
||||||
>
|
:options="StableDiffusionStylePresets"
|
||||||
<SelectOption
|
:field-names="{ label: 'name', value: 'key' }"
|
||||||
v-for="item in StableDiffusionStylePresets"
|
/>
|
||||||
:key="item.key"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.key"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</Space>
|
</Space>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
|
|
||||||
import { Select, SelectOption, Switch, TextArea } from 'antdv-next';
|
import { Select, Switch, TextArea } from 'antdv-next';
|
||||||
|
|
||||||
import Title from '../title/index.vue';
|
import Title from '../title/index.vue';
|
||||||
|
|
||||||
|
|
@ -47,9 +47,8 @@ defineExpose({
|
||||||
v-model:value="formData.version"
|
v-model:value="formData.version"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
>
|
:options="[
|
||||||
<SelectOption
|
...[
|
||||||
v-for="item in [
|
|
||||||
{
|
{
|
||||||
value: '3',
|
value: '3',
|
||||||
label: 'V3',
|
label: 'V3',
|
||||||
|
|
@ -58,13 +57,9 @@ defineExpose({
|
||||||
value: '2',
|
value: '2',
|
||||||
label: 'V2',
|
label: 'V2',
|
||||||
},
|
},
|
||||||
]"
|
].map((item) => ({ label: item.label, value: item.value })),
|
||||||
:key="item.value"
|
]"
|
||||||
:value="item.value"
|
/>
|
||||||
>
|
|
||||||
{{ item.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</Title>
|
</Title>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
|
|
||||||
import {
|
import { Button, Input, Select, Space, Tag, TextArea } from 'antdv-next';
|
||||||
Button,
|
|
||||||
Input,
|
|
||||||
Select,
|
|
||||||
SelectOption,
|
|
||||||
Space,
|
|
||||||
Tag,
|
|
||||||
TextArea,
|
|
||||||
} from 'antdv-next';
|
|
||||||
|
|
||||||
import Title from '../title/index.vue';
|
import Title from '../title/index.vue';
|
||||||
|
|
||||||
|
|
@ -88,9 +80,8 @@ defineExpose({
|
||||||
v-model:value="formData.version"
|
v-model:value="formData.version"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
>
|
:options="[
|
||||||
<SelectOption
|
...[
|
||||||
v-for="item in [
|
|
||||||
{
|
{
|
||||||
value: '3',
|
value: '3',
|
||||||
label: 'V3',
|
label: 'V3',
|
||||||
|
|
@ -99,13 +90,9 @@ defineExpose({
|
||||||
value: '2',
|
value: '2',
|
||||||
label: 'V2',
|
label: 'V2',
|
||||||
},
|
},
|
||||||
]"
|
].map((item) => ({ label: item.label, value: item.value })),
|
||||||
:key="item.value"
|
]"
|
||||||
:value="item.value"
|
/>
|
||||||
>
|
|
||||||
{{ item.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</Title>
|
</Title>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,7 @@ import { ref } 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 {
|
import { Form, FormItem, Input, Select, TextArea } from 'antdv-next';
|
||||||
Form,
|
|
||||||
FormItem,
|
|
||||||
Input,
|
|
||||||
Select,
|
|
||||||
SelectOption,
|
|
||||||
TextArea,
|
|
||||||
} from 'antdv-next';
|
|
||||||
|
|
||||||
type Rule = any;
|
type Rule = any;
|
||||||
const modelData = defineModel<any>(); // 创建本地数据副本
|
const modelData = defineModel<any>(); // 创建本地数据副本
|
||||||
|
|
@ -60,15 +53,13 @@ defineExpose({ validate });
|
||||||
v-model:value="modelData.status"
|
v-model:value="modelData.status"
|
||||||
allow-clear
|
allow-clear
|
||||||
placeholder="请选择状态"
|
placeholder="请选择状态"
|
||||||
>
|
:options="
|
||||||
<SelectOption
|
getDictOptions(DICT_TYPE.COMMON_STATUS, 'number').map((dict) => ({
|
||||||
v-for="dict in getDictOptions(DICT_TYPE.COMMON_STATUS, 'number')"
|
label: dict.label,
|
||||||
:key="dict.value"
|
value: dict.value as any,
|
||||||
:value="dict.value"
|
}))
|
||||||
>
|
"
|
||||||
{{ dict.label }}
|
/>
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="流程描述" name="description" class="mb-5">
|
<FormItem label="流程描述" name="description" class="mb-5">
|
||||||
<TextArea v-model:value="modelData.description" allow-clear />
|
<TextArea v-model:value="modelData.description" allow-clear />
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { Ref } from 'vue';
|
import type { Ref } from 'vue';
|
||||||
|
|
||||||
import { inject, ref } from 'vue';
|
import { computed, inject, ref } from 'vue';
|
||||||
|
|
||||||
import { useVbenDrawer } from '@vben/common-ui';
|
import { useVbenDrawer } from '@vben/common-ui';
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
import { Tinyflow } from '@vben/plugins/tinyflow';
|
import { Tinyflow } from '@vben/plugins/tinyflow';
|
||||||
import { isNumber } from '@vben/utils';
|
import { isNumber } from '@vben/utils';
|
||||||
|
|
||||||
import { Button, Input, Select, SelectOption } from 'antdv-next';
|
import { Button, Input, Select } from 'antdv-next';
|
||||||
|
|
||||||
import { testWorkflow } from '#/api/ai/workflow';
|
import { testWorkflow } from '#/api/ai/workflow';
|
||||||
|
|
||||||
|
|
@ -20,6 +20,15 @@ const tinyflowRef = ref<InstanceType<typeof Tinyflow> | null>(null);
|
||||||
const workflowData = inject('workflowData') as Ref;
|
const workflowData = inject('workflowData') as Ref;
|
||||||
const params4Test = ref<any[]>([]);
|
const params4Test = ref<any[]>([]);
|
||||||
const paramsOfStartNode = ref<any>({});
|
const paramsOfStartNode = ref<any>({});
|
||||||
|
const startNodeParamOptions = computed(() =>
|
||||||
|
Object.entries(paramsOfStartNode.value).map(
|
||||||
|
([key, value]: [string, any]) => ({
|
||||||
|
label: value?.description || key,
|
||||||
|
value: key,
|
||||||
|
disabled: !!value?.disabled,
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
);
|
||||||
const testResult = ref(null);
|
const testResult = ref(null);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const error = ref(null);
|
const error = ref(null);
|
||||||
|
|
@ -231,16 +240,12 @@ defineExpose({ validate });
|
||||||
v-for="(param, index) in params4Test"
|
v-for="(param, index) in params4Test"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<Select class="w-48" v-model="param.key" placeholder="参数名">
|
<Select
|
||||||
<SelectOption
|
v-model="param.key"
|
||||||
v-for="(value, key) in paramsOfStartNode"
|
:options="startNodeParamOptions"
|
||||||
:key="key"
|
class="w-48"
|
||||||
:value="key"
|
placeholder="参数名"
|
||||||
:disabled="!!value?.disabled"
|
/>
|
||||||
>
|
|
||||||
{{ value?.description || key }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
<Input
|
<Input
|
||||||
class="mx-2 w-48"
|
class="mx-2 w-48"
|
||||||
v-model:value="param.value"
|
v-model:value="param.value"
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import {
|
||||||
RadioGroup,
|
RadioGroup,
|
||||||
Row,
|
Row,
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
|
||||||
Switch,
|
Switch,
|
||||||
TypographyText,
|
TypographyText,
|
||||||
} from 'antdv-next';
|
} from 'antdv-next';
|
||||||
|
|
@ -277,18 +276,10 @@ watch(
|
||||||
<Col>
|
<Col>
|
||||||
<Select
|
<Select
|
||||||
v-model:value="timeUnit"
|
v-model:value="timeUnit"
|
||||||
|
:options="TIME_UNIT_TYPES"
|
||||||
class="mr-2 !w-24"
|
class="mr-2 !w-24"
|
||||||
@change="onTimeUnitChange"
|
@change="onTimeUnitChange"
|
||||||
>
|
/>
|
||||||
<SelectOption
|
|
||||||
v-for="item in TIME_UNIT_TYPES"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
>
|
|
||||||
{{ item.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
<TypographyText class="mr-2 mt-2 inline-flex text-sm">
|
<TypographyText class="mr-2 mt-2 inline-flex text-sm">
|
||||||
未处理
|
未处理
|
||||||
</TypographyText>
|
</TypographyText>
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ import {
|
||||||
Radio,
|
Radio,
|
||||||
RadioGroup,
|
RadioGroup,
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
|
||||||
Switch,
|
Switch,
|
||||||
} from 'antdv-next';
|
} from 'antdv-next';
|
||||||
|
|
||||||
|
|
@ -488,15 +487,9 @@ onMounted(async () => {
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="updateReturnNodeId"
|
@change="updateReturnNodeId"
|
||||||
placeholder="请选择驳回节点"
|
placeholder="请选择驳回节点"
|
||||||
>
|
:options="returnTaskList"
|
||||||
<SelectOption
|
:field-names="{ label: 'name', value: 'id' }"
|
||||||
v-for="item in returnTaskList"
|
/>
|
||||||
:key="item.id"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<Divider orientation="left">审批人为空时</Divider>
|
<Divider orientation="left">审批人为空时</Divider>
|
||||||
|
|
@ -525,15 +518,9 @@ onMounted(async () => {
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="updateAssignEmptyUserIds"
|
@change="updateAssignEmptyUserIds"
|
||||||
>
|
:options="userOptions"
|
||||||
<SelectOption
|
:field-names="{ label: 'nickname', value: 'id' }"
|
||||||
v-for="item in userOptions"
|
/>
|
||||||
:key="item.id"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
{{ item.nickname }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<Divider orientation="left">审批人与提交人为同一人时</Divider>
|
<Divider orientation="left">审批人与提交人为同一人时</Divider>
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { nextTick, onBeforeUnmount, ref, toRaw, watch } from 'vue';
|
import { nextTick, onBeforeUnmount, ref, toRaw, watch } from 'vue';
|
||||||
|
|
||||||
import {
|
import { Form, FormItem, Input, Select, TextArea } from 'antdv-next';
|
||||||
Form,
|
|
||||||
FormItem,
|
|
||||||
Input,
|
|
||||||
Select,
|
|
||||||
SelectOption,
|
|
||||||
TextArea,
|
|
||||||
} from 'antdv-next';
|
|
||||||
|
|
||||||
defineOptions({ name: 'FlowCondition' });
|
defineOptions({ name: 'FlowCondition' });
|
||||||
|
|
||||||
|
|
@ -164,21 +157,28 @@ watch(
|
||||||
:wrapper-col="{ span: 18 }"
|
:wrapper-col="{ span: 18 }"
|
||||||
>
|
>
|
||||||
<FormItem label="流转类型">
|
<FormItem label="流转类型">
|
||||||
<Select v-model:value="flowConditionForm.type" @change="updateFlowType">
|
<Select
|
||||||
<SelectOption value="normal">普通流转路径</SelectOption>
|
v-model:value="flowConditionForm.type"
|
||||||
<SelectOption value="default">默认流转路径</SelectOption>
|
@change="updateFlowType"
|
||||||
<SelectOption value="condition">条件流转路径</SelectOption>
|
:options="[
|
||||||
</Select>
|
{ label: '普通流转路径', value: 'normal' },
|
||||||
|
{ label: '默认流转路径', value: 'default' },
|
||||||
|
{ label: '条件流转路径', value: 'condition' },
|
||||||
|
]"
|
||||||
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
label="条件格式"
|
label="条件格式"
|
||||||
v-if="flowConditionForm.type === 'condition'"
|
v-if="flowConditionForm.type === 'condition'"
|
||||||
key="condition"
|
key="condition"
|
||||||
>
|
>
|
||||||
<Select v-model:value="flowConditionForm.conditionType">
|
<Select
|
||||||
<SelectOption value="expression">表达式</SelectOption>
|
v-model:value="flowConditionForm.conditionType"
|
||||||
<SelectOption value="script">脚本</SelectOption>
|
:options="[
|
||||||
</Select>
|
{ label: '表达式', value: 'expression' },
|
||||||
|
{ label: '脚本', value: 'script' },
|
||||||
|
]"
|
||||||
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
label="表达式"
|
label="表达式"
|
||||||
|
|
@ -209,10 +209,13 @@ watch(
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="脚本类型" key="scriptType">
|
<FormItem label="脚本类型" key="scriptType">
|
||||||
<Select v-model:value="flowConditionForm.scriptType">
|
<Select
|
||||||
<SelectOption value="inlineScript">内联脚本</SelectOption>
|
v-model:value="flowConditionForm.scriptType"
|
||||||
<SelectOption value="externalScript">外部脚本</SelectOption>
|
:options="[
|
||||||
</Select>
|
{ label: '内联脚本', value: 'inlineScript' },
|
||||||
|
{ label: '外部脚本', value: 'externalScript' },
|
||||||
|
]"
|
||||||
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
label="脚本"
|
label="脚本"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { computed, inject, nextTick, onMounted, ref, toRaw, watch } from 'vue';
|
||||||
|
|
||||||
import { cloneDeep } from '@vben/utils';
|
import { cloneDeep } from '@vben/utils';
|
||||||
|
|
||||||
import { Form, FormItem, Select, SelectOption } from 'antdv-next';
|
import { Form, FormItem, Select } from 'antdv-next';
|
||||||
|
|
||||||
import { getFormSimpleList } from '#/api/bpm/form';
|
import { getFormSimpleList } from '#/api/bpm/form';
|
||||||
|
|
||||||
|
|
@ -319,14 +319,13 @@ watch(
|
||||||
<FormItem label="业务标识">
|
<FormItem label="业务标识">
|
||||||
<Select
|
<Select
|
||||||
v-model:value="businessKey"
|
v-model:value="businessKey"
|
||||||
|
:options="[
|
||||||
|
...fieldList.map((i) => ({ label: i.label, value: i.id })),
|
||||||
|
{ label: '无', value: '' },
|
||||||
|
]"
|
||||||
@change="_updateElementBusinessKey"
|
@change="_updateElementBusinessKey"
|
||||||
allow-clear
|
allow-clear
|
||||||
>
|
/>
|
||||||
<SelectOption v-for="i in fieldList" :key="i.id" :value="i.id">
|
|
||||||
{{ i.label }}
|
|
||||||
</SelectOption>
|
|
||||||
<SelectOption value="">无</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
|
|
@ -388,7 +387,6 @@ watch(
|
||||||
<!-- allowClear-->
|
<!-- allowClear-->
|
||||||
<!-- @change="changeFieldTypeType"-->
|
<!-- @change="changeFieldTypeType"-->
|
||||||
<!-- >-->
|
<!-- >-->
|
||||||
<!-- <SelectOption v-for="(value, key) of fieldType" :key="key" :value="key">{{ value }}</SelectOption>-->
|
|
||||||
<!-- </Select>-->
|
<!-- </Select>-->
|
||||||
<!-- </FormItem>-->
|
<!-- </FormItem>-->
|
||||||
<!-- <FormItem label="类型名称" v-if="formFieldForm.typeType === 'custom'">-->
|
<!-- <FormItem label="类型名称" v-if="formFieldForm.typeType === 'custom'">-->
|
||||||
|
|
|
||||||
|
|
@ -5,15 +5,7 @@ import { confirm, useVbenDrawer, useVbenModal } from '@vben/common-ui';
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
import { cloneDeep } from '@vben/utils';
|
import { cloneDeep } from '@vben/utils';
|
||||||
|
|
||||||
import {
|
import { Button, Divider, Form, FormItem, Input, Select } from 'antdv-next';
|
||||||
Button,
|
|
||||||
Divider,
|
|
||||||
Form,
|
|
||||||
FormItem,
|
|
||||||
Input,
|
|
||||||
Select,
|
|
||||||
SelectOption,
|
|
||||||
} from 'antdv-next';
|
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import { ProcessListenerSelectModal } from '#/views/bpm/processListener/components';
|
import { ProcessListenerSelectModal } from '#/views/bpm/processListener/components';
|
||||||
|
|
@ -392,10 +384,13 @@ watch(
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<Select v-model:value="listenerForm.event">
|
<Select
|
||||||
<SelectOption value="start">start</SelectOption>
|
v-model:value="listenerForm.event"
|
||||||
<SelectOption value="end">end</SelectOption>
|
:options="[
|
||||||
</Select>
|
{ label: 'start', value: 'start' },
|
||||||
|
{ label: 'end', value: 'end' },
|
||||||
|
]"
|
||||||
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
label="监听器类型"
|
label="监听器类型"
|
||||||
|
|
@ -408,15 +403,15 @@ watch(
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<Select v-model:value="listenerForm.listenerType">
|
<Select
|
||||||
<SelectOption
|
v-model:value="listenerForm.listenerType"
|
||||||
v-for="i in Object.keys(listenerTypeObject)"
|
:options="
|
||||||
:key="i"
|
Object.keys(listenerTypeObject).map((i) => ({
|
||||||
:value="i"
|
label: listenerTypeObject[i as keyof typeof listenerType],
|
||||||
>
|
value: i,
|
||||||
{{ listenerTypeObject[i as keyof typeof listenerType] }}
|
}))
|
||||||
</SelectOption>
|
"
|
||||||
</Select>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="listenerForm.listenerType === 'classListener'"
|
v-if="listenerForm.listenerType === 'classListener'"
|
||||||
|
|
@ -490,10 +485,13 @@ watch(
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<Select v-model:value="listenerForm.scriptType">
|
<Select
|
||||||
<SelectOption value="inlineScript">内联脚本</SelectOption>
|
v-model:value="listenerForm.scriptType"
|
||||||
<SelectOption value="externalScript">外部脚本</SelectOption>
|
:options="[
|
||||||
</Select>
|
{ label: '内联脚本', value: 'inlineScript' },
|
||||||
|
{ label: '外部脚本', value: 'externalScript' },
|
||||||
|
]"
|
||||||
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="listenerForm.scriptType === 'inlineScript'"
|
v-if="listenerForm.scriptType === 'inlineScript'"
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { ref } from 'vue';
|
||||||
|
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
|
|
||||||
import { Form, FormItem, Input, Select, SelectOption } from 'antdv-next';
|
import { Form, FormItem, Input, Select } from 'antdv-next';
|
||||||
|
|
||||||
import { fieldType } from './utilSelf';
|
import { fieldType } from './utilSelf';
|
||||||
|
|
||||||
|
|
@ -72,15 +72,15 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<Select v-model:value="form.fieldType">
|
<Select
|
||||||
<SelectOption
|
v-model:value="form.fieldType"
|
||||||
v-for="i in Object.keys(fieldTypeObject)"
|
:options="[
|
||||||
:key="i"
|
...Object.keys(fieldTypeObject).map((i) => ({
|
||||||
:value="i"
|
label: fieldTypeObject[i as keyof typeof fieldType],
|
||||||
>
|
value: i,
|
||||||
{{ fieldTypeObject[i as keyof typeof fieldType] }}
|
})),
|
||||||
</SelectOption>
|
]"
|
||||||
</Select>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="form.fieldType === 'string'"
|
v-if="form.fieldType === 'string'"
|
||||||
|
|
|
||||||
|
|
@ -5,15 +5,7 @@ import { confirm, useVbenDrawer, useVbenModal } from '@vben/common-ui';
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
import { cloneDeep } from '@vben/utils';
|
import { cloneDeep } from '@vben/utils';
|
||||||
|
|
||||||
import {
|
import { Button, Divider, Form, FormItem, Input, Select } from 'antdv-next';
|
||||||
Button,
|
|
||||||
Divider,
|
|
||||||
Form,
|
|
||||||
FormItem,
|
|
||||||
Input,
|
|
||||||
Select,
|
|
||||||
SelectOption,
|
|
||||||
} from 'antdv-next';
|
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import { ProcessListenerSelectModal } from '#/views/bpm/processListener/components';
|
import { ProcessListenerSelectModal } from '#/views/bpm/processListener/components';
|
||||||
|
|
@ -379,15 +371,15 @@ watch(
|
||||||
name="event"
|
name="event"
|
||||||
:rules="[{ required: true, message: '请选择事件类型' }]"
|
:rules="[{ required: true, message: '请选择事件类型' }]"
|
||||||
>
|
>
|
||||||
<Select v-model:value="listenerForm.event">
|
<Select
|
||||||
<SelectOption
|
v-model:value="listenerForm.event"
|
||||||
v-for="i in Object.keys(listenerEventTypeObject)"
|
:options="[
|
||||||
:key="i"
|
...Object.keys(listenerEventTypeObject).map((i) => ({
|
||||||
:value="i"
|
label: listenerEventTypeObject[i as keyof typeof eventType],
|
||||||
>
|
value: i,
|
||||||
{{ listenerEventTypeObject[i as keyof typeof eventType] }}
|
})),
|
||||||
</SelectOption>
|
]"
|
||||||
</Select>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
label="监听器ID"
|
label="监听器ID"
|
||||||
|
|
@ -401,15 +393,15 @@ watch(
|
||||||
name="listenerType"
|
name="listenerType"
|
||||||
:rules="[{ required: true, message: '请选择监听器类型' }]"
|
:rules="[{ required: true, message: '请选择监听器类型' }]"
|
||||||
>
|
>
|
||||||
<Select v-model:value="listenerForm.listenerType">
|
<Select
|
||||||
<SelectOption
|
v-model:value="listenerForm.listenerType"
|
||||||
v-for="i in Object.keys(listenerTypeObject)"
|
:options="[
|
||||||
:key="i"
|
...Object.keys(listenerTypeObject).map((i) => ({
|
||||||
:value="i"
|
label: listenerTypeObject[i as keyof typeof listenerType],
|
||||||
>
|
value: i,
|
||||||
{{ listenerTypeObject[i as keyof typeof listenerType] }}
|
})),
|
||||||
</SelectOption>
|
]"
|
||||||
</Select>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="listenerForm.listenerType === 'classListener'"
|
v-if="listenerForm.listenerType === 'classListener'"
|
||||||
|
|
@ -456,10 +448,13 @@ watch(
|
||||||
key="listener-script-type"
|
key="listener-script-type"
|
||||||
:rules="[{ required: true, message: '请选择脚本类型' }]"
|
:rules="[{ required: true, message: '请选择脚本类型' }]"
|
||||||
>
|
>
|
||||||
<Select v-model:value="listenerForm.scriptType">
|
<Select
|
||||||
<SelectOption value="inlineScript">内联脚本</SelectOption>
|
v-model:value="listenerForm.scriptType"
|
||||||
<SelectOption value="externalScript">外部脚本</SelectOption>
|
:options="[
|
||||||
</Select>
|
{ label: '内联脚本', value: 'inlineScript' },
|
||||||
|
{ label: '外部脚本', value: 'externalScript' },
|
||||||
|
]"
|
||||||
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="listenerForm.scriptType === 'inlineScript'"
|
v-if="listenerForm.scriptType === 'inlineScript'"
|
||||||
|
|
@ -487,12 +482,15 @@ watch(
|
||||||
name="eventDefinitionType"
|
name="eventDefinitionType"
|
||||||
key="eventDefinitionType"
|
key="eventDefinitionType"
|
||||||
>
|
>
|
||||||
<Select v-model:value="listenerForm.eventDefinitionType">
|
<Select
|
||||||
<SelectOption value="date">日期</SelectOption>
|
v-model:value="listenerForm.eventDefinitionType"
|
||||||
<SelectOption value="duration">持续时长</SelectOption>
|
:options="[
|
||||||
<SelectOption value="cycle">循环</SelectOption>
|
{ label: '日期', value: 'date' },
|
||||||
<SelectOption value="null">无</SelectOption>
|
{ label: '持续时长', value: 'duration' },
|
||||||
</Select>
|
{ label: '循环', value: 'cycle' },
|
||||||
|
{ label: '无', value: 'null' },
|
||||||
|
]"
|
||||||
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="
|
v-if="
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import {
|
||||||
Radio,
|
Radio,
|
||||||
RadioGroup,
|
RadioGroup,
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
|
||||||
} from 'antdv-next';
|
} from 'antdv-next';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|
@ -448,15 +447,12 @@ watch(
|
||||||
<Select
|
<Select
|
||||||
v-model:value="loopCharacteristics"
|
v-model:value="loopCharacteristics"
|
||||||
@change="changeLoopCharacteristicsType"
|
@change="changeLoopCharacteristicsType"
|
||||||
>
|
:options="[
|
||||||
<SelectOption value="ParallelMultiInstance">
|
{ label: '并行多重事件', value: 'ParallelMultiInstance' },
|
||||||
并行多重事件
|
{ label: '时序多重事件', value: 'SequentialMultiInstance' },
|
||||||
</SelectOption>
|
{ label: '无', value: 'Null' },
|
||||||
<SelectOption value="SequentialMultiInstance">
|
]"
|
||||||
时序多重事件
|
/>
|
||||||
</SelectOption>
|
|
||||||
<SelectOption value="Null">无</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<template
|
<template
|
||||||
v-if="
|
v-if="
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import {
|
||||||
FormItem,
|
FormItem,
|
||||||
Input,
|
Input,
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
|
||||||
Switch,
|
Switch,
|
||||||
} from 'antdv-next';
|
} from 'antdv-next';
|
||||||
|
|
||||||
|
|
@ -269,16 +268,9 @@ onMounted(async () => {
|
||||||
placeholder="请选择子流程"
|
placeholder="请选择子流程"
|
||||||
allow-clear
|
allow-clear
|
||||||
@change="handleChildProcessChange"
|
@change="handleChildProcessChange"
|
||||||
>
|
:options="childProcessOptions"
|
||||||
<SelectOption
|
:field-names="{ label: 'name', value: 'key' }"
|
||||||
v-for="item in childProcessOptions"
|
/>
|
||||||
:key="item.key"
|
|
||||||
:value="item.key"
|
|
||||||
:label="item.name"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem label="继承变量">
|
<FormItem label="继承变量">
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { nextTick, onBeforeUnmount, onMounted, ref, toRaw, watch } from 'vue';
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { Button, message, Select, SelectOption } from 'antdv-next';
|
import { Button, message, Select } from 'antdv-next';
|
||||||
|
|
||||||
import SignalMessageModal from '../../signal-message/SignalMessageModal.vue';
|
import SignalMessageModal from '../../signal-message/SignalMessageModal.vue';
|
||||||
|
|
||||||
|
|
@ -118,17 +118,15 @@ watch(
|
||||||
<span class="w-20 text-foreground">消息实例:</span>
|
<span class="w-20 text-foreground">消息实例:</span>
|
||||||
<Select
|
<Select
|
||||||
v-model:value="bindMessageId"
|
v-model:value="bindMessageId"
|
||||||
|
:options="
|
||||||
|
Object.keys(messageMap).map((key) => ({
|
||||||
|
label: messageMap[key],
|
||||||
|
value: key,
|
||||||
|
}))
|
||||||
|
"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
@change="(value: any) => updateTaskMessage(value)"
|
@change="(value: any) => updateTaskMessage(value)"
|
||||||
>
|
/>
|
||||||
<SelectOption
|
|
||||||
v-for="key in Object.keys(messageMap)"
|
|
||||||
:key="key"
|
|
||||||
:value="key"
|
|
||||||
>
|
|
||||||
{{ messageMap[key] }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</div>
|
</div>
|
||||||
<Modal @confirm="handleConfirm" />
|
<Modal @confirm="handleConfirm" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { nextTick, onBeforeUnmount, ref, toRaw, watch } from 'vue';
|
import { nextTick, onBeforeUnmount, ref, toRaw, watch } from 'vue';
|
||||||
|
|
||||||
import {
|
import { Form, FormItem, Input, Select, TextArea } from 'antdv-next';
|
||||||
Form,
|
|
||||||
FormItem,
|
|
||||||
Input,
|
|
||||||
Select,
|
|
||||||
SelectOption,
|
|
||||||
TextArea,
|
|
||||||
} from 'antdv-next';
|
|
||||||
|
|
||||||
defineOptions({ name: 'ScriptTask' });
|
defineOptions({ name: 'ScriptTask' });
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -86,10 +79,13 @@ watch(
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<!-- TODO scriptType 外部资源 和 内联脚本, flowable 文档 https://www.flowable.com/open-source/docs/bpmn/ch07b-BPMN-Constructs#script-task 没看到到有相应的属性 -->
|
<!-- TODO scriptType 外部资源 和 内联脚本, flowable 文档 https://www.flowable.com/open-source/docs/bpmn/ch07b-BPMN-Constructs#script-task 没看到到有相应的属性 -->
|
||||||
<FormItem label="脚本类型">
|
<FormItem label="脚本类型">
|
||||||
<Select v-model:value="scriptTaskForm.scriptType">
|
<Select
|
||||||
<SelectOption value="inline">内联脚本</SelectOption>
|
v-model:value="scriptTaskForm.scriptType"
|
||||||
<SelectOption value="external">外部资源</SelectOption>
|
:options="[
|
||||||
</Select>
|
{ label: '内联脚本', value: 'inline' },
|
||||||
|
{ label: '外部资源', value: 'external' },
|
||||||
|
]"
|
||||||
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="脚本" v-show="scriptTaskForm.scriptType === 'inline'">
|
<FormItem label="脚本" v-show="scriptTaskForm.scriptType === 'inline'">
|
||||||
<TextArea
|
<TextArea
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ import {
|
||||||
Form,
|
Form,
|
||||||
FormItem,
|
FormItem,
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
|
||||||
TextArea,
|
TextArea,
|
||||||
TreeSelect,
|
TreeSelect,
|
||||||
} from 'antdv-next';
|
} from 'antdv-next';
|
||||||
|
|
@ -356,15 +355,8 @@ onBeforeUnmount(() => {
|
||||||
allow-clear
|
allow-clear
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="changeCandidateStrategy"
|
@change="changeCandidateStrategy"
|
||||||
>
|
:options="CANDIDATE_STRATEGY"
|
||||||
<SelectOption
|
/>
|
||||||
v-for="(dict, index) in CANDIDATE_STRATEGY"
|
|
||||||
:key="index"
|
|
||||||
:value="dict.value"
|
|
||||||
>
|
|
||||||
{{ dict.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="userTaskForm.candidateStrategy === CandidateStrategy.ROLE"
|
v-if="userTaskForm.candidateStrategy === CandidateStrategy.ROLE"
|
||||||
|
|
@ -377,15 +369,9 @@ onBeforeUnmount(() => {
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="updateElementTask"
|
@change="updateElementTask"
|
||||||
>
|
:options="roleOptions"
|
||||||
<SelectOption
|
:field-names="{ label: 'name', value: 'id' }"
|
||||||
v-for="item in roleOptions"
|
/>
|
||||||
:key="item.id"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -419,15 +405,9 @@ onBeforeUnmount(() => {
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="updateElementTask"
|
@change="updateElementTask"
|
||||||
>
|
:options="postOptions"
|
||||||
<SelectOption
|
:field-names="{ label: 'name', value: 'id' }"
|
||||||
v-for="item in postOptions"
|
/>
|
||||||
:key="item.id"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="userTaskForm.candidateStrategy === CandidateStrategy.USER"
|
v-if="userTaskForm.candidateStrategy === CandidateStrategy.USER"
|
||||||
|
|
@ -440,15 +420,9 @@ onBeforeUnmount(() => {
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="updateElementTask"
|
@change="updateElementTask"
|
||||||
>
|
:options="userOptions"
|
||||||
<SelectOption
|
:field-names="{ label: 'nickname', value: 'id' }"
|
||||||
v-for="item in userOptions"
|
/>
|
||||||
:key="item.id"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
{{ item.nickname }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="userTaskForm.candidateStrategy === CandidateStrategy.USER_GROUP"
|
v-if="userTaskForm.candidateStrategy === CandidateStrategy.USER_GROUP"
|
||||||
|
|
@ -461,15 +435,9 @@ onBeforeUnmount(() => {
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="updateElementTask"
|
@change="updateElementTask"
|
||||||
>
|
:options="userGroupOptions"
|
||||||
<SelectOption
|
:field-names="{ label: 'name', value: 'id' }"
|
||||||
v-for="item in userGroupOptions"
|
/>
|
||||||
:key="item.id"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="userTaskForm.candidateStrategy === CandidateStrategy.FORM_USER"
|
v-if="userTaskForm.candidateStrategy === CandidateStrategy.FORM_USER"
|
||||||
|
|
@ -478,19 +446,17 @@ onBeforeUnmount(() => {
|
||||||
>
|
>
|
||||||
<Select
|
<Select
|
||||||
v-model:value="userTaskForm.candidateParam"
|
v-model:value="userTaskForm.candidateParam"
|
||||||
|
:options="
|
||||||
|
userFieldOnFormOptions.map((item) => ({
|
||||||
|
label: item.title,
|
||||||
|
value: item.field,
|
||||||
|
disabled: !item.required,
|
||||||
|
}))
|
||||||
|
"
|
||||||
allow-clear
|
allow-clear
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="handleFormUserChange"
|
@change="handleFormUserChange"
|
||||||
>
|
/>
|
||||||
<SelectOption
|
|
||||||
v-for="(item, idx) in userFieldOnFormOptions"
|
|
||||||
:key="idx"
|
|
||||||
:value="item.field"
|
|
||||||
:disabled="!item.required"
|
|
||||||
>
|
|
||||||
{{ item.title }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -504,16 +470,14 @@ onBeforeUnmount(() => {
|
||||||
allow-clear
|
allow-clear
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="updateElementTask"
|
@change="updateElementTask"
|
||||||
>
|
:options="[
|
||||||
<SelectOption
|
...deptFieldOnFormOptions.map((item) => ({
|
||||||
v-for="(item, idx) in deptFieldOnFormOptions"
|
label: item.title,
|
||||||
:key="idx"
|
value: item.field,
|
||||||
:value="item.field"
|
disabled: !item.required,
|
||||||
:disabled="!item.required"
|
})),
|
||||||
>
|
]"
|
||||||
{{ item.title }}
|
/>
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -528,15 +492,12 @@ onBeforeUnmount(() => {
|
||||||
:label="deptLevelLabel!"
|
:label="deptLevelLabel!"
|
||||||
name="deptLevel"
|
name="deptLevel"
|
||||||
>
|
>
|
||||||
<Select v-model:value="deptLevel" allow-clear @change="updateElementTask">
|
<Select
|
||||||
<SelectOption
|
v-model:value="deptLevel"
|
||||||
v-for="(item, index) in MULTI_LEVEL_DEPT"
|
allow-clear
|
||||||
:key="index"
|
@change="updateElementTask"
|
||||||
:value="item.value"
|
:options="MULTI_LEVEL_DEPT"
|
||||||
>
|
/>
|
||||||
{{ item.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="userTaskForm.candidateStrategy === CandidateStrategy.EXPRESSION"
|
v-if="userTaskForm.candidateStrategy === CandidateStrategy.EXPRESSION"
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ import {
|
||||||
RadioGroup,
|
RadioGroup,
|
||||||
Row,
|
Row,
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
|
||||||
Switch,
|
Switch,
|
||||||
} from 'antdv-next';
|
} from 'antdv-next';
|
||||||
|
|
||||||
|
|
@ -432,15 +431,9 @@ onMounted(async () => {
|
||||||
v-model:value="configForm.calledProcessDefinitionKey"
|
v-model:value="configForm.calledProcessDefinitionKey"
|
||||||
allow-clear
|
allow-clear
|
||||||
@change="handleCalledElementChange"
|
@change="handleCalledElementChange"
|
||||||
>
|
:options="childProcessOptions"
|
||||||
<SelectOption
|
:field-names="{ label: 'name', value: 'key' }"
|
||||||
v-for="(item, index) in childProcessOptions"
|
/>
|
||||||
:key="index"
|
|
||||||
:value="item.key"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
label="是否自动跳过子流程发起节点"
|
label="是否自动跳过子流程发起节点"
|
||||||
|
|
@ -472,15 +465,12 @@ onMounted(async () => {
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<Select class="!w-40" v-model:value="item.source">
|
<Select
|
||||||
<SelectOption
|
class="!w-40"
|
||||||
v-for="(field, fIdx) in formFieldOptions"
|
v-model:value="item.source"
|
||||||
:key="fIdx"
|
:options="formFieldOptions"
|
||||||
:value="field.field"
|
:field-names="{ label: 'title', value: 'field' }"
|
||||||
>
|
/>
|
||||||
{{ field.title }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
<div class="mr-2">
|
<div class="mr-2">
|
||||||
|
|
@ -494,15 +484,12 @@ onMounted(async () => {
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<Select class="!w-40" v-model:value="item.target">
|
<Select
|
||||||
<SelectOption
|
class="!w-40"
|
||||||
v-for="(field, fIdx) in childFormFieldOptions"
|
v-model:value="item.target"
|
||||||
:key="fIdx"
|
:options="childFormFieldOptions"
|
||||||
:value="field.field"
|
:field-names="{ label: 'title', value: 'field' }"
|
||||||
>
|
/>
|
||||||
{{ field.title }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
<div class="mr-1 flex h-8 items-center">
|
<div class="mr-1 flex h-8 items-center">
|
||||||
|
|
@ -546,15 +533,12 @@ onMounted(async () => {
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<Select class="!w-40" v-model:value="item.source">
|
<Select
|
||||||
<SelectOption
|
class="!w-40"
|
||||||
v-for="(field, fIdx) in childFormFieldOptions"
|
v-model:value="item.source"
|
||||||
:key="fIdx"
|
:options="childFormFieldOptions"
|
||||||
:value="field.field"
|
:field-names="{ label: 'title', value: 'field' }"
|
||||||
>
|
/>
|
||||||
{{ field.title }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
<div class="mr-2">
|
<div class="mr-2">
|
||||||
|
|
@ -568,15 +552,12 @@ onMounted(async () => {
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<Select class="!w-40" v-model:value="item.target">
|
<Select
|
||||||
<SelectOption
|
class="!w-40"
|
||||||
v-for="(field, fIdx) in formFieldOptions"
|
v-model:value="item.target"
|
||||||
:key="fIdx"
|
:options="formFieldOptions"
|
||||||
:value="field.field"
|
:field-names="{ label: 'title', value: 'field' }"
|
||||||
>
|
/>
|
||||||
{{ field.title }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
<div class="mr-1 flex h-8 items-center">
|
<div class="mr-1 flex h-8 items-center">
|
||||||
|
|
@ -617,16 +598,12 @@ onMounted(async () => {
|
||||||
label="子流程发起人字段"
|
label="子流程发起人字段"
|
||||||
name="startUserFormField"
|
name="startUserFormField"
|
||||||
>
|
>
|
||||||
<Select v-model:value="configForm.startUserFormField" allow-clear>
|
<Select
|
||||||
<SelectOption
|
v-model:value="configForm.startUserFormField"
|
||||||
v-for="(field, fIdx) in startUserFormFieldOptions"
|
allow-clear
|
||||||
:key="fIdx"
|
:options="startUserFormFieldOptions"
|
||||||
:label="field.title"
|
:field-names="{ label: 'title', value: 'field' }"
|
||||||
:value="field.field"
|
/>
|
||||||
>
|
|
||||||
{{ field.title }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -690,16 +667,11 @@ onMounted(async () => {
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Col>
|
</Col>
|
||||||
<Col>
|
<Col>
|
||||||
<Select v-model:value="configForm.timeUnit" class="w-24">
|
<Select
|
||||||
<SelectOption
|
v-model:value="configForm.timeUnit"
|
||||||
v-for="item in TIME_UNIT_TYPES"
|
class="w-24"
|
||||||
:key="item.value"
|
:options="TIME_UNIT_TYPES"
|
||||||
:label="item.label"
|
/>
|
||||||
:value="item.value"
|
|
||||||
>
|
|
||||||
{{ item.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</Col>
|
</Col>
|
||||||
<Col>
|
<Col>
|
||||||
<span class="inline-flex h-8 items-center">后进入下一节点</span>
|
<span class="inline-flex h-8 items-center">后进入下一节点</span>
|
||||||
|
|
@ -782,16 +754,8 @@ onMounted(async () => {
|
||||||
<Select
|
<Select
|
||||||
v-model:value="configForm.multiInstanceSourceType"
|
v-model:value="configForm.multiInstanceSourceType"
|
||||||
@change="handleMultiInstanceSourceTypeChange"
|
@change="handleMultiInstanceSourceTypeChange"
|
||||||
>
|
:options="CHILD_PROCESS_MULTI_INSTANCE_SOURCE_TYPE"
|
||||||
<SelectOption
|
/>
|
||||||
v-for="item in CHILD_PROCESS_MULTI_INSTANCE_SOURCE_TYPE"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
>
|
|
||||||
{{ item.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -834,16 +798,11 @@ onMounted(async () => {
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<Select v-model:value="configForm.multiInstanceSource">
|
<Select
|
||||||
<SelectOption
|
v-model:value="configForm.multiInstanceSource"
|
||||||
v-for="(field, fIdx) in digitalFormFieldOptions"
|
:options="digitalFormFieldOptions"
|
||||||
:key="fIdx"
|
:field-names="{ label: 'title', value: 'field' }"
|
||||||
:label="field.title"
|
/>
|
||||||
:value="field.field"
|
|
||||||
>
|
|
||||||
{{ field.title }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -863,16 +822,11 @@ onMounted(async () => {
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<Select v-model:value="configForm.multiInstanceSource">
|
<Select
|
||||||
<SelectOption
|
v-model:value="configForm.multiInstanceSource"
|
||||||
v-for="(field, fIdx) in multiFormFieldOptions"
|
:options="multiFormFieldOptions"
|
||||||
:key="fIdx"
|
:field-names="{ label: 'title', value: 'field' }"
|
||||||
:label="field.title"
|
/>
|
||||||
:value="field.field"
|
|
||||||
>
|
|
||||||
{{ field.title }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ import {
|
||||||
RadioGroup,
|
RadioGroup,
|
||||||
Row,
|
Row,
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
|
||||||
TabPane,
|
TabPane,
|
||||||
Tabs,
|
Tabs,
|
||||||
TextArea,
|
TextArea,
|
||||||
|
|
@ -259,18 +258,11 @@ defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
|
||||||
>
|
>
|
||||||
<Select
|
<Select
|
||||||
v-model:value="configForm.roleIds"
|
v-model:value="configForm.roleIds"
|
||||||
clearable
|
allow-clear
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
>
|
:options="roleOptions"
|
||||||
<SelectOption
|
:field-names="{ label: 'name', value: 'id' }"
|
||||||
v-for="item in roleOptions"
|
/>
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -306,18 +298,11 @@ defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
|
||||||
>
|
>
|
||||||
<Select
|
<Select
|
||||||
v-model:value="configForm.postIds"
|
v-model:value="configForm.postIds"
|
||||||
clearable
|
allow-clear
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
>
|
:options="postOptions"
|
||||||
<SelectOption
|
:field-names="{ label: 'name', value: 'id' }"
|
||||||
v-for="item in postOptions"
|
/>
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id!"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="configForm.candidateStrategy === CandidateStrategy.USER"
|
v-if="configForm.candidateStrategy === CandidateStrategy.USER"
|
||||||
|
|
@ -326,18 +311,11 @@ defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
|
||||||
>
|
>
|
||||||
<Select
|
<Select
|
||||||
v-model:value="configForm.userIds"
|
v-model:value="configForm.userIds"
|
||||||
clearable
|
allow-clear
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
>
|
:options="userOptions"
|
||||||
<SelectOption
|
:field-names="{ label: 'nickname', value: 'id' }"
|
||||||
v-for="item in userOptions"
|
/>
|
||||||
:key="item.id"
|
|
||||||
:label="item.nickname"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
{{ item.nickname }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -348,18 +326,11 @@ defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
|
||||||
>
|
>
|
||||||
<Select
|
<Select
|
||||||
v-model:value="configForm.userGroups"
|
v-model:value="configForm.userGroups"
|
||||||
clearable
|
allow-clear
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
>
|
:options="userGroupOptions"
|
||||||
<SelectOption
|
:field-names="{ label: 'name', value: 'id' }"
|
||||||
v-for="item in userGroupOptions"
|
/>
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -368,17 +339,17 @@ defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
|
||||||
label="表单内用户字段"
|
label="表单内用户字段"
|
||||||
name="formUser"
|
name="formUser"
|
||||||
>
|
>
|
||||||
<Select v-model:value="configForm.formUser" clearable>
|
<Select
|
||||||
<SelectOption
|
v-model:value="configForm.formUser"
|
||||||
v-for="(item, idx) in userFieldOnFormOptions"
|
:options="
|
||||||
:key="idx"
|
userFieldOnFormOptions.map((item) => ({
|
||||||
:label="item.title"
|
label: item.title,
|
||||||
:value="item.field"
|
value: item.field,
|
||||||
:disabled="!item.required"
|
disabled: !item.required,
|
||||||
>
|
}))
|
||||||
{{ item.title }}
|
"
|
||||||
</SelectOption>
|
allow-clear
|
||||||
</Select>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -388,17 +359,17 @@ defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
|
||||||
label="表单内部门字段"
|
label="表单内部门字段"
|
||||||
name="formDept"
|
name="formDept"
|
||||||
>
|
>
|
||||||
<Select v-model:value="configForm.formDept" clearable>
|
<Select
|
||||||
<SelectOption
|
v-model:value="configForm.formDept"
|
||||||
v-for="(item, idx) in deptFieldOnFormOptions"
|
allow-clear
|
||||||
:key="idx"
|
:options="[
|
||||||
:label="item.title"
|
...deptFieldOnFormOptions.map((item) => ({
|
||||||
:value="item.field"
|
label: item.title,
|
||||||
:disabled="!item.required"
|
value: item.field,
|
||||||
>
|
disabled: !item.required,
|
||||||
{{ item.title }}
|
})),
|
||||||
</SelectOption>
|
]"
|
||||||
</Select>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -414,16 +385,11 @@ defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
|
||||||
:label="deptLevelLabel!"
|
:label="deptLevelLabel!"
|
||||||
name="deptLevel"
|
name="deptLevel"
|
||||||
>
|
>
|
||||||
<Select v-model:value="configForm.deptLevel" clearable>
|
<Select
|
||||||
<SelectOption
|
v-model:value="configForm.deptLevel"
|
||||||
v-for="(item, index) in MULTI_LEVEL_DEPT"
|
allow-clear
|
||||||
:key="index"
|
:options="MULTI_LEVEL_DEPT"
|
||||||
:label="item.label"
|
/>
|
||||||
:value="item.value"
|
|
||||||
>
|
|
||||||
{{ item.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="
|
v-if="
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ import {
|
||||||
RadioGroup,
|
RadioGroup,
|
||||||
Row,
|
Row,
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
|
||||||
} from 'antdv-next';
|
} from 'antdv-next';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|
@ -207,15 +206,11 @@ defineExpose({ openDrawer }); // 暴露方法给父组件
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Col>
|
</Col>
|
||||||
<Col>
|
<Col>
|
||||||
<Select v-model:value="configForm.timeUnit" class="w-28">
|
<Select
|
||||||
<SelectOption
|
v-model:value="configForm.timeUnit"
|
||||||
v-for="item in TIME_UNIT_TYPES"
|
class="w-28"
|
||||||
:key="item.value"
|
:options="TIME_UNIT_TYPES"
|
||||||
:value="item.value"
|
/>
|
||||||
>
|
|
||||||
{{ item.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</Col>
|
</Col>
|
||||||
<Col>
|
<Col>
|
||||||
<span class="inline-flex h-8 items-center">后进入下一节点</span>
|
<span class="inline-flex h-8 items-center">后进入下一节点</span>
|
||||||
|
|
|
||||||
|
|
@ -257,16 +257,11 @@ defineExpose({ validate });
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Col>
|
</Col>
|
||||||
<Col :span="6">
|
<Col :span="6">
|
||||||
<Select v-model:value="rule.opCode" placeholder="请选择操作符">
|
<Select
|
||||||
<SelectOption
|
v-model:value="rule.opCode"
|
||||||
v-for="operator in COMPARISON_OPERATORS"
|
placeholder="请选择操作符"
|
||||||
:key="operator.value"
|
:options="COMPARISON_OPERATORS"
|
||||||
:label="operator.label"
|
/>
|
||||||
:value="operator.value"
|
|
||||||
>
|
|
||||||
{{ operator.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</Col>
|
</Col>
|
||||||
<Col :span="7">
|
<Col :span="7">
|
||||||
<FormItem
|
<FormItem
|
||||||
|
|
|
||||||
|
|
@ -3,15 +3,7 @@ import type { HttpRequestParam } from '../../../consts';
|
||||||
|
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import {
|
import { Button, Col, FormItem, Input, Row, Select } from 'antdv-next';
|
||||||
Button,
|
|
||||||
Col,
|
|
||||||
FormItem,
|
|
||||||
Input,
|
|
||||||
Row,
|
|
||||||
Select,
|
|
||||||
SelectOption,
|
|
||||||
} from 'antdv-next';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
BPM_HTTP_REQUEST_PARAM_TYPES,
|
BPM_HTTP_REQUEST_PARAM_TYPES,
|
||||||
|
|
@ -77,16 +69,10 @@ function deleteHttpRequestParam(arr: HttpRequestParam[], index: number) {
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Col>
|
</Col>
|
||||||
<Col :span="5">
|
<Col :span="5">
|
||||||
<Select v-model:value="item.type">
|
<Select
|
||||||
<SelectOption
|
v-model:value="item.type"
|
||||||
v-for="types in BPM_HTTP_REQUEST_PARAM_TYPES"
|
:options="BPM_HTTP_REQUEST_PARAM_TYPES"
|
||||||
:key="types.value"
|
/>
|
||||||
:label="types.label"
|
|
||||||
:value="types.value"
|
|
||||||
>
|
|
||||||
{{ types.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</Col>
|
</Col>
|
||||||
<Col :span="10">
|
<Col :span="10">
|
||||||
<FormItem
|
<FormItem
|
||||||
|
|
@ -113,17 +99,17 @@ function deleteHttpRequestParam(arr: HttpRequestParam[], index: number) {
|
||||||
]"
|
]"
|
||||||
v-if="item.type === BpmHttpRequestParamTypeEnum.FROM_FORM"
|
v-if="item.type === BpmHttpRequestParamTypeEnum.FROM_FORM"
|
||||||
>
|
>
|
||||||
<Select v-model:value="item.value" placeholder="请选择表单字段">
|
<Select
|
||||||
<SelectOption
|
v-model:value="item.value"
|
||||||
v-for="(field, fIdx) in formFieldOptions"
|
:options="
|
||||||
:key="fIdx"
|
formFieldOptions.map((field) => ({
|
||||||
:label="field.title"
|
label: field.title,
|
||||||
:value="field.field"
|
value: field.field,
|
||||||
:disabled="!field.required"
|
disabled: !field.required,
|
||||||
>
|
}))
|
||||||
{{ field.title }}
|
"
|
||||||
</SelectOption>
|
placeholder="请选择表单字段"
|
||||||
</Select>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Col>
|
</Col>
|
||||||
<Col :span="2">
|
<Col :span="2">
|
||||||
|
|
@ -168,16 +154,10 @@ function deleteHttpRequestParam(arr: HttpRequestParam[], index: number) {
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Col>
|
</Col>
|
||||||
<Col :span="5">
|
<Col :span="5">
|
||||||
<Select v-model:value="item.type">
|
<Select
|
||||||
<SelectOption
|
v-model:value="item.type"
|
||||||
v-for="types in BPM_HTTP_REQUEST_PARAM_TYPES"
|
:options="BPM_HTTP_REQUEST_PARAM_TYPES"
|
||||||
:key="types.value"
|
/>
|
||||||
:label="types.label"
|
|
||||||
:value="types.value"
|
|
||||||
>
|
|
||||||
{{ types.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</Col>
|
</Col>
|
||||||
<Col :span="10">
|
<Col :span="10">
|
||||||
<FormItem
|
<FormItem
|
||||||
|
|
@ -204,17 +184,17 @@ function deleteHttpRequestParam(arr: HttpRequestParam[], index: number) {
|
||||||
]"
|
]"
|
||||||
v-if="item.type === BpmHttpRequestParamTypeEnum.FROM_FORM"
|
v-if="item.type === BpmHttpRequestParamTypeEnum.FROM_FORM"
|
||||||
>
|
>
|
||||||
<Select v-model:value="item.value" placeholder="请选择表单字段">
|
<Select
|
||||||
<SelectOption
|
v-model:value="item.value"
|
||||||
v-for="(field, fIdx) in formFieldOptions"
|
:options="
|
||||||
:key="fIdx"
|
formFieldOptions.map((field) => ({
|
||||||
:label="field.title"
|
label: field.title,
|
||||||
:value="field.field"
|
value: field.field,
|
||||||
:disabled="!field.required"
|
disabled: !field.required,
|
||||||
>
|
}))
|
||||||
{{ field.title }}
|
"
|
||||||
</SelectOption>
|
placeholder="请选择表单字段"
|
||||||
</Select>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Col>
|
</Col>
|
||||||
<Col :span="2">
|
<Col :span="2">
|
||||||
|
|
|
||||||
|
|
@ -3,16 +3,7 @@ import { toRefs, watch } from 'vue';
|
||||||
|
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import {
|
import { Alert, Button, Col, FormItem, Input, Row, Select } from 'antdv-next';
|
||||||
Alert,
|
|
||||||
Button,
|
|
||||||
Col,
|
|
||||||
FormItem,
|
|
||||||
Input,
|
|
||||||
Row,
|
|
||||||
Select,
|
|
||||||
SelectOption,
|
|
||||||
} from 'antdv-next';
|
|
||||||
|
|
||||||
import { useFormFields } from '../../../helpers';
|
import { useFormFields } from '../../../helpers';
|
||||||
import HttpRequestParamSetting from './http-request-param-setting.vue';
|
import HttpRequestParamSetting from './http-request-param-setting.vue';
|
||||||
|
|
@ -131,17 +122,14 @@ function deleteHttpResponseSetting(
|
||||||
v-model:value="item.key"
|
v-model:value="item.key"
|
||||||
placeholder="请选择表单字段"
|
placeholder="请选择表单字段"
|
||||||
allow-clear
|
allow-clear
|
||||||
>
|
:options="[
|
||||||
<SelectOption
|
...formFields.map((field) => ({
|
||||||
v-for="(field, fIdx) in formFields"
|
label: field.title,
|
||||||
:key="fIdx"
|
value: field.field,
|
||||||
:label="field.title"
|
disabled: !field.required,
|
||||||
:value="field.field"
|
})),
|
||||||
:disabled="!field.required"
|
]"
|
||||||
>
|
/>
|
||||||
{{ field.title }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Col>
|
</Col>
|
||||||
<Col :span="12">
|
<Col :span="12">
|
||||||
|
|
@ -163,7 +151,9 @@ function deleteHttpResponseSetting(
|
||||||
<IconifyIcon
|
<IconifyIcon
|
||||||
class="size-4 cursor-pointer text-red-500"
|
class="size-4 cursor-pointer text-red-500"
|
||||||
icon="lucide:trash-2"
|
icon="lucide:trash-2"
|
||||||
@click="deleteHttpResponseSetting(setting.response!, index)"
|
@click="
|
||||||
|
deleteHttpResponseSetting(setting.response!, Number(index))
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ import {
|
||||||
message,
|
message,
|
||||||
Row,
|
Row,
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
|
||||||
} from 'antdv-next';
|
} from 'antdv-next';
|
||||||
|
|
||||||
import { ConditionType } from '../../consts';
|
import { ConditionType } from '../../consts';
|
||||||
|
|
@ -249,15 +248,8 @@ defineExpose({ openDrawer }); // 暴露方法给父组件
|
||||||
v-model:value="item.nodeId"
|
v-model:value="item.nodeId"
|
||||||
placeholder="请选择路由目标节点"
|
placeholder="请选择路由目标节点"
|
||||||
allow-clear
|
allow-clear
|
||||||
>
|
:options="nodeOptions"
|
||||||
<SelectOption
|
/>
|
||||||
v-for="node in nodeOptions"
|
|
||||||
:key="node.value"
|
|
||||||
:value="node.value"
|
|
||||||
>
|
|
||||||
{{ node.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ import {
|
||||||
message,
|
message,
|
||||||
Row,
|
Row,
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
|
||||||
Tag,
|
Tag,
|
||||||
} from 'antdv-next';
|
} from 'antdv-next';
|
||||||
|
|
||||||
|
|
@ -412,16 +411,11 @@ onMounted(() => {
|
||||||
:rules="formRules"
|
:rules="formRules"
|
||||||
>
|
>
|
||||||
<FormItem label="触发器类型" name="type">
|
<FormItem label="触发器类型" name="type">
|
||||||
<Select v-model:value="configForm.type" @change="changeTriggerType">
|
<Select
|
||||||
<SelectOption
|
v-model:value="configForm.type"
|
||||||
v-for="(item, index) in TRIGGER_TYPES"
|
@change="changeTriggerType"
|
||||||
:key="index"
|
:options="TRIGGER_TYPES"
|
||||||
:value="item.value"
|
/>
|
||||||
:label="item.label"
|
|
||||||
>
|
|
||||||
{{ item.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<!-- HTTP 请求触发器 -->
|
<!-- HTTP 请求触发器 -->
|
||||||
<div
|
<div
|
||||||
|
|
@ -509,17 +503,9 @@ onMounted(() => {
|
||||||
placeholder="请选择表单字段"
|
placeholder="请选择表单字段"
|
||||||
:disabled="key !== ''"
|
:disabled="key !== ''"
|
||||||
allow-clear
|
allow-clear
|
||||||
>
|
:options="optionalUpdateFormFields"
|
||||||
<SelectOption
|
:field-names="{ label: 'title', value: 'field' }"
|
||||||
v-for="(field, fIdx) in optionalUpdateFormFields"
|
/>
|
||||||
:key="fIdx"
|
|
||||||
:label="field.title"
|
|
||||||
:value="field.field"
|
|
||||||
:disabled="field.disabled"
|
|
||||||
>
|
|
||||||
{{ field.title }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Col>
|
</Col>
|
||||||
<Col :span="4">
|
<Col :span="4">
|
||||||
|
|
@ -653,16 +639,9 @@ onMounted(() => {
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
placeholder="请选择要删除的字段"
|
placeholder="请选择要删除的字段"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
>
|
:options="formFields"
|
||||||
<SelectOption
|
:field-names="{ label: 'title', value: 'field' }"
|
||||||
v-for="field in formFields"
|
/>
|
||||||
:key="field.field"
|
|
||||||
:label="field.title"
|
|
||||||
:value="field.field"
|
|
||||||
>
|
|
||||||
{{ field.title }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,6 @@ import {
|
||||||
RadioGroup,
|
RadioGroup,
|
||||||
Row,
|
Row,
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
|
||||||
Switch,
|
Switch,
|
||||||
TabPane,
|
TabPane,
|
||||||
Tabs,
|
Tabs,
|
||||||
|
|
@ -148,6 +147,20 @@ const deptFieldOnFormOptions = computed(() => {
|
||||||
return formFieldOptions.filter((item) => item.type === 'DeptSelect');
|
return formFieldOptions.filter((item) => item.type === 'DeptSelect');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const userFieldSelectOptions = computed(() =>
|
||||||
|
userFieldOnFormOptions.value.map((item) => ({
|
||||||
|
...item,
|
||||||
|
disabled: !item.required,
|
||||||
|
})),
|
||||||
|
);
|
||||||
|
|
||||||
|
const deptFieldSelectOptions = computed(() =>
|
||||||
|
deptFieldOnFormOptions.value.map((item) => ({
|
||||||
|
...item,
|
||||||
|
disabled: !item.required,
|
||||||
|
})),
|
||||||
|
);
|
||||||
|
|
||||||
// 操作按钮设置
|
// 操作按钮设置
|
||||||
const {
|
const {
|
||||||
buttonsSetting,
|
buttonsSetting,
|
||||||
|
|
@ -697,18 +710,11 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<Select
|
<Select
|
||||||
v-model:value="configForm.roleIds"
|
v-model:value="configForm.roleIds"
|
||||||
clearable
|
:options="roleOptions"
|
||||||
|
:field-names="{ label: 'name', value: 'id' }"
|
||||||
|
allow-clear
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
>
|
/>
|
||||||
<SelectOption
|
|
||||||
v-for="item in roleOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -744,18 +750,11 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<Select
|
<Select
|
||||||
v-model:value="configForm.postIds"
|
v-model:value="configForm.postIds"
|
||||||
clearable
|
:options="postOptions"
|
||||||
|
:field-names="{ label: 'name', value: 'id' }"
|
||||||
|
allow-clear
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
>
|
/>
|
||||||
<SelectOption
|
|
||||||
v-for="item in postOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id!"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="configForm.candidateStrategy === CandidateStrategy.USER"
|
v-if="configForm.candidateStrategy === CandidateStrategy.USER"
|
||||||
|
|
@ -764,18 +763,11 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<Select
|
<Select
|
||||||
v-model:value="configForm.userIds"
|
v-model:value="configForm.userIds"
|
||||||
clearable
|
:options="userOptions"
|
||||||
|
:field-names="{ label: 'nickname', value: 'id' }"
|
||||||
|
allow-clear
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
>
|
/>
|
||||||
<SelectOption
|
|
||||||
v-for="item in userOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.nickname"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
{{ item.nickname }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -786,18 +778,11 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<Select
|
<Select
|
||||||
v-model:value="configForm.userGroups"
|
v-model:value="configForm.userGroups"
|
||||||
clearable
|
:options="userGroupOptions"
|
||||||
|
:field-names="{ label: 'name', value: 'id' }"
|
||||||
|
allow-clear
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
>
|
/>
|
||||||
<SelectOption
|
|
||||||
v-for="item in userGroupOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -806,17 +791,12 @@ onMounted(() => {
|
||||||
label="表单内用户字段"
|
label="表单内用户字段"
|
||||||
name="formUser"
|
name="formUser"
|
||||||
>
|
>
|
||||||
<Select v-model:value="configForm.formUser" clearable>
|
<Select
|
||||||
<SelectOption
|
v-model:value="configForm.formUser"
|
||||||
v-for="(item, idx) in userFieldOnFormOptions"
|
:options="userFieldSelectOptions"
|
||||||
:key="idx"
|
:field-names="{ label: 'title', value: 'field' }"
|
||||||
:label="item.title"
|
allow-clear
|
||||||
:value="item.field"
|
/>
|
||||||
:disabled="!item.required"
|
|
||||||
>
|
|
||||||
{{ item.title }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -826,17 +806,12 @@ onMounted(() => {
|
||||||
label="表单内部门字段"
|
label="表单内部门字段"
|
||||||
name="formDept"
|
name="formDept"
|
||||||
>
|
>
|
||||||
<Select v-model:value="configForm.formDept" clearable>
|
<Select
|
||||||
<SelectOption
|
v-model:value="configForm.formDept"
|
||||||
v-for="(item, idx) in deptFieldOnFormOptions"
|
:options="deptFieldSelectOptions"
|
||||||
:key="idx"
|
:field-names="{ label: 'title', value: 'field' }"
|
||||||
:label="item.title"
|
allow-clear
|
||||||
:value="item.field"
|
/>
|
||||||
:disabled="!item.required"
|
|
||||||
>
|
|
||||||
{{ item.title }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -852,16 +827,11 @@ onMounted(() => {
|
||||||
:label="deptLevelLabel!"
|
:label="deptLevelLabel!"
|
||||||
name="deptLevel"
|
name="deptLevel"
|
||||||
>
|
>
|
||||||
<Select v-model:value="configForm.deptLevel" clearable>
|
<Select
|
||||||
<SelectOption
|
v-model:value="configForm.deptLevel"
|
||||||
v-for="(item, index) in MULTI_LEVEL_DEPT"
|
:options="MULTI_LEVEL_DEPT"
|
||||||
:key="index"
|
allow-clear
|
||||||
:label="item.label"
|
/>
|
||||||
:value="item.value"
|
|
||||||
>
|
|
||||||
{{ item.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -943,16 +913,12 @@ onMounted(() => {
|
||||||
label="驳回节点"
|
label="驳回节点"
|
||||||
name="returnNodeId"
|
name="returnNodeId"
|
||||||
>
|
>
|
||||||
<Select v-model:value="configForm.returnNodeId" clearable>
|
<Select
|
||||||
<SelectOption
|
v-model:value="configForm.returnNodeId"
|
||||||
v-for="item in returnTaskList"
|
:options="returnTaskList"
|
||||||
:key="item.id"
|
:field-names="{ label: 'name', value: 'id' }"
|
||||||
:label="item.name"
|
allow-clear
|
||||||
:value="item.id"
|
/>
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -1021,19 +987,11 @@ onMounted(() => {
|
||||||
<Col>
|
<Col>
|
||||||
<Select
|
<Select
|
||||||
v-model:value="timeUnit"
|
v-model:value="timeUnit"
|
||||||
|
:options="TIME_UNIT_TYPES"
|
||||||
class="mr-2"
|
class="mr-2"
|
||||||
:style="{ width: '100px' }"
|
:style="{ width: '100px' }"
|
||||||
@change="timeUnitChange"
|
@change="timeUnitChange"
|
||||||
>
|
/>
|
||||||
<SelectOption
|
|
||||||
v-for="item in TIME_UNIT_TYPES"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
>
|
|
||||||
{{ item.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
<TypographyText class="mr-2 mt-2 inline-flex text-sm">
|
<TypographyText class="mr-2 mt-2 inline-flex text-sm">
|
||||||
未处理
|
未处理
|
||||||
</TypographyText>
|
</TypographyText>
|
||||||
|
|
@ -1087,18 +1045,11 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<Select
|
<Select
|
||||||
v-model:value="configForm.assignEmptyHandlerUserIds"
|
v-model:value="configForm.assignEmptyHandlerUserIds"
|
||||||
clearable
|
:options="userOptions"
|
||||||
|
:field-names="{ label: 'nickname', value: 'id' }"
|
||||||
|
allow-clear
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
>
|
/>
|
||||||
<SelectOption
|
|
||||||
v-for="item in userOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.nickname"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
{{ item.nickname }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<div v-if="currentNode.type === BpmNodeTypeEnum.USER_TASK_NODE">
|
<div v-if="currentNode.type === BpmNodeTypeEnum.USER_TASK_NODE">
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ import {
|
||||||
Radio,
|
Radio,
|
||||||
RadioGroup,
|
RadioGroup,
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
|
||||||
TextArea,
|
TextArea,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
} from 'antdv-next';
|
} from 'antdv-next';
|
||||||
|
|
@ -321,13 +320,14 @@ defineExpose({ validate });
|
||||||
<FormItem label="谁可以发起" name="startUserType">
|
<FormItem label="谁可以发起" name="startUserType">
|
||||||
<Select
|
<Select
|
||||||
v-model:value="modelData.startUserType"
|
v-model:value="modelData.startUserType"
|
||||||
|
:options="[
|
||||||
|
{ label: '全员', value: 0 },
|
||||||
|
{ label: '指定人员', value: 1 },
|
||||||
|
{ label: '指定部门', value: 2 },
|
||||||
|
]"
|
||||||
placeholder="请选择谁可以发起"
|
placeholder="请选择谁可以发起"
|
||||||
@change="handleStartUserTypeChange"
|
@change="handleStartUserTypeChange"
|
||||||
>
|
/>
|
||||||
<SelectOption :value="0">全员</SelectOption>
|
|
||||||
<SelectOption :value="1">指定人员</SelectOption>
|
|
||||||
<SelectOption :value="2">指定部门</SelectOption>
|
|
||||||
</Select>
|
|
||||||
<div
|
<div
|
||||||
v-if="modelData.startUserType === 1"
|
v-if="modelData.startUserType === 1"
|
||||||
class="mt-2 flex flex-wrap gap-1"
|
class="mt-2 flex flex-wrap gap-1"
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ import {
|
||||||
message,
|
message,
|
||||||
Popover,
|
Popover,
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
|
||||||
Space,
|
Space,
|
||||||
TextArea,
|
TextArea,
|
||||||
} from 'antdv-next';
|
} from 'antdv-next';
|
||||||
|
|
@ -1025,16 +1024,9 @@ defineExpose({ loadTodoTask });
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
placeholder="请选择抄送人"
|
placeholder="请选择抄送人"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
>
|
:options="userOptions"
|
||||||
<SelectOption
|
:field-names="{ label: 'nickname', value: 'id' }"
|
||||||
v-for="item in userOptions"
|
/>
|
||||||
:key="item.id"
|
|
||||||
:label="item.nickname"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
{{ item.nickname }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="抄送意见" name="copyReason">
|
<FormItem label="抄送意见" name="copyReason">
|
||||||
<TextArea
|
<TextArea
|
||||||
|
|
@ -1095,16 +1087,9 @@ defineExpose({ loadTodoTask });
|
||||||
v-model:value="transferForm.assigneeUserId"
|
v-model:value="transferForm.assigneeUserId"
|
||||||
:allow-clear="true"
|
:allow-clear="true"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
:options="userOptions"
|
||||||
<SelectOption
|
:field-names="{ label: 'nickname', value: 'id' }"
|
||||||
v-for="item in userOptions"
|
/>
|
||||||
:key="item.id"
|
|
||||||
:label="item.nickname"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
{{ item.nickname }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="审批意见" name="reason">
|
<FormItem label="审批意见" name="reason">
|
||||||
<TextArea
|
<TextArea
|
||||||
|
|
@ -1168,16 +1153,9 @@ defineExpose({ loadTodoTask });
|
||||||
v-model:value="delegateForm.delegateUserId"
|
v-model:value="delegateForm.delegateUserId"
|
||||||
:allow-clear="true"
|
:allow-clear="true"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
:options="userOptions"
|
||||||
<SelectOption
|
:field-names="{ label: 'nickname', value: 'id' }"
|
||||||
v-for="item in userOptions"
|
/>
|
||||||
:key="item.id"
|
|
||||||
:label="item.nickname"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
{{ item.nickname }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="审批意见" name="reason">
|
<FormItem label="审批意见" name="reason">
|
||||||
<TextArea
|
<TextArea
|
||||||
|
|
@ -1242,16 +1220,9 @@ defineExpose({ loadTodoTask });
|
||||||
:allow-clear="true"
|
:allow-clear="true"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
:options="userOptions"
|
||||||
<SelectOption
|
:field-names="{ label: 'nickname', value: 'id' }"
|
||||||
v-for="item in userOptions"
|
/>
|
||||||
:key="item.id"
|
|
||||||
:label="item.nickname"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
{{ item.nickname }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="审批意见" name="reason">
|
<FormItem label="审批意见" name="reason">
|
||||||
<TextArea
|
<TextArea
|
||||||
|
|
@ -1319,18 +1290,15 @@ defineExpose({ loadTodoTask });
|
||||||
<FormItem label="减签人员" name="deleteSignTaskId">
|
<FormItem label="减签人员" name="deleteSignTaskId">
|
||||||
<Select
|
<Select
|
||||||
v-model:value="deleteSignForm.deleteSignTaskId"
|
v-model:value="deleteSignForm.deleteSignTaskId"
|
||||||
|
:options="
|
||||||
|
(runningTask.children as any[]).map((item) => ({
|
||||||
|
label: getDeleteSignUserLabel(item),
|
||||||
|
value: item.id,
|
||||||
|
}))
|
||||||
|
"
|
||||||
:allow-clear="true"
|
:allow-clear="true"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
/>
|
||||||
<SelectOption
|
|
||||||
v-for="item in runningTask.children"
|
|
||||||
:key="item.id"
|
|
||||||
:label="getDeleteSignUserLabel(item)"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
{{ getDeleteSignUserLabel(item) }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="审批意见" name="reason">
|
<FormItem label="审批意见" name="reason">
|
||||||
<TextArea
|
<TextArea
|
||||||
|
|
@ -1392,16 +1360,9 @@ defineExpose({ loadTodoTask });
|
||||||
v-model:value="returnForm.targetTaskDefinitionKey"
|
v-model:value="returnForm.targetTaskDefinitionKey"
|
||||||
:allow-clear="true"
|
:allow-clear="true"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
:options="returnList"
|
||||||
<SelectOption
|
:field-names="{ label: 'name', value: 'taskDefinitionKey' }"
|
||||||
v-for="item in returnList"
|
/>
|
||||||
:key="item.taskDefinitionKey"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.taskDefinitionKey"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="退回理由" name="returnReason">
|
<FormItem label="退回理由" name="returnReason">
|
||||||
<TextArea
|
<TextArea
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import type { SystemDictTypeApi } from '#/api/system/dict/type';
|
||||||
|
|
||||||
import { nextTick, onMounted, ref, watch } from 'vue';
|
import { nextTick, onMounted, ref, watch } from 'vue';
|
||||||
|
|
||||||
import { Checkbox, Input, Select, SelectOption } from 'antdv-next';
|
import { Checkbox, Input, Select } from 'antdv-next';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import { getSimpleDictTypeList } from '#/api/system/dict/type';
|
import { getSimpleDictTypeList } from '#/api/system/dict/type';
|
||||||
|
|
@ -90,15 +90,11 @@ function filterDictTypeOption(input: string, option: any) {
|
||||||
|
|
||||||
<!-- Java 类型 -->
|
<!-- Java 类型 -->
|
||||||
<template #javaType="{ row, column }">
|
<template #javaType="{ row, column }">
|
||||||
<Select v-model:value="row.javaType" style="width: 100%">
|
<Select
|
||||||
<SelectOption
|
v-model:value="row.javaType"
|
||||||
v-for="option in column.params.options"
|
style="width: 100%"
|
||||||
:key="option.value"
|
:options="column.params.options"
|
||||||
:value="option.value"
|
/>
|
||||||
>
|
|
||||||
{{ option.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</template>
|
</template>
|
||||||
<!-- Java 属性 -->
|
<!-- Java 属性 -->
|
||||||
<template #javaField="{ row }">
|
<template #javaField="{ row }">
|
||||||
|
|
@ -124,15 +120,11 @@ function filterDictTypeOption(input: string, option: any) {
|
||||||
|
|
||||||
<!-- 查询方式 -->
|
<!-- 查询方式 -->
|
||||||
<template #listOperationCondition="{ row, column }">
|
<template #listOperationCondition="{ row, column }">
|
||||||
<Select v-model:value="row.listOperationCondition" class="w-full">
|
<Select
|
||||||
<SelectOption
|
v-model:value="row.listOperationCondition"
|
||||||
v-for="option in column.params.options"
|
class="w-full"
|
||||||
:key="option.value"
|
:options="column.params.options"
|
||||||
:value="option.value"
|
/>
|
||||||
>
|
|
||||||
{{ option.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 允许空 -->
|
<!-- 允许空 -->
|
||||||
|
|
@ -142,15 +134,11 @@ function filterDictTypeOption(input: string, option: any) {
|
||||||
|
|
||||||
<!-- 显示类型 -->
|
<!-- 显示类型 -->
|
||||||
<template #htmlType="{ row, column }">
|
<template #htmlType="{ row, column }">
|
||||||
<Select v-model:value="row.htmlType" class="w-full">
|
<Select
|
||||||
<SelectOption
|
v-model:value="row.htmlType"
|
||||||
v-for="option in column.params.options"
|
class="w-full"
|
||||||
:key="option.value"
|
:options="column.params.options"
|
||||||
:value="option.value"
|
/>
|
||||||
>
|
|
||||||
{{ option.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 字典类型 -->
|
<!-- 字典类型 -->
|
||||||
|
|
@ -161,15 +149,9 @@ function filterDictTypeOption(input: string, option: any) {
|
||||||
allow-clear
|
allow-clear
|
||||||
show-search
|
show-search
|
||||||
:filter-option="filterDictTypeOption"
|
:filter-option="filterDictTypeOption"
|
||||||
>
|
:options="dictTypeOptions"
|
||||||
<SelectOption
|
:field-names="{ label: 'name', value: 'type' }"
|
||||||
v-for="option in dictTypeOptions"
|
/>
|
||||||
:key="option.type"
|
|
||||||
:value="option.type"
|
|
||||||
>
|
|
||||||
{{ option.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 示例 -->
|
<!-- 示例 -->
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ import {
|
||||||
Pagination,
|
Pagination,
|
||||||
DateRangePicker as RangePicker,
|
DateRangePicker as RangePicker,
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
|
||||||
} from 'antdv-next';
|
} from 'antdv-next';
|
||||||
|
|
||||||
import { VxeColumn, VxeTable } from '#/adapter/vxe-table';
|
import { VxeColumn, VxeTable } from '#/adapter/vxe-table';
|
||||||
|
|
@ -182,18 +181,12 @@ onMounted(() => {
|
||||||
placeholder="请选择性别"
|
placeholder="请选择性别"
|
||||||
allow-clear
|
allow-clear
|
||||||
class="w-full"
|
class="w-full"
|
||||||
>
|
:options="[
|
||||||
<SelectOption
|
...getDictOptions(DICT_TYPE.SYSTEM_USER_SEX, 'number').map(
|
||||||
v-for="dict in getDictOptions(
|
(dict) => ({ label: dict.label, value: dict.value as any }),
|
||||||
DICT_TYPE.SYSTEM_USER_SEX,
|
),
|
||||||
'number',
|
]"
|
||||||
)"
|
/>
|
||||||
:key="dict.value"
|
|
||||||
:value="dict.value"
|
|
||||||
>
|
|
||||||
{{ dict.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="创建时间" name="createTime">
|
<FormItem label="创建时间" name="createTime">
|
||||||
<RangePicker
|
<RangePicker
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ import {
|
||||||
Pagination,
|
Pagination,
|
||||||
DateRangePicker as RangePicker,
|
DateRangePicker as RangePicker,
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
|
||||||
Tabs,
|
Tabs,
|
||||||
} from 'antdv-next';
|
} from 'antdv-next';
|
||||||
|
|
||||||
|
|
@ -193,18 +192,12 @@ onMounted(() => {
|
||||||
placeholder="请选择性别"
|
placeholder="请选择性别"
|
||||||
allow-clear
|
allow-clear
|
||||||
class="w-full"
|
class="w-full"
|
||||||
>
|
:options="[
|
||||||
<SelectOption
|
...getDictOptions(DICT_TYPE.SYSTEM_USER_SEX, 'number').map(
|
||||||
v-for="dict in getDictOptions(
|
(dict) => ({ label: dict.label, value: dict.value as any }),
|
||||||
DICT_TYPE.SYSTEM_USER_SEX,
|
),
|
||||||
'number',
|
]"
|
||||||
)"
|
/>
|
||||||
:key="dict.value"
|
|
||||||
:value="dict.value"
|
|
||||||
>
|
|
||||||
{{ dict.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="创建时间" name="createTime">
|
<FormItem label="创建时间" name="createTime">
|
||||||
<RangePicker
|
<RangePicker
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ import {
|
||||||
Pagination,
|
Pagination,
|
||||||
DateRangePicker as RangePicker,
|
DateRangePicker as RangePicker,
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
|
||||||
Tabs,
|
Tabs,
|
||||||
} from 'antdv-next';
|
} from 'antdv-next';
|
||||||
|
|
||||||
|
|
@ -186,18 +185,12 @@ onMounted(() => {
|
||||||
placeholder="请选择性别"
|
placeholder="请选择性别"
|
||||||
allow-clear
|
allow-clear
|
||||||
class="w-full"
|
class="w-full"
|
||||||
>
|
:options="[
|
||||||
<SelectOption
|
...getDictOptions(DICT_TYPE.SYSTEM_USER_SEX, 'number').map(
|
||||||
v-for="dict in getDictOptions(
|
(dict) => ({ label: dict.label, value: dict.value as any }),
|
||||||
DICT_TYPE.SYSTEM_USER_SEX,
|
),
|
||||||
'number',
|
]"
|
||||||
)"
|
/>
|
||||||
:key="dict.value"
|
|
||||||
:value="dict.value"
|
|
||||||
>
|
|
||||||
{{ dict.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="创建时间" name="createTime">
|
<FormItem label="创建时间" name="createTime">
|
||||||
<RangePicker
|
<RangePicker
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ import {
|
||||||
Pagination,
|
Pagination,
|
||||||
DateRangePicker as RangePicker,
|
DateRangePicker as RangePicker,
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
|
||||||
} from 'antdv-next';
|
} from 'antdv-next';
|
||||||
|
|
||||||
import { VxeColumn, VxeTable } from '#/adapter/vxe-table';
|
import { VxeColumn, VxeTable } from '#/adapter/vxe-table';
|
||||||
|
|
@ -183,18 +182,12 @@ onMounted(() => {
|
||||||
placeholder="请选择性别"
|
placeholder="请选择性别"
|
||||||
allow-clear
|
allow-clear
|
||||||
class="w-full"
|
class="w-full"
|
||||||
>
|
:options="[
|
||||||
<SelectOption
|
...getDictOptions(DICT_TYPE.SYSTEM_USER_SEX, 'number').map(
|
||||||
v-for="dict in getDictOptions(
|
(dict) => ({ label: dict.label, value: dict.value as any }),
|
||||||
DICT_TYPE.SYSTEM_USER_SEX,
|
),
|
||||||
'number',
|
]"
|
||||||
)"
|
/>
|
||||||
:key="dict.value"
|
|
||||||
:value="dict.value"
|
|
||||||
>
|
|
||||||
{{ dict.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="创建时间" name="createTime">
|
<FormItem label="创建时间" name="createTime">
|
||||||
<RangePicker
|
<RangePicker
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import { DICT_TYPE, IotDeviceMessageMethodEnum } from '@vben/constants';
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
import { formatDateTime } from '@vben/utils';
|
import { formatDateTime } from '@vben/utils';
|
||||||
|
|
||||||
import { Button, Select, SelectOption, Space, Switch, Tag } from 'antdv-next';
|
import { Button, Select, Space, Switch, Tag } from 'antdv-next';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import { getDeviceMessagePage } from '#/api/iot/device/device';
|
import { getDeviceMessagePage } from '#/api/iot/device/device';
|
||||||
|
|
@ -195,25 +195,18 @@ defineExpose({
|
||||||
allow-clear
|
allow-clear
|
||||||
placeholder="所有方法"
|
placeholder="所有方法"
|
||||||
style="width: 160px"
|
style="width: 160px"
|
||||||
>
|
:options="methodOptions"
|
||||||
<SelectOption
|
/>
|
||||||
v-for="item in methodOptions"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
>
|
|
||||||
{{ item.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
<Select
|
<Select
|
||||||
v-model:value="queryParams.upstream"
|
v-model:value="queryParams.upstream"
|
||||||
allow-clear
|
allow-clear
|
||||||
placeholder="上行/下行"
|
placeholder="上行/下行"
|
||||||
style="width: 160px"
|
style="width: 160px"
|
||||||
>
|
:options="[
|
||||||
<SelectOption label="上行" value="true">上行</SelectOption>
|
{ label: '上行', value: 'true' },
|
||||||
<SelectOption label="下行" value="false">下行</SelectOption>
|
{ label: '下行', value: 'false' },
|
||||||
</Select>
|
]"
|
||||||
|
/>
|
||||||
<Space>
|
<Space>
|
||||||
<Button type="primary" @click="handleQuery">
|
<Button type="primary" @click="handleQuery">
|
||||||
<IconifyIcon icon="ep:search" class="mr-[5px]" /> 搜索
|
<IconifyIcon icon="ep:search" class="mr-[5px]" /> 搜索
|
||||||
|
|
|
||||||
|
|
@ -14,14 +14,7 @@ import {
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
import { formatDateTime } from '@vben/utils';
|
import { formatDateTime } from '@vben/utils';
|
||||||
|
|
||||||
import {
|
import { Button, DateRangePicker, Select, Space, Tag } from 'antdv-next';
|
||||||
Button,
|
|
||||||
DateRangePicker,
|
|
||||||
Select,
|
|
||||||
SelectOption,
|
|
||||||
Space,
|
|
||||||
Tag,
|
|
||||||
} from 'antdv-next';
|
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import { getDeviceMessagePairPage } from '#/api/iot/device/device';
|
import { getDeviceMessagePairPage } from '#/api/iot/device/device';
|
||||||
|
|
@ -217,15 +210,13 @@ defineExpose({
|
||||||
allow-clear
|
allow-clear
|
||||||
placeholder="请选择事件标识符"
|
placeholder="请选择事件标识符"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
>
|
:options="[
|
||||||
<SelectOption
|
...eventThingModels.map((event) => ({
|
||||||
v-for="event in eventThingModels"
|
label: `${event.name}(${event.identifier})`,
|
||||||
:key="event.identifier"
|
value: event.identifier!,
|
||||||
:value="event.identifier!"
|
})),
|
||||||
>
|
]"
|
||||||
{{ event.name }}({{ event.identifier }})
|
/>
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<span>时间范围:</span>
|
<span>时间范围:</span>
|
||||||
|
|
|
||||||
|
|
@ -14,14 +14,7 @@ import {
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
import { formatDateTime } from '@vben/utils';
|
import { formatDateTime } from '@vben/utils';
|
||||||
|
|
||||||
import {
|
import { Button, DateRangePicker, Select, Space, Tag } from 'antdv-next';
|
||||||
Button,
|
|
||||||
DateRangePicker,
|
|
||||||
Select,
|
|
||||||
SelectOption,
|
|
||||||
Space,
|
|
||||||
Tag,
|
|
||||||
} from 'antdv-next';
|
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import { getDeviceMessagePairPage } from '#/api/iot/device/device';
|
import { getDeviceMessagePairPage } from '#/api/iot/device/device';
|
||||||
|
|
@ -231,15 +224,13 @@ defineExpose({
|
||||||
allow-clear
|
allow-clear
|
||||||
placeholder="请选择服务标识符"
|
placeholder="请选择服务标识符"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
>
|
:options="[
|
||||||
<SelectOption
|
...serviceThingModels.map((service) => ({
|
||||||
v-for="service in serviceThingModels"
|
label: `${service.name}(${service.identifier})`,
|
||||||
:key="service.identifier"
|
value: service.identifier!,
|
||||||
:value="service.identifier!"
|
})),
|
||||||
>
|
]"
|
||||||
{{ service.name }}({{ service.identifier }})
|
/>
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<span>时间范围:</span>
|
<span>时间范围:</span>
|
||||||
|
|
|
||||||
|
|
@ -15,16 +15,7 @@ import { getDictOptions } from '@vben/hooks';
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
import { downloadFileFromBlobPart, isEmpty } from '@vben/utils';
|
import { downloadFileFromBlobPart, isEmpty } from '@vben/utils';
|
||||||
|
|
||||||
import {
|
import { Button, Card, Input, message, Select, Space, Tag } from 'antdv-next';
|
||||||
Button,
|
|
||||||
Card,
|
|
||||||
Input,
|
|
||||||
message,
|
|
||||||
Select,
|
|
||||||
SelectOption,
|
|
||||||
Space,
|
|
||||||
Tag,
|
|
||||||
} from 'antdv-next';
|
|
||||||
|
|
||||||
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
|
|
@ -292,15 +283,9 @@ onMounted(async () => {
|
||||||
placeholder="请选择产品"
|
placeholder="请选择产品"
|
||||||
allow-clear
|
allow-clear
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
>
|
:options="products"
|
||||||
<SelectOption
|
:field-names="{ label: 'name', value: 'id' }"
|
||||||
v-for="product in products"
|
/>
|
||||||
:key="product.id"
|
|
||||||
:value="product.id"
|
|
||||||
>
|
|
||||||
{{ product.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
<Input
|
<Input
|
||||||
v-model:value="queryParams.deviceName"
|
v-model:value="queryParams.deviceName"
|
||||||
placeholder="请输入 DeviceName"
|
placeholder="请输入 DeviceName"
|
||||||
|
|
@ -317,49 +302,34 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
<Select
|
<Select
|
||||||
v-model:value="queryParams.deviceType"
|
v-model:value="queryParams.deviceType"
|
||||||
|
:options="
|
||||||
|
getDictOptions(DICT_TYPE.IOT_PRODUCT_DEVICE_TYPE, 'number').map(
|
||||||
|
(dict) => ({ label: dict.label, value: dict.value as any }),
|
||||||
|
)
|
||||||
|
"
|
||||||
placeholder="请选择设备类型"
|
placeholder="请选择设备类型"
|
||||||
allow-clear
|
allow-clear
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
>
|
/>
|
||||||
<SelectOption
|
|
||||||
v-for="dict in getDictOptions(
|
|
||||||
DICT_TYPE.IOT_PRODUCT_DEVICE_TYPE,
|
|
||||||
'number',
|
|
||||||
)"
|
|
||||||
:key="dict.value"
|
|
||||||
:value="dict.value"
|
|
||||||
>
|
|
||||||
{{ dict.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
<Select
|
<Select
|
||||||
v-model:value="queryParams.status"
|
v-model:value="queryParams.status"
|
||||||
placeholder="请选择设备状态"
|
placeholder="请选择设备状态"
|
||||||
allow-clear
|
allow-clear
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
>
|
:options="
|
||||||
<SelectOption
|
getDictOptions(DICT_TYPE.IOT_DEVICE_STATE, 'number').map(
|
||||||
v-for="dict in getDictOptions(DICT_TYPE.IOT_DEVICE_STATE, 'number')"
|
(dict) => ({ label: dict.label, value: dict.value as any }),
|
||||||
:key="dict.value"
|
)
|
||||||
:value="dict.value"
|
"
|
||||||
>
|
/>
|
||||||
{{ dict.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
<Select
|
<Select
|
||||||
v-model:value="queryParams.groupId"
|
v-model:value="queryParams.groupId"
|
||||||
placeholder="请选择设备分组"
|
placeholder="请选择设备分组"
|
||||||
allow-clear
|
allow-clear
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
>
|
:options="deviceGroups"
|
||||||
<SelectOption
|
:field-names="{ label: 'name', value: 'id' }"
|
||||||
v-for="group in deviceGroups"
|
/>
|
||||||
:key="group.id"
|
|
||||||
:value="group.id"
|
|
||||||
>
|
|
||||||
{{ group.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
<Button type="primary" @click="handleSearch">
|
<Button type="primary" @click="handleSearch">
|
||||||
<IconifyIcon icon="ant-design:search-outlined" class="mr-1" />
|
<IconifyIcon icon="ant-design:search-outlined" class="mr-1" />
|
||||||
{{ $t('common.search') }}
|
{{ $t('common.search') }}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { computed, onMounted, ref, watch } from 'vue';
|
||||||
import { isEmpty } from '@vben/utils';
|
import { isEmpty } from '@vben/utils';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
import { FormItem, Input, Select, SelectOption, TextArea } from 'antdv-next';
|
import { FormItem, Input, Select, TextArea } from 'antdv-next';
|
||||||
|
|
||||||
import { IotDataSinkTypeEnum } from '#/api/iot/rule/data/sink';
|
import { IotDataSinkTypeEnum } from '#/api/iot/rule/data/sink';
|
||||||
|
|
||||||
|
|
@ -67,10 +67,14 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<Input v-model:value="urlPath" placeholder="请输入请求地址">
|
<Input v-model:value="urlPath" placeholder="请输入请求地址">
|
||||||
<template #addonBefore>
|
<template #addonBefore>
|
||||||
<Select v-model:value="urlPrefix" class="w-[100px]">
|
<Select
|
||||||
<SelectOption value="http://">http://</SelectOption>
|
v-model:value="urlPrefix"
|
||||||
<SelectOption value="https://">https://</SelectOption>
|
class="w-[100px]"
|
||||||
</Select>
|
:options="[
|
||||||
|
{ label: 'http://', value: 'http://' },
|
||||||
|
{ label: 'https://', value: 'https://' },
|
||||||
|
]"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</Input>
|
</Input>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -81,12 +85,16 @@ onMounted(() => {
|
||||||
]"
|
]"
|
||||||
label="请求方法"
|
label="请求方法"
|
||||||
>
|
>
|
||||||
<Select v-model:value="config.method" placeholder="请选择请求方法">
|
<Select
|
||||||
<SelectOption value="GET">GET</SelectOption>
|
v-model:value="config.method"
|
||||||
<SelectOption value="POST">POST</SelectOption>
|
placeholder="请选择请求方法"
|
||||||
<SelectOption value="PUT">PUT</SelectOption>
|
:options="[
|
||||||
<SelectOption value="DELETE">DELETE</SelectOption>
|
{ label: 'GET', value: 'GET' },
|
||||||
</Select>
|
{ label: 'POST', value: 'POST' },
|
||||||
|
{ label: 'PUT', value: 'PUT' },
|
||||||
|
{ label: 'DELETE', value: 'DELETE' },
|
||||||
|
]"
|
||||||
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="请求头">
|
<FormItem label="请求头">
|
||||||
<KeyValueEditor v-model="config.headers" add-button-text="添加请求头" />
|
<KeyValueEditor v-model="config.headers" add-button-text="添加请求头" />
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,7 @@ import { onMounted } from 'vue';
|
||||||
import { isEmpty } from '@vben/utils';
|
import { isEmpty } from '@vben/utils';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
import {
|
import { FormItem, Input, InputNumber, Select, Switch } from 'antdv-next';
|
||||||
FormItem,
|
|
||||||
Input,
|
|
||||||
InputNumber,
|
|
||||||
Select,
|
|
||||||
SelectOption,
|
|
||||||
Switch,
|
|
||||||
} from 'antdv-next';
|
|
||||||
|
|
||||||
import { IotDataSinkTypeEnum } from '#/api/iot/rule/data/sink';
|
import { IotDataSinkTypeEnum } from '#/api/iot/rule/data/sink';
|
||||||
|
|
||||||
|
|
@ -120,10 +113,14 @@ onMounted(() => {
|
||||||
]"
|
]"
|
||||||
label="数据格式"
|
label="数据格式"
|
||||||
>
|
>
|
||||||
<Select v-model:value="config.dataFormat" placeholder="请选择数据格式">
|
<Select
|
||||||
<SelectOption value="JSON">JSON</SelectOption>
|
v-model:value="config.dataFormat"
|
||||||
<SelectOption value="BINARY">BINARY</SelectOption>
|
placeholder="请选择数据格式"
|
||||||
</Select>
|
:options="[
|
||||||
|
{ label: 'JSON', value: 'JSON' },
|
||||||
|
{ label: 'BINARY', value: 'BINARY' },
|
||||||
|
]"
|
||||||
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem :name="['config', 'heartbeatIntervalMs']" label="心跳间隔(ms)">
|
<FormItem :name="['config', 'heartbeatIntervalMs']" label="心跳间隔(ms)">
|
||||||
<InputNumber
|
<InputNumber
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import {
|
||||||
Input,
|
Input,
|
||||||
InputNumber,
|
InputNumber,
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
|
||||||
Switch,
|
Switch,
|
||||||
TextArea,
|
TextArea,
|
||||||
} from 'antdv-next';
|
} from 'antdv-next';
|
||||||
|
|
@ -127,10 +126,14 @@ onMounted(() => {
|
||||||
]"
|
]"
|
||||||
label="数据格式"
|
label="数据格式"
|
||||||
>
|
>
|
||||||
<Select v-model:value="config.dataFormat" placeholder="请选择数据格式">
|
<Select
|
||||||
<SelectOption value="JSON">JSON</SelectOption>
|
v-model:value="config.dataFormat"
|
||||||
<SelectOption value="TEXT">TEXT</SelectOption>
|
placeholder="请选择数据格式"
|
||||||
</Select>
|
:options="[
|
||||||
|
{ label: 'JSON', value: 'JSON' },
|
||||||
|
{ label: 'TEXT', value: 'TEXT' },
|
||||||
|
]"
|
||||||
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem :name="['config', 'reconnectIntervalMs']" label="重连间隔(ms)">
|
<FormItem :name="['config', 'reconnectIntervalMs']" label="重连间隔(ms)">
|
||||||
<InputNumber
|
<InputNumber
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
import { FormItem, Select, SelectOption } from 'antdv-next';
|
import { FormItem, Select } from 'antdv-next';
|
||||||
|
|
||||||
import { getSimpleAlertConfigList } from '#/api/iot/alert/config';
|
import { getSimpleAlertConfigList } from '#/api/iot/alert/config';
|
||||||
|
|
||||||
|
|
@ -49,20 +49,15 @@ onMounted(() => {
|
||||||
<FormItem label="告警配置" required>
|
<FormItem label="告警配置" required>
|
||||||
<Select
|
<Select
|
||||||
v-model:value="localValue"
|
v-model:value="localValue"
|
||||||
|
:options="alertConfigs"
|
||||||
|
:field-names="{ label: 'name', value: 'id' }"
|
||||||
placeholder="请选择告警配置"
|
placeholder="请选择告警配置"
|
||||||
show-search
|
show-search
|
||||||
allow-clear
|
allow-clear
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
>
|
/>
|
||||||
<SelectOption
|
|
||||||
v-for="config in alertConfigs"
|
|
||||||
:key="config.id"
|
|
||||||
:label="config.name"
|
|
||||||
:value="config.id"
|
|
||||||
/>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import {
|
||||||
} from '@vben/constants';
|
} from '@vben/constants';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
import { Col, FormItem, Row, Select, SelectOption } from 'antdv-next';
|
import { Col, FormItem, Row, Select } from 'antdv-next';
|
||||||
|
|
||||||
import ValueInput from '../inputs/value-input.vue';
|
import ValueInput from '../inputs/value-input.vue';
|
||||||
import DeviceSelector from '../selectors/device-selector.vue';
|
import DeviceSelector from '../selectors/device-selector.vue';
|
||||||
|
|
@ -163,6 +163,7 @@ function handleOperatorChange() {
|
||||||
<FormItem label="条件类型" required>
|
<FormItem label="条件类型" required>
|
||||||
<Select
|
<Select
|
||||||
:value="condition.type"
|
:value="condition.type"
|
||||||
|
:options="getConditionTypeOptions()"
|
||||||
@change="
|
@change="
|
||||||
(value: any) => {
|
(value: any) => {
|
||||||
updateConditionField('type', value);
|
updateConditionField('type', value);
|
||||||
|
|
@ -171,15 +172,7 @@ function handleOperatorChange() {
|
||||||
"
|
"
|
||||||
placeholder="请选择条件类型"
|
placeholder="请选择条件类型"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
>
|
/>
|
||||||
<SelectOption
|
|
||||||
v-for="option in getConditionTypeOptions()"
|
|
||||||
:key="option.value"
|
|
||||||
:value="option.value"
|
|
||||||
>
|
|
||||||
{{ option.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
@ -225,18 +218,11 @@ function handleOperatorChange() {
|
||||||
<FormItem label="操作符" required>
|
<FormItem label="操作符" required>
|
||||||
<Select
|
<Select
|
||||||
:value="condition.operator"
|
:value="condition.operator"
|
||||||
|
:options="statusOperatorOptions"
|
||||||
@change="(value: any) => updateConditionField('operator', value)"
|
@change="(value: any) => updateConditionField('operator', value)"
|
||||||
placeholder="请选择操作符"
|
placeholder="请选择操作符"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
>
|
/>
|
||||||
<SelectOption
|
|
||||||
v-for="option in statusOperatorOptions"
|
|
||||||
:key="option.value"
|
|
||||||
:value="option.value"
|
|
||||||
>
|
|
||||||
{{ option.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
|
|
@ -245,18 +231,11 @@ function handleOperatorChange() {
|
||||||
<FormItem label="设备状态" required>
|
<FormItem label="设备状态" required>
|
||||||
<Select
|
<Select
|
||||||
:value="condition.param"
|
:value="condition.param"
|
||||||
|
:options="deviceStatusOptions"
|
||||||
@change="(value: any) => updateConditionField('param', value)"
|
@change="(value: any) => updateConditionField('param', value)"
|
||||||
placeholder="请选择设备状态"
|
placeholder="请选择设备状态"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
>
|
/>
|
||||||
<SelectOption
|
|
||||||
v-for="option in deviceStatusOptions"
|
|
||||||
:key="option.value"
|
|
||||||
:value="option.value"
|
|
||||||
>
|
|
||||||
{{ option.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import {
|
||||||
} from '@vben/constants';
|
} from '@vben/constants';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
import { Col, FormItem, Input, Row, Select, SelectOption } from 'antdv-next';
|
import { Col, FormItem, Input, Row, Select } from 'antdv-next';
|
||||||
|
|
||||||
import JsonParamsInput from '../inputs/json-params-input.vue';
|
import JsonParamsInput from '../inputs/json-params-input.vue';
|
||||||
import ValueInput from '../inputs/value-input.vue';
|
import ValueInput from '../inputs/value-input.vue';
|
||||||
|
|
@ -171,18 +171,11 @@ function handlePropertyChange(propertyInfo: any) {
|
||||||
<FormItem label="触发事件类型" required>
|
<FormItem label="触发事件类型" required>
|
||||||
<Select
|
<Select
|
||||||
:value="triggerType"
|
:value="triggerType"
|
||||||
|
:options="triggerTypeOptions"
|
||||||
@change="(value: any) => handleTriggerTypeChange(value)"
|
@change="(value: any) => handleTriggerTypeChange(value)"
|
||||||
placeholder="请选择触发事件类型"
|
placeholder="请选择触发事件类型"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
>
|
/>
|
||||||
<SelectOption
|
|
||||||
v-for="option in triggerTypeOptions"
|
|
||||||
:key="option.value"
|
|
||||||
:value="option.value"
|
|
||||||
>
|
|
||||||
{{ option.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<!-- 设备属性条件配置 -->
|
<!-- 设备属性条件配置 -->
|
||||||
|
|
@ -317,38 +310,31 @@ function handlePropertyChange(propertyInfo: any) {
|
||||||
<FormItem label="操作符" required>
|
<FormItem label="操作符" required>
|
||||||
<Select
|
<Select
|
||||||
:value="condition.operator"
|
:value="condition.operator"
|
||||||
|
:options="[
|
||||||
|
{
|
||||||
|
label:
|
||||||
|
IotRuleSceneTriggerConditionParameterOperatorEnum.EQUALS
|
||||||
|
.name,
|
||||||
|
value:
|
||||||
|
IotRuleSceneTriggerConditionParameterOperatorEnum.EQUALS
|
||||||
|
.value,
|
||||||
|
},
|
||||||
|
]"
|
||||||
@change="(value: any) => updateConditionField('operator', value)"
|
@change="(value: any) => updateConditionField('operator', value)"
|
||||||
placeholder="请选择操作符"
|
placeholder="请选择操作符"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
>
|
/>
|
||||||
<SelectOption
|
|
||||||
:value="
|
|
||||||
IotRuleSceneTriggerConditionParameterOperatorEnum.EQUALS.value
|
|
||||||
"
|
|
||||||
>
|
|
||||||
{{
|
|
||||||
IotRuleSceneTriggerConditionParameterOperatorEnum.EQUALS.name
|
|
||||||
}}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Col>
|
</Col>
|
||||||
<Col :span="6">
|
<Col :span="6">
|
||||||
<FormItem label="参数" required>
|
<FormItem label="参数" required>
|
||||||
<Select
|
<Select
|
||||||
:value="condition.value"
|
:value="condition.value"
|
||||||
|
:options="deviceStatusChangeOptions"
|
||||||
@change="(value: any) => updateConditionField('value', value)"
|
@change="(value: any) => updateConditionField('value', value)"
|
||||||
placeholder="请选择操作符"
|
placeholder="请选择操作符"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
>
|
/>
|
||||||
<SelectOption
|
|
||||||
v-for="option in deviceStatusChangeOptions"
|
|
||||||
:key="option.value"
|
|
||||||
:value="option.value"
|
|
||||||
>
|
|
||||||
{{ option.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ import {
|
||||||
Input,
|
Input,
|
||||||
InputNumber,
|
InputNumber,
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
|
||||||
Tag,
|
Tag,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
} from 'antdv-next';
|
} from 'antdv-next';
|
||||||
|
|
@ -209,10 +208,11 @@ watch(
|
||||||
v-model:value="localValue"
|
v-model:value="localValue"
|
||||||
placeholder="请选择布尔值"
|
placeholder="请选择布尔值"
|
||||||
class="w-full!"
|
class="w-full!"
|
||||||
>
|
:options="[
|
||||||
<SelectOption value="true">真 (true)</SelectOption>
|
{ label: '真 (true)', value: 'true' },
|
||||||
<SelectOption value="false">假 (false)</SelectOption>
|
{ label: '假 (false)', value: 'false' },
|
||||||
</Select>
|
]"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- 枚举值选择 -->
|
<!-- 枚举值选择 -->
|
||||||
<Select
|
<Select
|
||||||
|
|
@ -220,17 +220,10 @@ watch(
|
||||||
propertyType === IoTDataSpecsDataTypeEnum.ENUM && enumOptions.length > 0
|
propertyType === IoTDataSpecsDataTypeEnum.ENUM && enumOptions.length > 0
|
||||||
"
|
"
|
||||||
v-model:value="localValue"
|
v-model:value="localValue"
|
||||||
|
:options="enumOptions"
|
||||||
placeholder="请选择枚举值"
|
placeholder="请选择枚举值"
|
||||||
class="w-full!"
|
class="w-full!"
|
||||||
>
|
/>
|
||||||
<SelectOption
|
|
||||||
v-for="option in enumOptions"
|
|
||||||
:key="option.value"
|
|
||||||
:value="option.value"
|
|
||||||
>
|
|
||||||
{{ option.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
|
|
||||||
<!-- 范围输入 (between 操作符) -->
|
<!-- 范围输入 (between 操作符) -->
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -11,15 +11,7 @@ import { IconifyIcon } from '@vben/icons';
|
||||||
import { getStableObjectKey } from '@vben/utils';
|
import { getStableObjectKey } from '@vben/utils';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
import {
|
import { Button, Card, Empty, FormItem, Select, Tag } from 'antdv-next';
|
||||||
Button,
|
|
||||||
Card,
|
|
||||||
Empty,
|
|
||||||
FormItem,
|
|
||||||
Select,
|
|
||||||
SelectOption,
|
|
||||||
Tag,
|
|
||||||
} from 'antdv-next';
|
|
||||||
|
|
||||||
import AlertConfig from '../configs/alert-config.vue';
|
import AlertConfig from '../configs/alert-config.vue';
|
||||||
import DeviceControlConfig from '../configs/device-control-config.vue';
|
import DeviceControlConfig from '../configs/device-control-config.vue';
|
||||||
|
|
@ -239,18 +231,11 @@ function onActionTypeChange(action: RuleSceneApi.Action, type: number) {
|
||||||
<FormItem label="执行类型" required>
|
<FormItem label="执行类型" required>
|
||||||
<Select
|
<Select
|
||||||
:value="action.type"
|
:value="action.type"
|
||||||
|
:options="getActionTypeOptions()"
|
||||||
@change="(value) => updateActionType(index, value as number)"
|
@change="(value) => updateActionType(index, value as number)"
|
||||||
placeholder="请选择执行类型"
|
placeholder="请选择执行类型"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
>
|
/>
|
||||||
<SelectOption
|
|
||||||
v-for="option in getActionTypeOptions()"
|
|
||||||
:key="option.value"
|
|
||||||
:value="option.value"
|
|
||||||
>
|
|
||||||
{{ option.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import { DICT_TYPE } from '@vben/constants';
|
||||||
import { getDictOptions } from '@vben/hooks';
|
import { getDictOptions } from '@vben/hooks';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
import { FormItem, Input, Select, SelectOption } from 'antdv-next';
|
import { FormItem, Input, Select } from 'antdv-next';
|
||||||
|
|
||||||
const props = defineProps<{ modelValue: any }>();
|
const props = defineProps<{ modelValue: any }>();
|
||||||
const emits = defineEmits(['update:modelValue']);
|
const emits = defineEmits(['update:modelValue']);
|
||||||
|
|
@ -126,15 +126,13 @@ function validateStep(_rule: any, _value: any) {
|
||||||
placeholder="请选择单位"
|
placeholder="请选择单位"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
@change="unitChange"
|
@change="unitChange"
|
||||||
>
|
:options="[
|
||||||
<SelectOption
|
...unitOptions.map((item) => ({
|
||||||
v-for="(item, index) in unitOptions"
|
label: `{{ \`${item.label}-${item.value}\` }}`,
|
||||||
:key="index"
|
value: `${item.label}-${item.value}`,
|
||||||
:value="`${item.label}-${item.value}`"
|
})),
|
||||||
>
|
]"
|
||||||
{{ `${item.label}-${item.value}` }}
|
/>
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,14 +14,7 @@ import {
|
||||||
import { isEmpty } from '@vben/utils';
|
import { isEmpty } from '@vben/utils';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
import {
|
import { FormItem, Input, Radio, RadioGroup, Select } from 'antdv-next';
|
||||||
FormItem,
|
|
||||||
Input,
|
|
||||||
Radio,
|
|
||||||
RadioGroup,
|
|
||||||
Select,
|
|
||||||
SelectOption,
|
|
||||||
} from 'antdv-next';
|
|
||||||
|
|
||||||
import { ThingModelFormRules, validateBoolName } from '#/api/iot/thingmodel';
|
import { ThingModelFormRules, validateBoolName } from '#/api/iot/thingmodel';
|
||||||
|
|
||||||
|
|
@ -118,16 +111,13 @@ if (!props.isStructDataSpecs && !props.isParams) {
|
||||||
v-model:value="property.dataType"
|
v-model:value="property.dataType"
|
||||||
placeholder="请选择数据类型"
|
placeholder="请选择数据类型"
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
>
|
:options="[
|
||||||
<!-- ARRAY 和 STRUCT 类型数据相互嵌套时,最多支持递归嵌套 2 层(父和子) -->
|
...dataTypeOptions.map((option) => ({
|
||||||
<SelectOption
|
label: `{{ \`${option.value}(${option.label})\` }}`,
|
||||||
v-for="option in dataTypeOptions"
|
value: option.value,
|
||||||
:key="option.value"
|
})),
|
||||||
:value="option.value"
|
]"
|
||||||
>
|
/>
|
||||||
{{ `${option.value}(${option.label})` }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<!-- 数值型配置 -->
|
<!-- 数值型配置 -->
|
||||||
<ThingModelNumberDataSpecs
|
<ThingModelNumberDataSpecs
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import { computed, ref, watch } from 'vue';
|
||||||
|
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { Col, Divider, message, Select, SelectOption, Tag } from 'antdv-next';
|
import { Col, Divider, message, Select, Tag } from 'antdv-next';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
createPropertyValue,
|
createPropertyValue,
|
||||||
|
|
@ -204,15 +204,9 @@ async function getAttributeOptions(propertyId: number) {
|
||||||
@blur="handleInputConfirm(index, attribute.id)"
|
@blur="handleInputConfirm(index, attribute.id)"
|
||||||
@change="handleInputConfirm(index, attribute.id)"
|
@change="handleInputConfirm(index, attribute.id)"
|
||||||
@keyup.enter="handleInputConfirm(index, attribute.id)"
|
@keyup.enter="handleInputConfirm(index, attribute.id)"
|
||||||
>
|
:options="attributeOptions"
|
||||||
<SelectOption
|
:field-names="{ label: 'name', value: 'name' }"
|
||||||
v-for="item2 in attributeOptions"
|
/>
|
||||||
:key="item2.id"
|
|
||||||
:value="item2.name"
|
|
||||||
>
|
|
||||||
{{ item2.name }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
<Tag
|
<Tag
|
||||||
v-show="!inputVisible(index)"
|
v-show="!inputVisible(index)"
|
||||||
@click="showInput(index)"
|
@click="showInput(index)"
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import type { MpAccountApi } from '#/api/mp/account';
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
import { message, Select, SelectOption } from 'antdv-next';
|
import { message, Select } from 'antdv-next';
|
||||||
|
|
||||||
import { getSimpleAccountList } from '#/api/mp/account';
|
import { getSimpleAccountList } from '#/api/mp/account';
|
||||||
|
|
||||||
|
|
@ -61,9 +61,7 @@ onMounted(handleQuery);
|
||||||
placeholder="请选择公众号"
|
placeholder="请选择公众号"
|
||||||
class="!w-full"
|
class="!w-full"
|
||||||
@change="onChanged"
|
@change="onChanged"
|
||||||
>
|
:options="accountList"
|
||||||
<SelectOption v-for="item in accountList" :key="item.id" :value="item.id">
|
:field-names="{ label: 'name', value: 'id' }"
|
||||||
{{ item.name }}
|
/>
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -3,16 +3,7 @@ import { computed, ref } from 'vue';
|
||||||
|
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import {
|
import { Button, Col, Input, message, Modal, Row, Select } from 'antdv-next';
|
||||||
Button,
|
|
||||||
Col,
|
|
||||||
Input,
|
|
||||||
message,
|
|
||||||
Modal,
|
|
||||||
Row,
|
|
||||||
Select,
|
|
||||||
SelectOption,
|
|
||||||
} from 'antdv-next';
|
|
||||||
|
|
||||||
import { WxMaterialSelect, WxNews, WxReply } from '#/views/mp/components';
|
import { WxMaterialSelect, WxNews, WxReply } from '#/views/mp/components';
|
||||||
|
|
||||||
|
|
@ -108,16 +99,8 @@ function deleteMaterial() {
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
class="mr-[2%] w-[240px]"
|
class="mr-[2%] w-[240px]"
|
||||||
allow-clear
|
allow-clear
|
||||||
>
|
:options="menuOptions"
|
||||||
<SelectOption
|
/>
|
||||||
v-for="item in menuOptions"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
:key="item.value"
|
|
||||||
>
|
|
||||||
{{ item.label }}
|
|
||||||
</SelectOption>
|
|
||||||
</Select>
|
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="mt-5 rounded-[5px] bg-white p-[20px_10px]"
|
class="mt-5 rounded-[5px] bg-white p-[20px_10px]"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue