Browse Source

fix: bug修复

main
xuziqiang 3 months ago
parent
commit
3d2d777644
  1. 18
      hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue
  2. 7
      hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue
  3. 2
      lib/component/tree/tree-api.vue

18
hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue

@ -78,7 +78,7 @@
<div class="ns-table-title ns-title-extra-box">角色管理</div>
<a-row>
<a-col :span="8" class="tree">
<a-space wrap style="margin-bottom: 16px">
<a-space wrap style="margin-bottom: 16px; justify-content: flex-start">
<ns-button type="primary" @click="rolePipe(addUser, true)"> 新增角色 </ns-button>
<ns-button type="primary" @click="rolePipe(addUserSon)">新增子角色</ns-button>
<ns-button type="primary" @click="rolePipe(deleteUser)"> 删除 </ns-button>
@ -366,12 +366,22 @@
};
};
const addApartmentSon = () => {
const getParent = (data) => {
if (data?.parent) {
getParent(data.parent);
} else {
data;
}
};
const addApartmentSon = (data) => {
const { deptInfo } = data;
disabled.value = false;
opMap.type = 'addson';
formData.value = {};
let sourceOrgId = '';
if (!currentOrgRef.value?.own && orgId !== selectRef.value.deptInfo?.orgId) {
if (deptInfo.orgId !== orgId) {
sourceOrgId = orgId;
}
opMap.fuc = (params) => {
@ -380,7 +390,7 @@
...params,
orgId,
projectId,
pdeptId: selectRef.value.deptInfo.deptId,
pdeptId: deptInfo.deptId,
sourceOrgId,
// deptName: selectRef.value.deptInfo.deptName,
});

7
hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue

@ -117,6 +117,7 @@
const userAuthList = ref([]);
const orgId = JSON.parse(sessionStorage.getItem('userInfo')).orgId;
const orgTreeConfig = ref({
selectedKeys: ['0-0'],
defaultExpandAll: true,
api: origanizemanage.queryOrgTree,
defaultParams: { orgId },
@ -209,14 +210,18 @@
};
const tableFetch = (params) => {
console.log(mainRef.value);
console.log(params, 'sdfasfasdfasdfasdf');
// console.log(mainRef.value);
tableConfig.value.params = {
...mainRef.value.params,
...params,
};
setTimeout(() => {
mainRef.value?.nsTableRef.reload();
}, 100);
};
const handleSelect = (selectedKeys: any, info: any) => {

2
lib/component/tree/tree-api.vue

@ -32,7 +32,7 @@
const props = defineProps(treeProps);
const treeData = ref<TreeDataItem[]>([]);
const selectedKeys = ref(props.defaultSelectedKeys || []);
const selectedKeys = ref(props.selectedKeys || []);
const { httpRequest } = useApi();
const requestConfig: AxiosRequestConfig = { method: 'get' };
const route = useRoute();

Loading…
Cancel
Save