@sy-common/organize-select-help 1.0.0-beta.29 → 1.0.0-beta.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.vue +6 -11
package/package.json
CHANGED
package/src/index.vue
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<div class="content-container">
|
|
13
13
|
<div class="tree-orig">
|
|
14
14
|
<div class="tab-content">
|
|
15
|
-
<Tabs :value="tabName" @input="handleTabChange">
|
|
15
|
+
<Tabs v-if="computedTabName" :value="tabName || computedTabName" @input="handleTabChange">
|
|
16
16
|
<TabPane label="组织选择" name="org" v-if="name.includes('org')">
|
|
17
17
|
<div class="tab">
|
|
18
18
|
<span>组织搜索:</span>
|
|
@@ -252,7 +252,7 @@ export default {
|
|
|
252
252
|
},
|
|
253
253
|
data(){
|
|
254
254
|
return {
|
|
255
|
-
tabName:
|
|
255
|
+
tabName: '',
|
|
256
256
|
modal:false,
|
|
257
257
|
dialogOpen:false,
|
|
258
258
|
orgSearch:'',
|
|
@@ -942,15 +942,12 @@ export default {
|
|
|
942
942
|
},
|
|
943
943
|
visibleChange(val) {
|
|
944
944
|
this.$emit('input', val);
|
|
945
|
-
// val 为 true 时表示帮助框打开,此时发起请求
|
|
946
945
|
if (val) {
|
|
947
|
-
this.initStaffList()
|
|
946
|
+
this.initStaffList()
|
|
948
947
|
} else {
|
|
949
|
-
// 可选:关闭帮助框时重置人员列表相关状态,避免下次打开残留旧数据
|
|
950
948
|
this.staffEnding = false;
|
|
951
949
|
this.offset = 0;
|
|
952
950
|
this.staffAllList = [];
|
|
953
|
-
// 关闭时重置选中状态
|
|
954
951
|
this.$set(this, 'selectedStaffOrgId', '');
|
|
955
952
|
}
|
|
956
953
|
},
|
|
@@ -968,20 +965,15 @@ export default {
|
|
|
968
965
|
handleTabChange(tabName) {
|
|
969
966
|
this.tabName = tabName;
|
|
970
967
|
|
|
971
|
-
// 仅修改人员Tab相关逻辑,不影响其他Tab
|
|
972
968
|
if (tabName === 'staff') {
|
|
973
|
-
// 重置人员选择相关状态
|
|
974
969
|
this.$set(this, 'selectedStaffOrgId', '');
|
|
975
970
|
this.proStaffOrgList = [];
|
|
976
|
-
// 清空树组件选中状态
|
|
977
971
|
if (this.$refs.staffTree) {
|
|
978
972
|
this.$refs.staffTree.clearAllChecked(this.$refs.staffTree.data);
|
|
979
973
|
this.$refs.staffTree.$emit('handleChange', []);
|
|
980
974
|
}
|
|
981
|
-
// 切换到人员tab时,立即触发一次搜索,确保orgUnitId参数正确
|
|
982
975
|
this.$nextTick(() => this.searchStaff());
|
|
983
976
|
} else if (tabName === 'post' && this.$refs.postTree && this.proPostList.length === 0) {
|
|
984
|
-
// 保留原有岗位Tab逻辑,不修改
|
|
985
977
|
this.proPostList = [];
|
|
986
978
|
this.$refs.postTree.initData();
|
|
987
979
|
}
|
|
@@ -1511,6 +1503,9 @@ export default {
|
|
|
1511
1503
|
|
|
1512
1504
|
},
|
|
1513
1505
|
computed:{
|
|
1506
|
+
computedTabName() {
|
|
1507
|
+
return Array.isArray(this.name) && this.name.length > 0 ? this.name[0] : '';
|
|
1508
|
+
},
|
|
1514
1509
|
getCheckedStaff(){
|
|
1515
1510
|
return this.staffAllList.filter((item)=>item.checked===true).length
|
|
1516
1511
|
},
|