<Space>
    <SpaceItem>
        <Select DataSource="@uctItems"
                @bind-Value="@UserField.UserConditionType"
                ValueName="@nameof(UserConditionTpyeItem.Type)"
                LabelName="@nameof(UserConditionTpyeItem.Description)"
                OnSelectedItemChanged="OnUCTItemChangedHandler"
                DefaultActiveFirstOption
                Style="width: 160px;">
        </Select>
    </SpaceItem>
    <SpaceItem>



        @switch (UserField.UserConditionType)
        {
            case entity.workflowDefine.UserConditionType.Department:
                <Cascader Options="@optoins" @bind-Value="UserField.Department" ExpandTrigger="hover" SelectedNodesChanged="OnDeptChange"></Cascader>
                break;
            case entity.workflowDefine.UserConditionType.DepartmentPosition:
                <Space>
                    <SpaceItem>
                        <Cascader Options="@optoins" @bind-Value="UserField.Department" ExpandTrigger="hover" SelectedNodesChanged="OnDeptChange"></Cascader>
                    </SpaceItem>
                    <SpaceItem>
                        @if (lstPosition != null)
                        {
                            <Select DataSource="@lstPosition"
                                    @bind-Value="SelectPositionsId"
                                    ValueName="@nameof(Position.Id)"
                                    LabelName="@nameof(Position.Name)"
                                    DefaultActiveFirstOption
                                    OnSelectedItemChanged="OnPositionChangedHandler"
                                    Style="width: 150px;">
                            </Select>
                        }
                    </SpaceItem>
                </Space>


                break;
            case entity.workflowDefine.UserConditionType.Staff:
                <div style="width:200px;">
                    <wispro.sp.web.Components.UserConditionInput Workflow="Workflow" UserType="@UserField.UserType" UserValue="@UserField.UserValue" />
                </div>
                break;
            case entity.workflowDefine.UserConditionType.UserDepartment:
                <Space>
                    <SpaceItem>
                        <div style="width:180px;"><wispro.sp.web.Components.UserConditionInput Workflow="Workflow" UserType="@UserField.UserType" UserValue="@UserField.UserValue" /></div>
                    </SpaceItem>
                    <SpaceItem>
                        的部门
                    </SpaceItem>
                </Space>
                break;
            case entity.workflowDefine.UserConditionType.UserDepartmentPosition:
                <Space>
                    <SpaceItem>
                        <div style="width:200px;">
                            <wispro.sp.web.Components.UserConditionInput Workflow="Workflow" UserType="@UserField.UserType" UserValue="@UserField.UserValue" />
                        </div>
                    </SpaceItem>
                    <SpaceItem>
                        部门的
                    </SpaceItem>
                    <SpaceItem>
                        @if (lstPosition != null)
                        {
                        <Select DataSource="@lstPosition"
                                @bind-Value="SelectPositionsId"
                                ValueName="@nameof(Position.Id)"
                                LabelName="@nameof(Position.Name)"
                                DefaultActiveFirstOption
                                OnSelectedItemChanged="OnPositionChangedHandler"
                                Style="width: 150px;">
                        </Select>
                        }
                    </SpaceItem>
                </Space>
                break;
        }
    </SpaceItem>
</Space>