|
@@ -60,7 +60,7 @@
|
|
<span class="text-orange text-sm">为您分配抽检范围,若有异动,可手动勾选想要验收的部分</span>
|
|
<span class="text-orange text-sm">为您分配抽检范围,若有异动,可手动勾选想要验收的部分</span>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
- <HcTree ref="treeRef" style="margin-bottom: 10px;" :tree-data="ElTreeData" @getCheckKeys="getCheckKeys" />
|
|
|
|
|
|
+ <HcTree ref="treeRef" style="margin-bottom: 10px;" :tree-data="ElTreeData" @check="checkChange" />
|
|
|
|
|
|
<template #action>
|
|
<template #action>
|
|
<div class="hc-card-action-diy">
|
|
<div class="hc-card-action-diy">
|
|
@@ -87,7 +87,7 @@ import { useAppStore } from '~src/store'
|
|
import { useRouter } from 'vue-router'
|
|
import { useRouter } from 'vue-router'
|
|
import HcTree from './components/entry-sampling/hc-tree.vue'
|
|
import HcTree from './components/entry-sampling/hc-tree.vue'
|
|
import initialgApi from '~api/initial/initial'
|
|
import initialgApi from '~api/initial/initial'
|
|
-import { getArrValue } from 'js-fast-way'
|
|
|
|
|
|
+import { arrUnion, getArrValue } from 'js-fast-way'
|
|
|
|
|
|
//变量
|
|
//变量
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
@@ -131,10 +131,14 @@ const getElTreeData = async ()=>{
|
|
const ElTreeData = ref( [])
|
|
const ElTreeData = ref( [])
|
|
const treeRef = ref(null)
|
|
const treeRef = ref(null)
|
|
const checkKeys = ref([])
|
|
const checkKeys = ref([])
|
|
-const getCheckKeys = (val)=>{
|
|
|
|
- checkKeys.value = val
|
|
|
|
-}
|
|
|
|
|
|
|
|
|
|
+const checkChange = ( val, val1 )=>{
|
|
|
|
+
|
|
|
|
+ const { checkedNodes, checkedKeys, halfCheckedNodes, halfCheckedKeys } = val1
|
|
|
|
+
|
|
|
|
+ const arr = arrUnion(checkedKeys, halfCheckedKeys)
|
|
|
|
+ checkKeys.value = arr
|
|
|
|
+}
|
|
//确认分配
|
|
//确认分配
|
|
const confirmAllocationClick = async () => {
|
|
const confirmAllocationClick = async () => {
|
|
isNull.value = false
|
|
isNull.value = false
|