<!-- 第16套:低频信号源检定装置 --> <script lang="ts" setup name="TemplateDetailNinth"> import { ElMessage } from 'element-plus' import type { IList } from './templateDetail-interface' import templateTable from './templateTable.vue' import type { dictType } from '@/global' import { getDictByCode } from '@/api/system/dict' import { calc } from '@/utils/useCalc' import { useCheckList } from '@/commonMethods/useCheckList' import { calculate, recalculate } from '@/api/business/measure/caculate' import type { TableColumn } from '@/components/NormalTable/table_interface' import templateTable1 from '@/views/business/measure/item/components/second/templateTable.vue' import { differenceArray, setSelectList } from '@/utils/Array' import { clearSymbol } from '@/utils/String' const props = defineProps({ pageType: { type: String, default: 'add', }, itemCategoryName: { type: String, require: true, }, // 智能模型检定项分类名称 belongStandardEquipment: { // 检校标准装置code type: String, require: true, }, list: { type: Array as any, }, form: { // 检定项表单 type: Object as any, }, itemId: { // 检定项id type: String, default: '', }, }) const form = ref({ appearanceFunctionCheck: 1, // 外观及功能性检查 frequency: 1, // 频率 acVoltage: 1, // 交流电压 dcVoltage: 1, // 直流电压 riseTime: 1, // 上升时间 sinusoidFlatness: 1, // 正弦信号平坦度 harmonicDistortion: 1, // 总谐波失真 }) watch(() => props.form, (newVal) => { console.log(newVal, 'newVal') form.value = JSON.parse(JSON.stringify(newVal)) }, { deep: true, immediate: true, }) const tableLoading = ref(false) const list = ref<IList[]>([]) // 全部数据 const frequencyList = ref<IList[]>([]) // 频率 const acVoltageList = ref<IList[]>([]) // 交流电压 const dcVoltageList = ref<IList[]>([]) // 直流电压 const riseTimeList = ref<IList[]>([]) // 上升时间 const sinusoidFlatnessList = ref<IList[]>([]) // 正弦信号平坦度 const harmonicDistortionList = ref<IList[]>([]) // 总谐波失真 // 表格数据对应 list 字典 const listDict = ref<{ [key: string]: any }>([]) watch(() => [props.form, form.value, frequencyList.value, acVoltageList.value, dcVoltageList.value, riseTimeList.value, sinusoidFlatnessList.value, harmonicDistortionList.value], () => { listDict.value = { '1-频率': frequencyList.value || [], '2-交流电压': acVoltageList.value || [], '3-直流电压': dcVoltageList.value || [], '4-上升时间': riseTimeList.value || [], '5-正弦信号平坦度': sinusoidFlatnessList.value || [], '6-总谐波失真': harmonicDistortionList.value || [], } list.value = [] for (const i in listDict.value) { list.value = [...list.value, ...listDict.value[i]] } }, { deep: true, }) // 表格对应的 选择状态 let chekedDict = {} as { [key: string]: any } watch(() => [form.value], () => { chekedDict = { '1-频率': form.value.frequency, '2-交流电压': form.value.acVoltage, '3-直流电压': form.value.dcVoltage, '4-上升时间': form.value.riseTime, '5-正弦信号平坦度': form.value.sinusoidFlatness, '6-总谐波失真': form.value.harmonicDistortion, } }, { deep: true, }) // ----------------------------------------表头------------------------------------------------ const columns_frequency = ref<TableColumn[]>([ // 频率 { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, { text: '标称值单位', value: 'unit', align: 'center', required: true, type: 'select' }, { text: '幅度', value: 'amplitude', align: 'center', required: true, type: 'number' }, { text: '幅度单位', value: 'amplitudeUnit', align: 'center', required: true, type: 'select' }, { text: '有效位数', value: 'validDigit', align: 'center', required: true, type: '' }, { text: '技术指标', value: 'technicalIndex', align: 'center', required: false, type: 'number' }, ]) const columns_ac_voltage = ref<TableColumn[]>([ // 交流电压 { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, { text: '标称值单位', value: 'unit', align: 'center', required: true, type: 'select' }, { text: '交流频率', value: 'acFrequency', align: 'center', required: true, type: 'number' }, { text: '交流频率单位', value: 'acFrequencyUnit', align: 'center', required: true, type: 'select' }, { text: '技术指标', value: 'technicalIndex', align: 'center', required: false, type: '', width: '350' }, ]) const columns_dc_voltage = ref<TableColumn[]>([ // 直流电压 { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '标称值', value: 'nominalValue', align: 'center', required: true, type: 'number' }, { text: '标称值单位', value: 'unit', align: 'center', required: true, type: 'select' }, { text: '技术指标', value: 'valueTwo', align: 'center', required: false, width: '400' }, ]) const columns_rise_time = ref<TableColumn[]>([ // 上升时间 { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '频率', value: 'frequency', align: 'center', required: true, type: 'number' }, { text: '频率单位', value: 'frequencyUnit', align: 'center', required: true, type: 'select' }, { text: '幅度', value: 'amplitude', align: 'center', required: true, type: 'number' }, { text: '幅度单位', value: 'amplitudeUnit', align: 'center', required: true, type: 'select' }, { text: '技术指标', value: 'technicalIndex', align: 'center', required: false, type: 'number', width: '350' }, ]) const columns_sinusoid_flatness = ref<TableColumn[]>([ // 正弦信号平坦度 { text: '检定项目', value: 'params', align: 'center', required: true, type: 'text' }, { text: '电压', value: 'voltage', align: 'center', required: true, type: 'number' }, { text: '电压单位', value: 'voltageUnit', align: 'center', required: true, type: 'select' }, { text: '频率点', value: 'frequency', align: 'center', required: true, type: 'number' }, { text: '频率点单位', value: 'frequencyUnit', align: 'center', required: true, type: 'select' }, { text: '是否为基准点', value: 'datumPoint', align: 'center', required: true, type: 'radio' }, { text: '技术指标', value: 'technicalIndex', align: 'center', required: false, type: 'number' }, ]) const columns_harmonic_distortion = columns_rise_time.value // --------------------------------表格操作--------------------------------------------------- // 表格对应 columns字典 const columnsDict = ref<{ [key: string]: any }>( { '1-频率': columns_frequency.value, '2-交流电压': columns_ac_voltage.value, '3-直流电压': columns_dc_voltage.value, '4-上升时间': columns_rise_time.value, '5-正弦信号平坦度': columns_sinusoid_flatness.value, '6-总谐波失真': columns_rise_time.value, }, ) // watch(() => props.pageType, (newVal) => { // if (newVal === 'detail') { // for (const i in columnsDict.value) { // for (const y in columnsDict.value[i]) { // columnsDict.value[i][y].type = 'text' // } // } // } // }, { // deep: true, // immediate: true, // }) /** * 增加行公共方法 * @param list 要操作的数组 * @param title 操作的表格 */ const addRow = (list: IList[], title: string, index: string) => { if (checkList(list, columnsDict.value[`${index}-${title}`], `${title}表格`)) { const params = { nominalValue: '', // 标称值 unit: '', // 标称值单位 amplitude: '', // 幅度 amplitudeUnit: '', // 幅度单位 validDigit: '', // 有效位数 technicalIndex: '', // 技术指标 technicalIndexSymbol: '±', // 技术指标前符号 acFrequency: '', // 交流频率 acFrequencyUnit: '', // 交流频率单位 valueOne: '', // 数值1 valueTwo: '', // 数值2 frequency: '', // 频率 frequencyUnit: '', // 频率单位 voltage: '', // 电压 voltageUnit: '', // 电压单位 datumPoint: '', // 是否为参考点 technicalIndexUnit: '', // 技术指标单位 } switch (title) { case '频率': // 频率 frequencyList.value.length ? frequencyList.value.push(JSON.parse(JSON.stringify({ ...frequencyList.value[frequencyList.value.length - 1], id: `custom-${new Date().getTime()}` }))) : frequencyList.value.push({ dataType: '1', params: '频率', ...params, editable: true, id: `custom-${new Date().getTime()}`, } as any) break case '交流电压': // 交流电压 acVoltageList.value.length ? acVoltageList.value.push(JSON.parse(JSON.stringify({ ...acVoltageList.value[acVoltageList.value.length - 1], id: `custom-${new Date().getTime()}` }))) : acVoltageList.value.push({ dataType: '2', params: '交流电压', ...params, editable: true, technicalIndexUnit: 'mV', id: `custom-${new Date().getTime()}`, } as any) break case '直流电压': // 直流电压 dcVoltageList.value.length ? dcVoltageList.value.push(JSON.parse(JSON.stringify({ ...dcVoltageList.value[dcVoltageList.value.length - 1], id: `custom-${new Date().getTime()}` }))) : dcVoltageList.value.push({ dataType: '3', params: '直流电压', ...params, editable: true, id: `custom-${new Date().getTime()}`, } as any) break case '上升时间': // 上升时间 riseTimeList.value.length ? riseTimeList.value.push(JSON.parse(JSON.stringify({ ...riseTimeList.value[riseTimeList.value.length - 1], id: `custom-${new Date().getTime()}` }))) : riseTimeList.value.push({ dataType: '4', params: '上升时间', ...params, frequency: '1', editable: true, id: `custom-${new Date().getTime()}`, } as any) break case '正弦信号平坦度': // 正弦信号平坦度 sinusoidFlatnessList.value.length ? sinusoidFlatnessList.value.push(JSON.parse(JSON.stringify({ ...sinusoidFlatnessList.value[sinusoidFlatnessList.value.length - 1], id: `custom-${new Date().getTime()}`, datumPoint: sinusoidFlatnessList.value.every((item: any) => item.datumPoint === '0') ? '1' : '0' } as any))) : sinusoidFlatnessList.value.push({ dataType: '5', params: '正弦信号平坦度', ...params, datumPoint: '1', technicalIndexUnit: 'dB', editable: true, id: `custom-${new Date().getTime()}`, } as any) break case '总谐波失真': // 总谐波失真 harmonicDistortionList.value.length ? harmonicDistortionList.value.push(JSON.parse(JSON.stringify({ ...harmonicDistortionList.value[harmonicDistortionList.value.length - 1], id: `custom-${new Date().getTime()}` }))) : harmonicDistortionList.value.push({ dataType: '6', params: '总谐波失真', ...params, technicalIndexUnit: '%', // 技术指标单位 editable: true, id: `custom-${new Date().getTime()}`, } as any) 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 '频率': // 频率 frequencyList.value = data break case '交流电压': // 交流电压 acVoltageList.value = data break case '直流电压': // 直流电压 dcVoltageList.value = data break case '上升时间': // 上升时间 riseTimeList.value = data break case '正弦信号平坦度': // 正弦信号平坦度 sinusoidFlatnessList.value = data break case '总谐波失真': // 总谐波失真 harmonicDistortionList.value = data break } } } // ---------------------------------------------校验--------------------------------------------------- // 校验表格(点击保存的时候用、生成标准器示值) function checkList(list: any[], columns: any[], title: string) { return useCheckList(list, columns, title) } // 校验所有表格 function checkAllList() { let result = true for (const i in columnsDict.value) { console.log(i, chekedDict) if (!Number(chekedDict[i])) { result = true } else { const requireLength = !!((chekedDict[i] === '1' || chekedDict[i] === 1) && chekedDict[i]) if (!useCheckList(listDict.value[i], columnsDict.value[i], i.substring(2), '', '', '', requireLength)) { result = false break } } } return result } // ----------------------------------------------------------------------------------------------------- const clearAllList = () => { list.value = [] frequencyList.value = [] acVoltageList.value = [] dcVoltageList.value = [] riseTimeList.value = [] sinusoidFlatnessList.value = [] harmonicDistortionList.value = [] for (const i in listDict.value) { listDict.value[i] = [] } } watch(() => props.list, (newVal) => { // 检定项表格 if (newVal) { clearAllList() newVal.forEach((item: any) => { switch (item.dataType) { case '1': // 频率 frequencyList.value.push({ ...item, params: '频率', technicalIndex: clearSymbol(item.technicalIndex), editable: props.pageType !== 'detail' }) break case '2': // 交流电压 acVoltageList.value.push({ ...item, technicalIndexUnit: 'mV', params: '交流电压', technicalIndex: clearSymbol(item.technicalIndex), editable: props.pageType !== 'detail' }) break case '3': // 直流电压 dcVoltageList.value.push({ ...item, params: '直流电压', technicalIndex: clearSymbol(item.technicalIndex), editable: props.pageType !== 'detail' }) break case '4': // 上升时间 riseTimeList.value.push({ ...item, params: '上升时间', technicalIndex: clearSymbol(item.technicalIndex), editable: props.pageType !== 'detail' }) break case '5': // 正弦信号平坦度 sinusoidFlatnessList.value.push({ ...item, params: '正弦信号平坦度', technicalIndex: clearSymbol(item.technicalIndex), editable: props.pageType !== 'detail' }) break case '6': // 总谐波失真 harmonicDistortionList.value.push({ ...item, params: '总谐波失真', technicalIndex: clearSymbol(item.technicalIndex), editable: props.pageType !== 'detail' }) break } }) } }) const getList = () => { let result = [] as any[] for (const i in chekedDict) { if ((chekedDict[i] === '1' || chekedDict[i] === 1) && chekedDict[i]) { const data = listDict.value[i].map((item: any) => ({ ...item, // technicalIndex: item.technicalIndexSymbol ? `${item.technicalIndexSymbol}${item.technicalIndex}` : '/', technicalIndex: item.technicalIndex === 0 ? '0' : item.technicalIndex ? item.technicalIndex : '/', valueOne: item.valueOne === 0 ? '0' : item.valueOne ? item.valueOne : '/', valueTwo: item.valueTwo === 0 ? '0' : item.valueTwo ? item.valueTwo : '/', })) result = [...result, ...data] } } result.forEach((item: any) => { if (item.dataType === '3' || item.dataType === '2') { item.technicalIndex = item.technicalIndex.includes('/') ? '/' : clearSymbol(item.technicalIndex) ? item.technicalIndex : Number(item.valueOne) * 0.01 * (item.unit === 'mV' ? 1 : item.unit === 'V' ? 1000 : item.unit === 'kV' ? 1000000 : item.unit === 'μV' ? 0.001 : 1) + Number(item.valueTwo) } }) return result } defineExpose({ list, checkAllList, form, getList }) // 表格下拉框等内容是否禁用 const disabled = ({ scope, column }, fun) => { if (column.text === '是否为基准点') { fun(true) return } fun(props.pageType === 'detail') } // 每个table对应的下拉框内容 字典 const tableDict = ref<{ [key: string]: { value: string; name: string; id: string }[] }>({}) const changeLoadSituationa = (value: any, index: number, text: string, type: string, list: any[], item: string) => { if (item === '正弦信号平坦度') { if (text === '是否为基准点') { if (value === '1') { list.forEach((citem: any, cindex: number) => { list[cindex].datumPoint = '0' }) list[index].datumPoint = '1' } else { if (list.every((item: { datumPoint: any }) => item.datumPoint === '0' || item.datumPoint === 0)) { list[0].datumPoint = '1' } } } } } // 获取字典 const nominalValueUnit = ref<{ value: string; name: string; id: string }[]>([]) // 标称值单位 const amplitudeUnit = ref<{ value: string; name: string; id: string }[]>([]) // 幅度单位 const symbolList = ref<{ value: string; name: string; id: string }[]>([]) // 技术指标符号 const standardVoltage = ref<{ value: string; name: string; id: string }[]>([]) // 电压单位 const TechnicalIndexSymbolList = ref<{ value: string; name: string; id: string }[]>([]) // 技术指标前符号 const secondList = ref<{ value: string; name: string; id: string }[]>([]) // 秒单位 const fetchDict = async () => { // 标称值单位 const res1 = await getDictByCode('standardFrequencyUnit') nominalValueUnit.value = res1.data // 幅度单位 const res2 = await getDictByCode('standardAmplitudeUnit') amplitudeUnit.value = res2.data // 技术指标符号 const res6 = await getDictByCode('standardTechnicalIndexSymbol') symbolList.value = res6.data // 电压单位 const res7 = await getDictByCode('standardVoltage') standardVoltage.value = res7.data // 技术指标前符号 const res8 = await getDictByCode('standardTechnicalIndexSymbol') TechnicalIndexSymbolList.value = res8.data // 秒单位 const res9 = await getDictByCode('standardSecondUnit') secondList.value = res9.data tableDict.value = { 标称值单位: nominalValueUnit.value, 交流频率单位: nominalValueUnit.value, 频率单位: nominalValueUnit.value, 幅度单位: amplitudeUnit.value, 频率点单位: nominalValueUnit.value, 电压单位: standardVoltage.value, } } fetchDict() // 自定义下拉框内容 const customSelect = (data: any, fun: any) => { // console.log(data, 'data') if ((data.title === '交流电压' || data.title === '直流电压') && data.text === '标称值单位') { fun(standardVoltage.value) } else { fun(tableDict.value[data.text]) } } </script> <template> <div style="padding: 0 10px;"> <el-checkbox v-model="form.appearanceFunctionCheck" :checked="true" :true-label="1" :false-label="0" :disabled="pageType === 'detail'" > 外观及功能性检查 </el-checkbox> </div> <!-- 频率 --> <template-table1 :show="Boolean(form.frequency)" :data="frequencyList" :columns="columns_frequency" :page-type="pageType" title="频率" index="1" :show-btn="pageType !== 'detail'" :select-all-list="tableDict" @disabled="disabled" @add-row="addRow" @del-row="delRow" @change-load-situationa="changeLoadSituationa" > <template #custom-check> <el-checkbox v-model="form.frequency" :checked="true" :true-label="1" :false-label="0" :disabled="pageType === 'detail'" > 频率 </el-checkbox> </template> <template #pre-content="{ scope, column }"> <template v-if="column.text === '技术指标'"> {{ scope.technicalIndexSymbol }} </template> <template v-if="column.text === '有效位数'"> <precision-input-number v-model="scope.validDigit" controls-position="right" :min="1" placeholder="有效位数" :disabled="pageType === 'detail'" style="width: 100%;" :precision="0" /> </template> </template> </template-table1> <!-- 交流电压 --> <template-table1 :show="Boolean(form.acVoltage)" :data="acVoltageList" :columns="columns_ac_voltage" :page-type="pageType" title="交流电压" index="2" :show-btn="pageType !== 'detail'" :select-all-list="tableDict" :custom-select="true" @disabled="disabled" @add-row="addRow" @del-row="delRow" @custom-select="customSelect" @change-load-situationa="changeLoadSituationa" > <template #custom-check> <el-checkbox v-model="form.acVoltage" :checked="true" :true-label="1" :false-label="0" :disabled="pageType === 'detail'" > 交流电压 </el-checkbox> </template> <!-- 符号 --> <template #pre-content="{ scope, column }"> <template v-if="column.text === '技术指标'"> {{ scope.technicalIndexSymbol }} </template> </template> <!-- 技术指标 --> <template #next-content="{ scope, column }"> <template v-if="column.text === '技术指标'"> <span style="display: inline-block;"> (</span> <precision-input-number v-model="scope.valueOne" controls-position="right" placeholder="数值" style="width: 80px;" :disabled="pageType === 'detail'" /> <span style="display: inline-block;">%</span> <el-input v-model="scope.nominalValue" placeholder="标称值" disabled style="width: 80px;" /> <span style="display: inline-block;">+</span> <precision-input-number v-model="scope.valueTwo" controls-position="right" placeholder="数值" style="width: 80px;" :disabled="pageType === 'detail'" /> <span style="display: inline-block;">mV )</span> </template> </template> </template-table1> <!-- 直流电压 --> <template-table1 :show="Boolean(form.dcVoltage)" :data="dcVoltageList" :columns="columns_dc_voltage" :page-type="pageType" title="直流电压" index="3" :show-btn="pageType !== 'detail'" :select-all-list="tableDict" :custom-select="true" @disabled="disabled" @custom-select="customSelect" @add-row="addRow" @del-row="delRow" @change-load-situationa="changeLoadSituationa" > <template #custom-check> <el-checkbox v-model="form.dcVoltage" :checked="true" :true-label="1" :false-label="0" :disabled="pageType === 'detail'" > 直流电压 </el-checkbox> </template> <template #pre-content="{ scope, column }"> <template v-if="column.text === '技术指标'"> {{ scope.technicalIndexSymbol }} </template> </template> <!-- 技术指标 --> <template #next-content="{ scope, column }"> <template v-if="column.text === '技术指标'"> <span style="display: inline-block;"> (</span> <precision-input-number v-model="scope.valueOne" controls-position="right" placeholder="数值" style="width: 80px;" :disabled="pageType === 'detail'" /> <span style="display: inline-block;">%</span> <el-input v-model="scope.nominalValue" placeholder="标称值" disabled style="width: 80px;" /> <span style="display: inline-block;">+</span> <precision-input-number v-model="scope.valueTwo" controls-position="right" placeholder="数值" style="width: 80px;" :disabled="pageType === 'detail'" /> <span style="display: inline-block;">mV )</span> </template> </template> </template-table1> <!-- 上升时间 --> <template-table1 :show="Boolean(form.riseTime)" :data="riseTimeList" :columns="columns_rise_time" :page-type="pageType" title="上升时间" index="4" :show-btn="pageType !== 'detail'" :select-all-list="tableDict" @disabled="disabled" @add-row="addRow" @del-row="delRow" @change-load-situationa="changeLoadSituationa" > <template #custom-check> <el-checkbox v-model="form.riseTime" :checked="true" :true-label="1" :false-label="0" :disabled="pageType === 'detail'" > 上升时间 </el-checkbox> </template> <template #pre-content="{ scope, column }"> <template v-if="column.text === '技术指标'"> <el-select v-model="scope.technicalIndexSymbol" :disabled="pageType === 'detail'" style="width: 110px;"> <el-option v-for="item of TechnicalIndexSymbolList" :key="item.value" :label="item.name" :value="item.name" /> </el-select> </template> </template> <template #next-content="{ scope, column }"> <template v-if="column.text === '技术指标'"> <el-select v-model="scope.technicalIndexUnit" :disabled="pageType === 'detail'" placeholder=" " style="width: 120px;" > <el-option v-for="item of secondList" :key="item.value" :label="item.name" :value="item.name" /> </el-select> </template> </template> </template-table1> <!-- 正弦信号平坦度 --> <template-table1 :show="Boolean(form.sinusoidFlatness)" :data="sinusoidFlatnessList" :columns="columns_sinusoid_flatness" :page-type="pageType" title="正弦信号平坦度" index="5" :show-btn="pageType !== 'detail'" :select-all-list="tableDict" :custom-select="true" @disabled="disabled" @custom-select="customSelect" @add-row="addRow" @del-row="delRow" @change-load-situationa="changeLoadSituationa" > <template #custom-check> <el-checkbox v-model="form.sinusoidFlatness" :checked="true" :true-label="1" :false-label="0" :disabled="pageType === 'detail'" > 正弦信号平坦度 </el-checkbox> </template> <template #pre-content="{ scope, column }"> <template v-if="column.text === '技术指标'"> <el-select v-model="scope.technicalIndexSymbol" :disabled="pageType === 'detail'" style="width: 110px;"> <el-option v-for="item of TechnicalIndexSymbolList" :key="item.value" :label="item.name" :value="item.name" /> </el-select> </template> </template> <template #next-content="{ scope, column }"> <template v-if="column.text === '技术指标'"> <!-- {{ scope.technicalIndexUnit }} --> <span v-for="item in scope.technicalIndexUnit" :key="item" style="display: inline-block;">{{ item }}</span> </template> </template> </template-table1> <!-- 总谐波失真 --> <template-table1 :show="Boolean(form.harmonicDistortion)" :data="harmonicDistortionList" :columns="columns_harmonic_distortion" :page-type="pageType" title="总谐波失真" index="6" :show-btn="pageType !== 'detail'" :select-all-list="tableDict" :custom-select="true" @disabled="disabled" @custom-select="customSelect" @add-row="addRow" @del-row="delRow" @change-load-situationa="changeLoadSituationa" > <template #custom-check> <el-checkbox v-model="form.harmonicDistortion" :checked="true" :true-label="1" :false-label="0" :disabled="pageType === 'detail'" > 总谐波失真 </el-checkbox> </template> <template #pre-content="{ scope, column }"> <template v-if="column.text === '技术指标'"> <el-select v-model="scope.technicalIndexSymbol" :disabled="pageType === 'detail'" style="width: 110px;"> <el-option v-for="item of TechnicalIndexSymbolList" :key="item.value" :label="item.name" :value="item.name" /> </el-select> </template> </template> <template #next-content="{ column }"> <template v-if="column.text === '技术指标'"> % <!-- {{ scope.technicalIndexUnit }} --> <!-- <span v-for="item in scope.technicalIndexUnit" :key="item" style="display: inline-block;">{{ item }}</span> --> </template> </template> </template-table1> </template>