|
|
@@ -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>
|