UPDATE: 优化;

This commit is contained in:
贾同学
2025-09-30 08:42:45 +08:00
parent 7c0ec5844a
commit b0c88b9df2
2 changed files with 12 additions and 4 deletions

View File

@@ -461,8 +461,9 @@ const generateData = () => {
}
}
i.checked = boundPqDevIds.length > 0 ? boundPqDevIds.includes(i.id) : false
i.disabled = i.checkState ? i.checkState != 0 : false
if (i.checkState && i.checkState != 0) {
i.disabled = true
}
if (allDisabled.value) {
i.disabled = true
}
@@ -948,6 +949,13 @@ const open = async (sign: string, data: Plan.ReqPlan, currentMode: string, plan:
...user,
disabled: childrenMembers.includes(user.id) || formContent.leader === user.id
}))
const subPlanIds = data.children.map((item: any) => item.id)
const subBoundDev_Result = await getBoundPqDevList({ planIdList: subPlanIds })
const subBoundDevData = Array.isArray(subBoundDev_Result.data) ? subBoundDev_Result.data : []
const subBoundDevIds = subBoundDevData.map((item: any) => item.id)
boundPqDevList.value.forEach((item: any) => {
item.disabled = subBoundDevIds.includes(item.id)
})
}
} else if (planType.value === 1) {
unboundPqDevList.value = boundData.filter((i: any) => !i.boundPlanName) as Device.ResPqDev[]

View File

@@ -103,7 +103,7 @@
type="primary"
v-auth.plan="'analysis'"
link
:icon="List"
icon="DataLine"
v-if="scope.row.testState == '2'"
@click="statisticalAnalysis(scope.row)"
>
@@ -149,7 +149,7 @@
<script setup lang="tsx" name="useProTable">
import ProTable from '@/components/ProTable/index.vue'
import type { ColumnProps, ProTableInstance } from '@/components/ProTable/interface'
import { CirclePlus, Delete, Download, List, Upload } from '@element-plus/icons-vue'
import { CirclePlus, Delete, Download, Upload } from '@element-plus/icons-vue'
import {
deletePlan,
downloadTemplate,