|
|
@@ -183,10 +183,21 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="是否默认" prop="isDefault" width="100">
|
|
|
+ <el-table-column label="是否默认" prop="isDefault" width="200">
|
|
|
<template #default="scope">
|
|
|
- <el-switch v-model="scope.row.isDefault" active-value="1" inactive-value="0"
|
|
|
- style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"/>
|
|
|
+ <div style="display: flex; align-items: center; gap: 6px;">
|
|
|
+ <el-switch v-model="scope.row.isDefault" active-value="1" inactive-value="0"
|
|
|
+ style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"/>
|
|
|
+ <el-input-number
|
|
|
+ v-if="scope.row.isDefault === '1' && scope.row.projectType !== 'MAIN'"
|
|
|
+ v-model="scope.row.defaultCount"
|
|
|
+ :min="1"
|
|
|
+ :max="999"
|
|
|
+ size="small"
|
|
|
+ controls-position="right"
|
|
|
+ style="width: 70px;"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<!-- 电站锅炉内检时显示部件选择 -->
|
|
|
@@ -392,7 +403,8 @@ const loadDetailInfo = async (id: string) => {
|
|
|
...item,
|
|
|
name: item.templateName,
|
|
|
// 将后端返回的 part 字符串转换为数组
|
|
|
- part: item.part ? (typeof item.part === 'string' ? item.part.split('/').filter(p => p) : (item.part || [])) : []
|
|
|
+ part: item.part ? (typeof item.part === 'string' ? item.part.split('/').filter(p => p) : (item.part || [])) : [],
|
|
|
+ defaultCount: item.defaultCount || 1
|
|
|
}))
|
|
|
}
|
|
|
} catch (error) {
|
|
|
@@ -479,6 +491,7 @@ const handleInspectionNatureSubmit = async () => {
|
|
|
id: item.id,
|
|
|
templateId: item.templateId,
|
|
|
isDefault: item.isDefault,
|
|
|
+ defaultCount: item.defaultCount,
|
|
|
inspectionNatureId: has(item, 'inspectionNatureId') ? item.inspectionNatureId : (editType.value === 'edit' ? editInspectionNatureId.value : undefined),
|
|
|
// 如果是电站锅炉内检,将 part 数组转换为字符串
|
|
|
part: isPowerStationBoiler ? (item.part || []).join('/') : ""
|
|
|
@@ -537,7 +550,8 @@ const handleReportItemSelect = (item: any, checked: boolean) => {
|
|
|
inspectionNatureForm.value.templateSaveReqVOList.push({
|
|
|
templateId: item.id,
|
|
|
name: item.projectName,
|
|
|
- isDefault: item.isDefault,
|
|
|
+ isDefault: item.isDefault || '0',
|
|
|
+ defaultCount: 1,
|
|
|
part: []
|
|
|
})
|
|
|
}
|