yanghao 3 viikkoa sitten
vanhempi
commit
add2294b92
2 muutettua tiedostoa jossa 5 lisäystä ja 4 poistoa
  1. 3 2
      src/views/pms/qhse/case/index.vue
  2. 2 2
      src/views/pms/qhse/industry/index.vue

+ 3 - 2
src/views/pms/qhse/case/index.vue

@@ -225,7 +225,7 @@
               v-model="formData.deptId"
               :data="deptList2"
               :props="defaultProps"
-              :check-strictly="false"
+              check-strictly
               node-key="id"
               filterable
               placeholder="请选择所在部门" />
@@ -283,6 +283,7 @@ const deptList2 = ref<Tree[]>([]) // 树形结构
 import { defaultProps } from '@/utils/tree'
 import * as DeptApi from '@/api/system/dept'
 defineOptions({ name: 'QhseAccidentCase' })
+import { handleTree } from '@/utils/tree'
 
 const rootDeptId = 156
 const deptId = useUserStore().getUser.deptId || rootDeptId
@@ -477,6 +478,6 @@ const downloadFile = async (url: string) => {
 onMounted(async () => {
   getList()
 
-  deptList2.value = await DeptApi.getSimpleDeptList()
+  deptList2.value = handleTree(await DeptApi.getSimpleDeptList())
 })
 </script>

+ 2 - 2
src/views/pms/qhse/industry/index.vue

@@ -275,7 +275,7 @@ import { useUserStore } from '@/store/modules/user'
 import { defaultProps } from '@/utils/tree'
 import * as DeptApi from '@/api/system/dept'
 import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
-
+import { handleTree } from '@/utils/tree'
 defineOptions({ name: 'QhseIndustryStandard' })
 
 const rootDeptId = 156
@@ -431,6 +431,6 @@ const handleExport = async () => {
 
 onMounted(async () => {
   getList()
-  deptList2.value = await DeptApi.getSimpleDeptList()
+  deptList2.value = handleTree(await DeptApi.getSimpleDeptList())
 })
 </script>