|
@@ -60,7 +60,7 @@
|
|
<span class="text-orange text-sm">为您分配抽检范围,若有异动,可手动勾选想要验收的部分</span>
|
|
<span class="text-orange text-sm">为您分配抽检范围,若有异动,可手动勾选想要验收的部分</span>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
- <HcTree style="margin-bottom: 10px;" :tree-data="ElTreeData" />
|
|
|
|
|
|
+ <HcTree ref="treeRef" style="margin-bottom: 10px;" :tree-data="ElTreeData" @getCheckKeys="getCheckKeys" />
|
|
|
|
|
|
<template #action>
|
|
<template #action>
|
|
<div class="hc-card-action-diy">
|
|
<div class="hc-card-action-diy">
|
|
@@ -68,7 +68,7 @@
|
|
<HcIcon name="refresh" />
|
|
<HcIcon name="refresh" />
|
|
<span>清空重置</span>
|
|
<span>清空重置</span>
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button hc-btn type="primary" @click="ToInspection">
|
|
|
|
|
|
+ <el-button hc-btn type="primary" :loading="inspectionLoaing" @click="ToInspection">
|
|
<HcIcon name="check" />
|
|
<HcIcon name="check" />
|
|
<span>确认并进入抽检</span>
|
|
<span>确认并进入抽检</span>
|
|
</el-button>
|
|
</el-button>
|
|
@@ -129,6 +129,11 @@ const getElTreeData = async ()=>{
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const ElTreeData = ref( [])
|
|
const ElTreeData = ref( [])
|
|
|
|
+const treeRef = ref(null)
|
|
|
|
+const checkKeys = ref([])
|
|
|
|
+const getCheckKeys = (val)=>{
|
|
|
|
+ checkKeys.value = val
|
|
|
|
+}
|
|
|
|
|
|
//确认分配
|
|
//确认分配
|
|
const confirmAllocationClick = async () => {
|
|
const confirmAllocationClick = async () => {
|
|
@@ -141,12 +146,32 @@ const confirmAllocationClick = async () => {
|
|
|
|
|
|
//确认并进入抽检
|
|
//确认并进入抽检
|
|
const ToInspection = () => {
|
|
const ToInspection = () => {
|
|
- router.push({
|
|
|
|
- name: 'transfer-preliminary-examination',
|
|
|
|
|
|
+ console.log( checkKeys.value, ' checkKeys.value')
|
|
|
|
+ const ids = checkKeys.value.join(',')
|
|
|
|
+ goInspection(ids)
|
|
|
|
+ // router.push({
|
|
|
|
+ // name: 'transfer-preliminary-examination',
|
|
|
|
+ // })
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+//抽检
|
|
|
|
+const inspectionLoaing = ref(false)
|
|
|
|
+const goInspection = async (ids)=>{
|
|
|
|
+ inspectionLoaing.value = true
|
|
|
|
+ const { error, code, data, msg } = await initialgApi.saveAllSelectNodes({
|
|
|
|
+ ids: ids,
|
|
|
|
+
|
|
})
|
|
})
|
|
|
|
+ inspectionLoaing.value = false
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ window.$message.success(msg)
|
|
|
|
+ router.push({
|
|
|
|
+ name: 'transfer-preliminary-examination',
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
//清空重置
|
|
//清空重置
|
|
const clearResetClick = () => {
|
|
const clearResetClick = () => {
|
|
isNull.value = true
|
|
isNull.value = true
|