

<script>
/* eslint-disable */
// sd-skip-auto-import
import{getUserInfo}from"@/common/store-mixin";import processArrayInStr from"@/common/components/sd-form/process-array-in-str";import sdGroupPicker from"@/common/components/sd-group-picker.vue";import components from"./_import-components/sd-group-import";export const metaInfo={caption:"部门框",component:sdGroupPicker,icon:"apartment",order:800};export const fieldProps={dataType:"selectperson",attr:{selectionType:"GROUP",multiple:"true"}};export const toBackendValue=processArrayInStr.toBackendValue;export function updateOnPreview(e){if("true"===e.attr.currentAsDefaultValue){const t=getUserInfo();e.attrFD.defaultValue=[{type:"Group",code:t.deptId.toString(),name:t.deptName}]}}var _render=function e(){var t=this,o=t._self._c;return o("div",[!t.component.readonly?o("a-form-model-item",[o("sd-ugly-checkbox",{attrs:{slot:"label"},slot:"label",model:{value:t.component.attr.multiple,callback:function(e){t.$set(t.component.attr,"multiple",e)},expression:"component.attr.multiple"}},[t._v("多选")])],1):t._e(),!t.noDefaultValue?o("a-form-model-item",[o("sd-complex-label",{attrs:{slot:"label"},slot:"label"},[t._v(" 默认值 "),o("sd-ugly-checkbox",{attrs:{slot:"right"},slot:"right",model:{value:t.component.attr.currentAsDefaultValue,callback:function(e){t.$set(t.component.attr,"currentAsDefaultValue",e)},expression:"component.attr.currentAsDefaultValue"}},[t._v("当前部门")])],1),"true"!==t.component.attr.currentAsDefaultValue?o("sd-group-picker",{attrs:{single:"false"===t.component.attr.multiple},model:{value:t.component.attrFD.defaultValue,callback:function(e){t.$set(t.component.attrFD,"defaultValue",e)},expression:"component.attrFD.defaultValue"}}):t._e()],1):t._e(),!t.component.readonly?o("a-form-model-item",[o("a-checkbox",{attrs:{checked:"0"!==t.component.attr.hierarchical},on:{change:e=>{t.$set(t.component.attr,"hierarchical",e.target.checked?"1":"0")}}},[o("span",{attrs:{title:"勾选时，开启分级管理的单位，部门选择范围为本单位，取消勾选，部门选择范围为全组织。"}},[t._v("按分级过滤选择范围")])])],1):t._e()],1)};var staticRenderFns=[];_render._withStripped=true;export default{name:"SdGroup",components:components,data(){return{}},methods:{},render:_render,staticRenderFns:staticRenderFns};</script>

<style module lang="scss">
@use '@/common/design' as *;
</style>
