feat: 新增获取全量机构树的API,优化SignupModal和ManageListRemote组件的组织树交互逻辑

(cherry picked from commit a9b36884c3)
This commit is contained in:
huweihang
2025-12-17 18:48:29 +08:00
parent 6c0d1de13d
commit 32874683e2
3 changed files with 153 additions and 65 deletions

View File

@@ -77,7 +77,14 @@
</el-button>
<el-button size="small" @click="resetOrg">重置</el-button>
</div>
<el-tree class="org-tree" show-checkbox node-key="id" :data="orgList" :props="orgTreeProps" lazy
<el-tree
ref="orgTree"
class="org-tree"
show-checkbox
node-key="id"
:data="orgList"
:props="orgTreeProps"
lazy
:load="loadOrgNodeFull" @check-change="onOrgCheckChange" :default-checked-keys="selectedOrgKeys" />
</el-tab-pane>
@@ -573,13 +580,25 @@ export default {
this.stuSelectRows = this.stuSelectRows.filter(
(i) => (i.id || i.userId) !== (item.id || item.userId)
);
// 同步左侧快速选人表格的勾选状态
this.$nextTick(() => {
this.syncStuTableSelection();
});
},
removeOrg(item) {
this.deptList = this.deptList.filter((i) => i.id !== item.id);
this.selectedOrgKeys = this.deptList.map((d) => d.id);
// 同步左侧组织树的勾选状态
if (this.$refs.orgTree && this.$refs.orgTree.setCheckedKeys) {
this.$refs.orgTree.setCheckedKeys(this.selectedOrgKeys);
}
},
removeAudience(item) {
this.auditSelectRows = this.auditSelectRows.filter((i) => i.id !== item.id);
// 同步左侧受众表格的勾选状态
this.$nextTick(() => {
this.syncAudienceTableSelection();
});
},
submitAuth() {
if (this.type === 2) {