<!-- 标准装置台账信息详情 配置核查项 第2套:直流稳压电源检定装置 — -->
<script name="StandardBookEquipmentConfig" lang="ts" setup>
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import type { IList } from './second-interface'
// import TemplateTable from './templateTable.vue'
import type { dictType } from '@/global'
import { useCheckList } from '@/commonMethods/useCheckList'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { config, getCheckItemDetail } from '@/api/equipment/standard/book'
import { calc } from '@/utils/useCalc'
import { getDictByCode } from '@/api/system/dict'
import templateTable from '@/views/business/measure/item/components/second/templateTable.vue'
import { differenceArray, setSelectList } from '@/utils/Array'
const textMap: { [key: string]: string } = {
edit: '编辑',
detail: '详情',
}// 页面类型字典
const form = ref({ // 表单
equipmentNo: '', // 统一编号
equipmentName: '', // 设备名称
model: '', // 型号规格
manufactureNo: '', // 出厂编号
measureRange: '', // 测量范围
uncertainty: '', // 不确定度或允许误差极限或准确度等级
itemCategoryName: '', // 核查项分类名称
itemCategoryId: '', // 核查项分类id
remark: '', // 核查项备注
belongStandardEquipment: '', // 检校标准装置
belongStandardEquipmentName: '', // 检校标准装置名称
})
const pageType = ref('detail') // 页面类型: add, edit, detail
const infoId = ref('') // id
const $router = useRouter() // 路由实例
const loading = ref(false) // loading
const equipmentId = ref('') // 设备id
// -----------------------------------路由参数------------------------------------------------------
// 从路由中获取页面类型参数
const $route = useRoute()
if ($route.params && $route.params.type) {
pageType.value = $route.params.type as string
if ($route.params.id) {
infoId.value = $route.params.id as string
}
console.log('pageType.value', pageType.value)
}
// -------------------------------------------核查项-----------------------------------------------
const listDirectVoltage = ref<IList[]>([]) // 直流电压
const listEffect = ref<IList[]>([]) // 电源效应和负载效应
const listDCIndirect = ref<IList[]>([]) // 直流电流(间接测量)
const listDCDirect = ref<IList[]>([]) // 直流电流(直接测量)
const listRippleVoltage = ref<IList[]>([]) // 纹波电压
const checkoutDirectVoltageList = ref<IList[]>([]) // 直流电压多选
const checkoutEffectList = ref<IList[]>([]) // 电源效应和负载效应多选
const checkoutDCIndirectList = ref<IList[]>([]) // 直流电流(间接测量)多选
const checkoutDCDirectList = ref<IList[]>([]) // 直流电流(直接测量)多选
const checkoutRippleVoltageList = ref<IList[]>([]) // 纹波电压多选
// 列表显示状态
const checkedTable = ref<{ [key: string]: any }>({
directVoltage: '1',
effect: '1',
DCDirect: '1',
DCIndirect: '1',
rippleVoltage: '1',
})
const checkedDict = {
'1-直流电压': 'directVoltage',
'2-电源效应和负载效应': 'effect',
'3-直流电流(直接测量)': 'DCDirect',
'4-直流电流(间接测量)': 'DCIndirect',
'5-纹波电压': 'rippleVoltage',
} as { [key: string]: any }
// 表格数据对应 list 字典
const listDict = ref<{ [key: string]: any }>({})
// 监听所有表格数据
watch(() => [listDirectVoltage.value, listEffect.value, listDCIndirect.value, listDCDirect.value, listRippleVoltage.value], () => {
listDict.value = {
'1-直流电压': listDirectVoltage.value,
'2-电源效应和负载效应': listEffect.value,
'3-直流电流(直接测量)': listDCDirect.value,
'4-直流电流(间接测量)': listDCIndirect.value,
'5-纹波电压': listRippleVoltage.value,
}
}, {
deep: true,
})
const columns_direct_voltage_DC_direct = ref<any[]>([ // 直流电压表头、直流电流(直接测量)
{ text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' },
{ text: '核查点', value: 'checkPoint', align: 'center', required: true, type: 'select-dict', code: 'checkPointVoltage' },
{ text: '单位', value: 'unit', align: 'center', required: true, type: 'select' },
{ text: '分辨力', value: 'resolution', align: 'center', required: true, type: 'input' },
{ text: '循环次数', value: 'cycleNumber', align: 'center', required: true, type: 'number' },
{ text: '测量标准相对扩展不确定度Urel', value: 'urel', align: 'center', required: true, type: 'notation' },
{ text: '核查类型', value: 'checkType', align: 'center', required: true, type: 'select-multi' },
])
const columns_effect = ref<any[]>([ // 电源效应和负载效应
{ text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' },
{ text: '核查点', value: 'checkPoint', align: 'center', required: true, type: 'select-dict', code: 'checkPointVoltage' },
{ text: '单位', value: 'unit', align: 'center', required: true, type: 'select' },
{ text: '是否为基准点', value: 'datumPoint', align: 'center', required: true, type: 'radio' },
{ text: '分辨力', value: 'resolution', align: 'center', required: true, type: 'input' },
{ text: '循环次数', value: 'cycleNumber', align: 'center', required: true, type: 'number' },
{ text: '测量标准相对扩展不确定度Urel', value: 'urel', align: 'center', required: true, type: 'notation' },
{ text: '核查类型', value: 'checkType', align: 'center', required: true, type: 'select-multi' },
])
const columns_DC_indirect = ref<TableColumn[]>([ // 直流电流(间接测量)
{ text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' },
{ text: '核查点', value: 'checkPoint', align: 'center', required: true, type: 'select-dict', code: 'checkPointVoltage' },
{ text: '单位', value: 'unit', align: 'center', required: true, type: 'select' },
{ text: '电阻值', value: 'resistanceValue', align: 'center', required: true, type: 'select-dict', code: 'bizSecondStandardResistance' },
{ text: '电阻值单位', value: 'resistanceValueUnit', align: 'center', required: true, type: 'select' },
{ text: '分辨力', value: 'resolution', align: 'center', required: true, type: 'input' },
{ text: '循环次数', value: 'cycleNumber', align: 'center', required: true, type: 'number' },
{ text: '测量标准相对扩展不确定度Urel', value: 'urel', align: 'center', required: true, type: 'notation' },
{ text: '核查类型', value: 'checkType', align: 'center', required: true, type: 'select-multi' },
])
const columns_ripple_voltage = ref<TableColumn[]>([ // 纹波电压
{ text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' },
{ text: '核查点', value: 'checkPoint', align: 'center', required: true, type: 'select-dict', code: 'checkPointVoltage' },
{ text: '单位', value: 'unit', align: 'center', required: true, type: 'select' },
{ text: '频率', value: 'resistanceValue', align: 'center', required: true, type: 'select-dict', code: 'bizSecondStandardFrequency' },
{ text: '频率单位', value: 'resistanceValueUnit', align: 'center', required: true, type: 'select' },
{ text: '分辨力', value: 'resolution', align: 'center', required: true, type: 'input' },
{ text: '循环次数', value: 'cycleNumber', align: 'center', required: true, type: 'number' },
{ text: '测量标准相对扩展不确定度Urel', value: 'urel', align: 'center', required: true, type: 'notation' },
{ text: '核查类型', value: 'checkType', align: 'center', required: true, type: 'select-multi' },
])
const columnsDict = ref<{ [key: string]: any }>({
'1-直流电压': columns_direct_voltage_DC_direct.value,
'2-电源效应和负载效应': columns_effect.value,
'3-直流电流(直接测量)': columns_direct_voltage_DC_direct.value,
'4-直流电流(间接测量)': columns_DC_indirect.value,
'5-纹波电压': columns_ripple_voltage.value,
})
// 校验表格(点击保存的时候、增加行用)
function checkList(list: any[], columns: any[], title: string) {
return useCheckList(list, columns, title)
}
// 校验所有表格
function checkAllList() {
let result = true
for (const i in columnsDict.value) {
const requireLength = !!((checkedTable.value[checkedDict[i]] === '1' || checkedTable.value[checkedDict[i]] === 1) && checkedTable.value[checkedDict[i]])
if (!useCheckList(listDict.value[i], columnsDict.value[i], i.substring(2), '', '', '', requireLength)) {
result = false
break
}
}
return result
}
// 过滤数据 check为0的
function filterData() {
let result = [] as any[]
for (const i in listDict.value) {
if ((checkedTable.value[checkedDict[i]] === '1' || checkedTable.value[checkedDict[i]] === 1) && checkedTable.value[checkedDict[i]]) {
result = [...result, ...listDict.value[i]]
}
}
return result
}
/**
* 增加行公共方法
* @param list 要操作的数组
* @param title 操作的表格
*/
const addRow = (list: IList[], title: string, index: string, item: any) => {
if (checkList(list, columnsDict.value[`${index}-${title}`], `${title}表格`)) {
let data = {} as any
switch (title) {
case '直流电压': // 电源电压调整率
data = {
params: '直流电压',
checkType: ['重复性', '稳定性'], // 核查类型
checkPoint: '', // 核查点
cycleNumber: 6, // 循环次数
unit: '',
urel: '',
resolution: '0.1', // 分辨力
}
item ? listDirectVoltage.value.push({ ...JSON.parse(JSON.stringify(item)), params: '直流电压' }) : listDirectVoltage.value.length ? listDirectVoltage.value.push(JSON.parse(JSON.stringify(listDirectVoltage.value[listDirectVoltage.value.length - 1]))) : listDirectVoltage.value.push(data)
break
case '电源效应和负载效应': // 电源电压调整率
data = {
params: '电源效应和负载效应',
checkType: ['重复性', '稳定性'], // 核查类型
checkPoint: '', // 核查点
cycleNumber: 6, // 循环次数
unit: '',
urel: '',
resolution: '0.00001', // 分辨力
datumPoint: '1',
}
if (listEffect.value.length) {
data.datumPoint = '0'
}
// listEffect.value.push(item ? ({ ...item, paramsName: '电源效应和负载效应' }) : data)
item ? listEffect.value.push({ ...JSON.parse(JSON.stringify(item)), params: '电源效应和负载效应' }) : listEffect.value.length ? listEffect.value.push({ ...JSON.parse(JSON.stringify(listEffect.value[listEffect.value.length - 1])), datumPoint: '0' } as any) : listEffect.value.push(data)
break
case '直流电流(直接测量)': // 直流电流(直接测量)
data = {
params: '直流电流(直接测量)',
checkType: ['重复性', '稳定性'], // 核查类型
checkPoint: '', // 核查点
cycleNumber: 6, // 循环次数
unit: '',
urel: '',
resolution: '0.00001', // 分辨力
}
// listDCDirect.value.push(item ? ({ ...item, paramsName: '直流电流(直接测量)' }) : data)
item ? listDCDirect.value.push({ ...JSON.parse(JSON.stringify(item)), params: '直流电流(直接测量)' }) : listDCDirect.value.length ? listDCDirect.value.push(JSON.parse(JSON.stringify(listDCDirect.value[listDCDirect.value.length - 1]))) : listDCDirect.value.push(data)
break
case '直流电流(间接测量)': // 直流电流(间接测量)
data = {
params: '直流电流(间接测量)',
checkType: ['重复性', '稳定性'], // 核查类型
checkPoint: '', // 核查点
cycleNumber: 6, // 循环次数
unit: '',
urel: '',
resolution: '0.00001', // 分辨力
resistanceValue: '', // 电阻值
resistanceValueUnit: '', // 电阻值单位
}
// listDCIndirect.value.push(item ? ({ ...item, paramsName: '直流电流(间接测量)' }) : data)
item ? listDCIndirect.value.push({ ...JSON.parse(JSON.stringify(item)), params: '直流电流(间接测量)' }) : listDCIndirect.value.length ? listDCIndirect.value.push(JSON.parse(JSON.stringify(listDCIndirect.value[listDCIndirect.value.length - 1]))) : listDCIndirect.value.push(data)
break
case '纹波电压': // 纹波电压
data = {
params: '纹波电压',
checkType: ['重复性', '稳定性'], // 核查类型
checkPoint: '', // 核查点
cycleNumber: 10, // 循环次数
unit: '',
urel: '',
resolution: '0.00001', // 分辨力
resistanceValue: '', // 频率值
resistanceValueUnit: '', // 频率值单位
}
// listRippleVoltage.value.push(item ? ({ ...item, paramsName: '纹波电压' }) : data)
item ? listRippleVoltage.value.push({ ...JSON.parse(JSON.stringify(item)), params: '纹波电压' }) : listRippleVoltage.value.length ? listRippleVoltage.value.push(JSON.parse(JSON.stringify(listRippleVoltage.value[listRippleVoltage.value.length - 1]))) : listRippleVoltage.value.push(data)
break
}
}
}
/**
* 删除行公共方法
* @param checkoutList 选中的数组
* @param list 操作的数组
*/
const delRow = (checkoutList: IList[], list: IList[], title: string) => {
if (!checkoutList.length) {
ElMessage.warning('请选中要删除的行')
}
else {
let data = [] as any[]
data = differenceArray(list, checkoutList)
switch (title) {
case '直流电压': // 直流电压
listDirectVoltage.value = data
break
case '电源效应和负载效应': // 电源效应和负载效应
listEffect.value = data
break
case '直流电流(直接测量)': // 直流电流(直接测量)
listDCDirect.value = data
break
case '直流电流(间接测量)': // 直流电流(间接测量)
listDCIndirect.value = data
break
case '纹波电压': // 纹波电压
listRippleVoltage.value = data
break
}
}
}
// 多选
const handleSelectionChange = (e: any, type: string) => {
switch (type) {
case '直流电压': // 直流电压
checkoutDirectVoltageList.value = e
break
case '电源效应和负载效应': // 电源效应和负载效应
checkoutEffectList.value = e
break
case '直流电流(直接测量)': // 直流电流(直接测量)
checkoutDCIndirectList.value = e
break
case '直流电流(间接测量)': // 直流电流(间接测量)
checkoutDCDirectList.value = e
break
case '纹波电压': // 电流表示值误差(间接测量)
checkoutRippleVoltageList.value = e
break
}
}
// 表格下拉框等内容是否禁用
const disabled = ({ scope, column }: any, fun: any) => {
if (column.text === '核查类型') {
fun(true)
return
}
if (column.text === '是否为基准点') {
fun(true)
return
}
if (column.text === '循环次数') {
fun(true)
return
}
fun(pageType.value === 'detail')
}
// ---------------------------------------按钮-----------------------------------------------------
// 点击关闭
const close = () => {
$router.back()
}
// 清空配置
const clear = () => {
ElMessageBox.confirm(
'确认清空配置项吗?',
'提示',
{
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
},
)
.then(() => {
listDirectVoltage.value = []// 直流电压
listEffect.value = []// 电源效应和负载效应
listDCIndirect.value = []// 直流电流(间接测量)
listDCDirect.value = []// 直流电流(直接测量)
listRippleVoltage.value = []// 纹波电压
form.value.remark = ''
})
}
// 点击保存
const save = () => {
filterData()
const list = filterData()
console.log(list, 'list')
if (!list.length) { ElMessage.warning('核查项不能为空'); return false }
if (!checkAllList()) { return }
const params = {
itemCategoryId: form.value.itemCategoryId, // 核查项分类id
checkItemDataDcPowerList: list.map((item: any) => ({ ...item, equipmentId: equipmentId.value, remark: form.value.remark })),
equipmentId: equipmentId.value,
standardId: $route.query.standardId,
}
const loading = ElLoading.service({
lock: true,
text: '加载中',
background: 'rgba(255, 255, 255, 0.6)',
})
config(params).then((res) => {
ElMessage.success('已保存')
pageType.value = 'detail'
loading.close()
}).catch(() => {
loading.close()
})
}
// 获取详情
const getInfo = () => {
const loading = ElLoading.service({
lock: true,
text: '加载中',
background: 'rgba(255, 255, 255, 0.6)',
})
const params = {
equipmentId: equipmentId.value, // 设备id
belongStandardEquipment: form.value.belongStandardEquipment, // 检校标准装置code
itemCategoryId: form.value.itemCategoryId, // 核查项分类id
itemCategoryName: form.value.itemCategoryName, // 核查项分类名称
}
getCheckItemDetail(params).then((res) => {
if (!res.data.checkItemDataDcPowerList) {
loading.close()
return
}
const data = res.data?.checkItemDataDcPowerList?.map((item: any) => {
return {
...item,
resolution: Number(item.resolution),
checkType: JSON.parse(item.checkType),
datumPoint: String(item.datumPoint),
}
})
form.value.remark = data[0] ? data[0].remark : ''
const params = {
1: '直流电压',
2: '电源效应和负载效应',
3: '直流电流(直接测量)',
4: '直流电流(间接测量)',
5: '纹波电压',
} as { [key: string]: any }
const paramsDict = {
'直流电压': '1',
'电源效应和负载效应': '2',
'直流电流(直接测量)': '3',
'直流电流(间接测量)': '4',
'纹波电压': '5',
} as { [key: string]: any }
// 处理表格数据
data.forEach((item: any) => {
addRow([], Number(item.params) ? params[item.params] : item.params, Number(item.params) ? item.params : paramsDict[item.params], item)
})
// 处理表格选中状态
setTimeout(() => {
for (const i in listDict.value) {
checkedTable.value[checkedDict[i]] = listDict.value[i].length ? 1 : 0
}
})
loading.close()
})
}
// ------------------------------------------字典--------------------------------------------------
// 每个table对应的下拉框内容 字典
const tableDict = ref<{ [key: string]: { value: string;name: string;id: string }[] }>({})
// 单位
const unitList = ref<{ value: string;name: string;id: string }[]>([]) // 单位
const unitList1 = ref<{ value: string;name: string;id: string }[]>([]) // 单位A
// 电阻值单位
const resistanceUnit = ref<{ value: string;name: string;id: string }[]>([])
// 频率单位
const frequencyUnit = ref<{ value: string;name: string;id: string }[]>([])
// 核查类型
const checkTypeList = ref<{ value: string;name: string;id: string }[]>([])
// 核查点
const checkPointVoltage = ref<{ value: string;name: string;id: string }[]>([])
// 电阻值
const bizSecondStandardResistance = ref<{ value: string;name: string;id: string }[]>([])
// 频率
const bizSecondStandardFrequency = ref<{ value: string;name: string;id: string }[]>([])
// 获取字典
const fecthDict = async () => {
// 单位
const res1 = await getDictByCode('unitElectricalSignalV')
unitList.value = res1.data
// 核查类型
const res2 = await getDictByCode('bizFirstStandardCheckType')
checkTypeList.value = res2.data
// 单位A
const res3 = await getDictByCode('unitElectricalSignalA')
unitList1.value = res3.data
// 电阻值单位
const res4 = await getDictByCode('standardResistance')
resistanceUnit.value = res4.data
// 频率单位
const res5 = await getDictByCode('standardFrequencyUnit')
frequencyUnit.value = res5.data
// 核查点
const res6 = await getDictByCode('checkPointVoltage')
checkPointVoltage.value = res6.data
// 电阻值
const res7 = await getDictByCode('bizSecondStandardResistance')
bizSecondStandardResistance.value = res7.data
// 频率
const res8 = await getDictByCode('bizSecondStandardFrequency')
bizSecondStandardFrequency.value = res8.data
// table字典
tableDict.value = {
单位: unitList.value,
核查类型: checkTypeList.value,
// 电流单位: unitList1.value,
电阻值单位: resistanceUnit.value,
频率单位: frequencyUnit.value,
核查点: checkPointVoltage.value,
电阻值: bizSecondStandardResistance.value,
频率: bizSecondStandardFrequency.value,
}
}
fecthDict()
// 自定义下拉框内容
const customSelect = (data: any, fun: any) => {
if (data.column.text === '单位') {
fun(unitList1.value || [])
// fun(tableDict.value[data.text])
}
else {
fun(tableDict.value[data.text])
}
}
// ------------------------------------------钩子--------------------------------------------------
onMounted(() => {
form.value.equipmentNo = $route.query.equipmentNo as string // 统一编号
form.value.equipmentName = $route.query.equipmentName as string // 设备名称
form.value.model = $route.query.model as string // 型号规格
form.value.manufactureNo = $route.query.manufactureNo as string // 出厂编号
form.value.measureRange = $route.query.measureRange as string // 测量范围
form.value.uncertainty = $route.query.uncertainty as string // 不确定度或允许误差极限或准确度等级
form.value.itemCategoryName = $route.query.itemCategoryName as string // 核查项分类名称
form.value.itemCategoryId = $route.query.itemCategoryId as string // 核查项分类id
form.value.belongStandardEquipment = $route.query.belongStandardEquipment as string // 核查项标准装置id
form.value.belongStandardEquipmentName = $route.query.belongStandardEquipmentName as string // 核查项标准装置id
equipmentId.value = $route.query.equipmentId as string // 设备id
getInfo()
})
</script>
<template>
<app-container>
<detail-page v-loading="loading" :title="`配置核查项(${textMap[pageType]})`">
<template #btns>
<el-button v-if="pageType === 'edit'" type="warning" @click="clear">
清空配置
</el-button>
<el-button v-if="pageType === 'edit'" type="primary" @click="save">
保存
</el-button>
<el-button type="info" @click="close">
关闭
</el-button>
</template>
<el-form
ref="ruleFormRef"
:model="form"
:label-width="130"
label-position="right"
>
<el-row :gutter="24" class="marg">
<el-col :span="6">
<el-form-item label="统一编号:" prop="equipmentNo">
<el-input
v-model="form.equipmentNo"
disabled
:placeholder="pageType === 'detail' ? '' : '统一编号'"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="设备名称:" prop="equipmentName">
<el-input
v-model="form.equipmentName"
disabled
:placeholder="pageType === 'detail' ? '' : '设备名称'"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="型号规格:" prop="model">
<el-input
v-model="form.model"
disabled
:placeholder="pageType === 'detail' ? '' : '型号规格'"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="出厂编号:" prop="manufactureNo">
<el-input
v-model="form.manufactureNo"
disabled
:placeholder="pageType === 'detail' ? '' : '出厂编号'"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="测量范围:" prop="measureRange">
<el-input
v-model="form.measureRange"
disabled
type="textarea"
autosize
:placeholder="pageType === 'detail' ? '' : '测量范围'"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label-width="260" label="不确定度或允许误差极限或准确度等级:" prop="uncertainty">
<el-input
v-model="form.uncertainty"
type="textarea"
autosize
disabled
:placeholder="pageType === 'detail' ? '' : '不确定度或允许误差极限或准确度等级'"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="核查项分类名称:" prop="itemCategoryName">
<el-input
v-model="form.itemCategoryName"
disabled
:placeholder="pageType === 'detail' ? '' : '核查项分类名称'"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</detail-page>
<!-- 直流电压 -->
<template-table
:show="Boolean(checkedTable.directVoltage)"
:data="listDirectVoltage" :columns="columns_direct_voltage_DC_direct" :page-type="pageType" title="直流电压" index="1" :show-btn="pageType !== 'detail'"
:select-all-list="tableDict"
@disabled="disabled"
@selection-change="(e) => handleSelectionChange(e, '直流电压')"
@add-row="addRow"
@del-row="delRow"
>
<template #custom-check>
<el-checkbox v-model="checkedTable.directVoltage" :checked="true" :true-label="1" :false-label="0" :disabled="pageType === 'detail'">
直流电压
</el-checkbox>
</template>
</template-table>
<!-- 电源效应和负载效应 -->
<template-table
:show="Boolean(checkedTable.effect)"
:data="listEffect" :columns="columns_effect" :page-type="pageType" title="电源效应和负载效应" index="2" :show-btn="pageType !== 'detail'"
:select-all-list="tableDict"
@disabled="disabled"
@selection-change="(e) => handleSelectionChange(e, '电源效应和负载效应')"
@add-row="addRow"
@del-row="delRow"
>
<template #custom-check>
<el-checkbox v-model="checkedTable.effect" :checked="true" :true-label="1" :false-label="0" :disabled="pageType === 'detail'">
电源效应和负载效应
</el-checkbox>
</template>
</template-table>
<!-- 直流电流(直接测量) -->
<template-table
:show="Boolean(checkedTable.DCDirect)"
:data="listDCDirect" :columns="columns_direct_voltage_DC_direct" :page-type="pageType" title="直流电流(直接测量)" index="3" :show-btn="pageType !== 'detail'" :custom-select="true"
:select-all-list="tableDict"
@customSelect="customSelect"
@disabled="disabled"
@selection-change="(e) => handleSelectionChange(e, '直流电流(直接测量)')"
@add-row="addRow"
@del-row="delRow"
>
<template #custom-check>
<el-checkbox v-model="checkedTable.DCDirect" :checked="true" :true-label="1" :false-label="0" :disabled="pageType === 'detail'">
直流电流(直接测量)
</el-checkbox>
</template>
</template-table>
<!-- 直流电流(间接测量) -->
<template-table
:show="Boolean(checkedTable.DCIndirect)"
:data="listDCIndirect" :columns="columns_DC_indirect" :page-type="pageType" title="直流电流(间接测量)" index="4" :show-btn="pageType !== 'detail'" :custom-select="true"
:select-all-list="tableDict"
@customSelect="customSelect"
@disabled="disabled"
@selection-change="(e) => handleSelectionChange(e, '直流电流(间接测量)')"
@add-row="addRow"
@del-row="delRow"
>
<template #custom-check>
<el-checkbox v-model="checkedTable.DCIndirect" :checked="true" :true-label="1" :false-label="0" :disabled="pageType === 'detail'">
直流电流(间接测量)
</el-checkbox>
</template>
</template-table>
<!-- 纹波电压 -->
<template-table
:show="Boolean(checkedTable.rippleVoltage)"
:data="listRippleVoltage" :columns="columns_ripple_voltage" :page-type="pageType" title="纹波电压" index="5" :show-btn="pageType !== 'detail'"
:select-all-list="tableDict"
@disabled="disabled"
@selection-change="(e) => handleSelectionChange(e, '纹波电压')"
@add-row="addRow"
@del-row="delRow"
>
<template #custom-check>
<el-checkbox v-model="checkedTable.rippleVoltage" :checked="true" :true-label="1" :false-label="0" :disabled="pageType === 'detail'">
纹波电压
</el-checkbox>
</template>
</template-table>
<!-- 核查项备注 -->
<el-form
:model="form"
label-width="120"
label-position="right"
style="margin-top: 20px;"
>
<el-row>
<el-col :span="12">
<el-form-item label="核查项备注:" prop="remark">
<el-input
v-model="form.remark"
class="full-width-input"
autosize
type="textarea"
:disabled="pageType === 'detail'"
:placeholder="pageType === 'detail' ? ' ' : '请输入核查项备注'"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</app-container>
</template>