guoyujia 1 ano atrás
pai
commit
1134327689

+ 4 - 5
src/views/business/department/index.vue

@@ -159,15 +159,14 @@ function getList() {
     })
     if (deptList.value.length > 0) {
       currentDept.value = deptList.value[0]
-      proxy.$refs.departmentTable.setCurrentRow(currentDept.value)
+      getUserList()
+    }
+    else {
+      userList.value = []
     }
     loading.value = false
   })
 }
-/** 根据名称筛选部门树 */
-watch(deptName, (val) => {
-  proxy.$refs['departmentTable'].filter(val)
-})
 
 function handleSearch() {
   getList()

+ 2 - 2
src/views/business/workshop/index.vue

@@ -101,7 +101,8 @@ function getList() {
       loading.value = false
       console.log(workshopList.value.length)
       if (workshopList.value.length >0) {
-        getdeptList(workshopList.value[0])
+        currentWorkshop.value = workshopList.value[0]
+        getdeptList()
       } else {
         console.log("888")
         deptList.value = []
@@ -175,7 +176,6 @@ function handleDeptSelected(selection) {
   })
 }
 function getdeptList() {
-  console.log("777")
   deptLoading.value = true
   queryDeptParams.value.workshopId = currentWorkshop.value.id
   console.log(total.value)