|
|
@@ -9,11 +9,16 @@
|
|
|
>
|
|
|
<div class="content">
|
|
|
<a-input type="text" placeholder="请输入关键字" v-model:value="keyWord" :allow-clear="true" />
|
|
|
+
|
|
|
+ <a-breadcrumb separator=">">
|
|
|
+ <a-breadcrumb-item v-for="(item, idx) in breadcrumbPaths" :key="idx">{{ item }}</a-breadcrumb-item>
|
|
|
+ </a-breadcrumb>
|
|
|
+
|
|
|
<div class="content-bottom">
|
|
|
<div class="cb-content">
|
|
|
<div class="cb-c-top">
|
|
|
<div class="tree" v-show="isEmpty(keyWord)">
|
|
|
- <org-tree ref="treeRef" />
|
|
|
+ <org-tree ref="treeRef" />
|
|
|
</div>
|
|
|
<org-user-list
|
|
|
:keyWord="keyWord"
|
|
|
@@ -38,6 +43,7 @@
|
|
|
:multiple="multiple"
|
|
|
@reset="handleReset"
|
|
|
@remove="handleRemove"
|
|
|
+ :scene-type="sceneType"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -50,13 +56,15 @@
|
|
|
import OrgTree from '/@/components/BsUi/OrgUserSelector/components/OrgTree.vue';
|
|
|
import OrgUserList from '/@/components/BsUi/OrgUserSelector/components/OrgUserList.vue';
|
|
|
import SelectedData from '/@/components/BsUi/OrgUserSelector/components/SelectedData.vue';
|
|
|
- import {computed, nextTick, onMounted, ref, watch} from 'vue';
|
|
|
+ import { computed, nextTick, onMounted, ref, watch } from 'vue';
|
|
|
import { isEmpty } from 'lodash';
|
|
|
- import {SCENE_TYPE, SELECT_MULTIPLE} from '/@/components/BsUi/constant.js';
|
|
|
+ import { SCENE_TYPE, SELECT_MULTIPLE } from '/@/components/BsUi/constant.js';
|
|
|
+ import { getPaths } from '/@/components/BsUi/uitl.js';
|
|
|
|
|
|
const treeRef = ref(null);
|
|
|
const emit = defineEmits(['change', 'ok']);
|
|
|
|
|
|
+
|
|
|
const props = defineProps({
|
|
|
sceneType: {
|
|
|
required: false,
|
|
|
@@ -80,8 +88,8 @@
|
|
|
},
|
|
|
selectedData: {
|
|
|
required: true,
|
|
|
- default: undefined
|
|
|
- }
|
|
|
+ default: undefined,
|
|
|
+ },
|
|
|
});
|
|
|
|
|
|
const {
|
|
|
@@ -108,7 +116,6 @@
|
|
|
const keyWord = ref('');
|
|
|
const orgUserListRef = ref(null);
|
|
|
|
|
|
-
|
|
|
const handleRemove = (node) => {
|
|
|
orgUserListRef.value.handleRemove(node);
|
|
|
};
|
|
|
@@ -130,12 +137,17 @@
|
|
|
|
|
|
const showModal = () => {
|
|
|
setMVal('width', '1200px');
|
|
|
- setMVal('title', '人员');
|
|
|
+
|
|
|
+ if (props.sceneType === SCENE_TYPE.USER) {
|
|
|
+ setMVal('title', '人员');
|
|
|
+ } else if (props.sceneType === SCENE_TYPE.ORG) {
|
|
|
+ setMVal('title', '组织');
|
|
|
+ }
|
|
|
setMVal('visible', true);
|
|
|
// setMVal('modalExtraProps.okButtonProps.disabled', true);
|
|
|
|
|
|
nextTick(() => {
|
|
|
- keyWord.value = "";
|
|
|
+ keyWord.value = '';
|
|
|
});
|
|
|
};
|
|
|
|
|
|
@@ -162,6 +174,13 @@
|
|
|
(val) => {}
|
|
|
);
|
|
|
|
|
|
+ const breadcrumbPaths = computed(() => {
|
|
|
+ if (treeRef.value) {
|
|
|
+ return treeRef.value?.breadcrumb;
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ });
|
|
|
+
|
|
|
defineExpose({
|
|
|
showModal,
|
|
|
orgUserListRef,
|