@dongkboy il y a 1 an
Parent
commit
ab4242f793

+ 2 - 0
src/components/Table/index.vue

@@ -171,6 +171,7 @@ const handleSizeChange = (val: number) => {
 //多选
 
 const selectAllChange = (value: any[]) => {
+  newSelectionList.value = [];
   if (value.length > 0) {
     value.map(val => {
       newSelectionList.value.push(val.id)
@@ -182,6 +183,7 @@ const selectAllChange = (value: any[]) => {
 
 }
 const selectionChange = (value: any[]) => {
+  newSelectionList.value = [];
   if (value.length > 0) {
     value.map(val => {
       newSelectionList.value.push(val.id)

+ 6 - 17
src/views/organizationManagement/organization/organizationDetail.vue

@@ -236,24 +236,13 @@ const deptUpdate = (id: string) => {
 }
 // 添加子机构
 const addSubOrganization = (id: string) => {
-  api.dept.deptGet(id).then((res: any) => {
-    if (res.code == '200') {
-      router.push({
-        name: 'OrganizationDeptAdd',
-        query: {
-          parentId: res.data.parentId,
-          code: code.value,
-        }
-      })
-    } else {
-      ElMessage({
-        type: 'success',
-        message: res.msg,
-        plain: true,
-      })
+  router.push({
+    name: 'OrganizationDeptAdd',
+    query: {
+      parentId: id,
+      code: code.value,
     }
-  });
-
+  })
 }
 //删除租户
 const del = () => {

+ 2 - 4
src/views/organizationManagement/organization/organizationlist.vue

@@ -38,7 +38,7 @@
         </ElRow>
       </ElForm>
       <Table :tableData="tableData" :columns="columns" :showIndex="false" :columnwidth="200" :showSelect="true"
-        :pageInfo="pageInfo" @getList="getList" @selectAllChange="handleSelectionChange"
+        :pageInfo="pageInfo" @getList="getList"
         @selectionChange="selectionChange">
         <template v-slot:table-title-btn>
           <RouterLink :to="{ name: 'OrganizationAdd' }">
@@ -250,9 +250,7 @@ function tenantUpdate(item: any) {
     }
   })
 }
-const handleSelectionChange = (val: any) => {
-  sysUpAndDownList.value = val;
-}
+
 const selectionChange = (val: any) => {
   sysUpAndDownList.value = val;
 }

+ 1 - 1
src/views/organizationManagement/organization/subOrganizatioAdd.vue

@@ -160,8 +160,8 @@ onBeforeMount(() => {
 
   if (parentId.value) {
     parentIdareaOptionsValue.value = parentId.value;
+    deptform.value.parentId=parentIdareaOptionsValue.value;
     //子机构向下添加,上级机构无法修改
-
     parentIdShow.value = true;
   }
 });