Newer
Older
xc-business-system / src / views / business / measure / item / components / fourth / templateDetail.vue
dutingting on 9 Jan 2024 28 KB 二等铂配置检定项(80%)
<!-- 第四套:0.02级活塞式压力计标准装置数据 -->
<script lang="ts" setup name="TemplateDetailFourth">
import type { IList } from './templateDetail-interface'
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 { getDataNum, getDataUnit } from '@/utils/validate'
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 list = ref<IList[]>([]) // 表格数据
const ruleFormRef = ref() // 表单ref
const tableLoading = ref(false)
const form = ref({
  rangeUpper: 0, // 量程上限
  rangeLower: 0, // 量程下限
  rangeUnit: '', // 量程单位
  generateWay: '', // 生成方式
  points: 3, // 检定点个数
  measureMedium: '', // 检定介质
  division: 0, // 分度值的1/5
  accuracyLevelLower: '', // 准确度等级(量程上限90%以下)
  accuracyLevelUpper: 0, // 准确度等级(量程上限90%及以上)
  zeroPosition: '0', // 零位是否带止销

  accuracyLevel: 0, //	准确度等级
  cycleNumber: 1, //	循环次数
  deviationAndSwitching: '',	// 设定点偏差及切换差
  displayValueOne: '', //		设定标准器示值1
  displayValueThree: '', //		设定标准器示值3
  displayValueTwo: '', //		设定标准器示值2
  id: '',
  itemId: props.itemId, // 检定项id
  lastCycleSensitivity: '/', //	上一周期灵敏度b0(从检定数据中查)
  supplyVoltage: 24, //	供电电压
  supplyVoltageUnit: '', // 供电电压单位
  zeroPositionStop: '', //	零位(带止销)

  appearance: true, // 外观
  tightness: false, // 密封性
  insulationResistance: true, // 绝缘电阻
  pointerDeflectionStability: false, // 指针偏转平稳性
  zeroDrift: true, // 零位漂移
  indicationError: true, // 示值误差、回程误差、轻敲位移

})

// 校验规则
const rules = ref({
  rangeUpper: [{ required: true, message: '量程上限不能为空', trigger: ['blur', 'change'] }],
  rangeLower: [{ required: true, message: '量程下限不能为空', trigger: ['blur', 'change'] }],
  rangeUnit: [{ required: true, message: '量程单位不能为空', trigger: ['blur', 'change'] }],
  points: [{ required: true, message: '检定点个数不能为空', trigger: ['blur', 'change'] }],
  generateWay: [{ required: true, message: '生成方式不能为空', trigger: ['blur', 'change'] }],
  measureMedium: [{ required: true, message: '检定介质不能为空', trigger: ['blur', 'change'] }],
  division: [{ required: true, message: '分度值的1/5不能为空', trigger: ['blur', 'change'] }],
  accuracyLevelLower: [{ required: true, message: '准确度等级(量程上限90%以下)不能为空', trigger: ['blur', 'change'] }],
  accuracyLevelUpper: [{ required: true, message: '准确度等级(量程上限90%及以上)不能为空', trigger: ['blur', 'change'] }],
  zeroPosition: [{ required: true, message: '零位是否带止销不能为空', trigger: ['blur', 'change'] }],
  accuracyLevel: [{ required: true, message: '准确度等级不能为空', trigger: ['blur', 'change'] }],
})
// ----------------------------------------表头------------------------------------------------
const columns = ref([]) as any // 表头数据
const columns_piezometer = ref([ // 一般压力表、精密压力表、电接点一般压力表
  { text: '标准器示值', value: 'indicatingValue', align: 'center', required: true, width: '220' },
  { text: '检定介质', value: 'measureMedium', align: 'center', width: '120', required: true },
  { text: '准确度等级', value: 'accuracyClass', align: 'center', width: '120', required: true },
  { text: '最大允许误差', value: 'maximumError', align: 'center' },
  { text: '回程误差允许值', value: 'returnError', align: 'center' },
  { text: '轻敲位移允许值', value: 'frictionError', align: 'center', required: true },
  { text: '示值误差允许值', value: 'indicatingError', align: 'center', required: true },
  { text: '零位是/否带止销', value: 'zeroPosition', align: 'center', required: true },
])
const columns_pressure_transmitter = ref([ // 压力变送器
  { text: '标准器示值', value: 'indicatingValue', align: 'center', required: true, width: '220' },
  { text: '理论输出值(mA)', value: 'theoreticalOutputValue', align: 'center', required: true },
  { text: '示值误差允许误差', value: 'indicatingError', align: 'center', required: true },
  { text: '回程允许误差', value: 'returnError', align: 'center' },
])

const columns_pressure_sensor = ref([ // 压力传感器
  { text: '标准器示值', value: 'indicatingValue', align: 'center', required: true, width: '220' },
  { text: '理论输出值(mA)', value: 'theoreticalOutputValue', align: 'center', required: true },
])

const columns_digital_pressure_gauge = ref([ // 数字压力计
  { text: '标准器示值', value: 'indicatingValue', align: 'center', required: true, width: '220' },
  { text: '检定介质', value: 'measureMedium', align: 'center', width: '120', required: true },
  { text: '准确度等级', value: 'accuracyClass', align: 'center', width: '120', required: true },
  { text: '最大允许误差', value: 'maximumError', align: 'center' },
  { text: '示值误差允许值', value: 'indicatingError', align: 'center', required: true },
  { text: '回程误差允许值', value: 'returnError', align: 'center' },
])

// ------------------------------------------字典----------------------------------------------
const generateWayList = ref<dictType[]>([]) // 生成方式
const measureMediumList = ref<dictType[]>([]) // 检定介质
const measureMediumMap = ref({}) as any // 检定介质
const accuracyLevelLowerMap = ref({}) as any // 准确度等级
const accuracyLevelLowerList = ref<dictType[]>([]) // 准确度等级(量程上限90%以下)
const rangeUnitList = ref<dictType[]>([]) // 量程单位
const accuracyLevel_digitalPressureGaugeList = ref<dictType[]>([]) // 准确度等级-数字压力计
const accuracyLevel_precisioPressureGaugeList = ref<dictType[]>([]) // 准确度等级-精密压力表
const supplyVoltageUnitList = ref<dictType[]>([]) // 供电电压单位

/**
 * 获取字典
 */
function getDict() {
  // 生成方式
  getDictByCode('generateWay').then((response) => {
    generateWayList.value = response.data
  })
  // 检定介质
  getDictByCode('easureMedium').then((response) => {
    measureMediumList.value = response.data
    response.data.forEach((item: { value: string; name: string }) => {
      measureMediumMap.value[`${item.value}`] = item.name
    })
  })
  // 准确度等级(量程上限90%以下)
  getDictByCode('accuracyLevelLower').then((response) => {
    accuracyLevelLowerList.value = response.data
    response.data.forEach((item: { value: string; name: string }) => {
      accuracyLevelLowerMap.value[`${item.value}`] = item.name
    })
  })
  // 量程单位
  getDictByCode('rangeUnit').then((response) => {
    rangeUnitList.value = response.data
  })
  // 准确度等级-数字压力计
  getDictByCode('accuracyLevel_digitalPressureGauge').then((response) => {
    accuracyLevel_digitalPressureGaugeList.value = response.data
  })
  // 准确度等级-精密压力表
  getDictByCode('accuracyLevel_precisioPressureGauge').then((response) => {
    accuracyLevel_precisioPressureGaugeList.value = response.data
  })
  // 供电电压单位
  getDictByCode('supplyVoltageUnit').then((response) => {
    supplyVoltageUnitList.value = response.data
  })
}

getDict()
// ---------------------------------------------校验---------------------------------------------------
// 校验表格(点击保存的时候用、生成标准器示值)
const checkList = () => {
  return useCheckList(list.value, columns.value, '检定项表格')
}
// ------------------------------------------------------------------------------------------------
/**
* 计算理论输出值
* @param rangeLower 量程下限
* @param rangeUpper 量程上限
* @param indicatingValue 标准器示值、当前量程
*/
function theoreticalOutput(rangeLower: number, rangeUpper: number, indicatingValue: number) {
  const rangeUpperSubRangeLower = calc(rangeUpper, rangeLower, '-') // 量程上限-下限
  const indicatingValueSubrangeLower = calc(indicatingValue, rangeLower, '-') // 当前量程-下限
  const multiResult = calc(rangeUpperSubRangeLower, indicatingValueSubrangeLower, '*') // 乘法结果
  const result = calc(calc(16, multiResult, '/'), 4, '+')
  return Number(result).toFixed(3)
}
// 点击生成标准器示值
const calculateData = () => {
  ruleFormRef.value!.validate((valid: boolean) => {
    if (valid) {
      const params = {
        belongStandardEquipment: props.belongStandardEquipment, // 检校标准装置
        itemCategoryName: props.itemCategoryName, // 检定项分类名称
        measureItemConfigPistonGauge: {
          ...form.value,
          itemId: props.itemId, // 检定项id
          appearance: form.value.appearance, // 外观
          tightness: form.value.tightness, // 密封性
          insulationResistance: form.value.insulationResistance, // 绝缘电阻
          pointerDeflectionStability: form.value.pointerDeflectionStability, // 指针偏转平稳性
          zeroDrift: form.value.zeroDrift, // 零位漂移
          indicationError: form.value.indicationError, // 示值误差、回程误差、轻敲位移
        },
      }
      tableLoading.value = true
      calculate(params).then((res) => {
        list.value = res.data.map((item: IList, index: number) => {
          let indicatingValue = 0 // 计算标准器示值
          if (list.value.length === 1) { // 检定点为1个,取量程下限
            indicatingValue = form.value.rangeLower
          }
          else {
            const step = calc(Number(calc(form.value.rangeUpper, form.value.rangeLower, '-')), form.value.points - 1, '/')
            indicatingValue = Number(calc(form.value.rangeLower, calc(step, index, '*'), '+'))
          }
          return {
            ...item,
            measureMedium: measureMediumMap.value[`${item.measureMedium}`], // 检定介质
            zeroPosition: item.zeroPosition ? '是' : '否', // 零位是否带止销
            indicatingValue: `${form.value.generateWay}` === '1' ? indicatingValue : '', // 平分点法取值标准器示值
          }
        })
        tableLoading.value = false
      })
    }
  })
}
// 点击重新计算
const recalculateData = () => {
  ruleFormRef.value!.validate((valid: boolean) => {
    if (valid) {
      const params = {
        belongStandardEquipment: props.belongStandardEquipment, // 检校标准装置
        itemCategoryName: props.itemCategoryName, // 检定项分类名称
        measureItemConfigPistonGauge: {
          ...form.value,
          itemId: props.itemId, // 检定项id
          appearance: form.value.appearance, // 外观
          tightness: form.value.tightness, // 密封性
          insulationResistance: form.value.insulationResistance, // 绝缘电阻
          pointerDeflectionStability: form.value.pointerDeflectionStability, // 指针偏转平稳性
          zeroDrift: form.value.zeroDrift, // 零位漂移
          indicationError: form.value.indicationError, // 示值误差、回程误差、轻敲位移
        },
        measureItemDataPistonGaugeList: list.value.map((item) => {
          return {
            ...item,
            zeroPosition: item.zeroPosition !== '否',
          }
        }), // 检定项数据
      }
      tableLoading.value = true
      recalculate(params).then((res) => {
        list.value = res.data.map((item: IList, index: number) => {
          return {
            ...item,
            // measureMedium: measureMediumMap.value[`${item.measureMedium}`], // 检定介质
            zeroPosition: item.zeroPosition ? '是' : '否', // 零位是否带止销
          }
        })
        tableLoading.value = false
      })
    }
  })
}
// ----------------------------------------------电接点一般压力表---------------------------------
const showValueTwo = ref(false) // 是否显示第2个
const showValueThree = ref(false) // 是否显示第3个
// 点击增加设定标准器示值
const addValue = () => {
  if (!showValueTwo.value) {
    showValueTwo.value = true
  }
  else {
    showValueThree.value = true
  }
}

// -----------------------------------------------------------------------------------------------------

watch(() => props.itemCategoryName, (newValue) => {
  if (newValue === '一般压力表' || newValue === '精密压力表' || newValue === '电接点一般压力表') {
    columns.value = columns_piezometer.value
  }
  else if (newValue === '压力变送器') {
    columns.value = columns_pressure_transmitter.value
  }
  else if (newValue === '压力传感器') {
    columns.value = columns_pressure_sensor.value
  }
  else if (newValue === '数字压力计') {
    columns.value = columns_digital_pressure_gauge.value
  }
}, { immediate: true })

// 监听准确度等级(量程上限90%以下)和监听准确度等级(量程上限90%以上)对应关系
const accuracyLevelMap: { [key: string]: string } = {
  '1.0': '1.6',
  '1.6': '2.5',
  '2.5': '4.0',
  '4.0': '4.0',
}
// 监听准确度等级(量程上限90%以下)--修改以上
watch(() => form.value.accuracyLevelLower, (newValue) => {
  if (newValue) {
    form.value.accuracyLevelUpper = Number(accuracyLevelMap[newValue])
  }
})
watch(() => props.list, (newVal) => { // 检定项表格
  if (newVal) {
    list.value = [...newVal]
    list.value = list.value.map((item) => {
      return {
        ...item,
        zeroPosition: `${item.zeroPosition}` === 'false' ? '否' : '是',
      }
    })
  }
})

watch(() => props.form, (newVal) => { // 检定项表单
  if (newVal) {
    form.value = { ...newVal }
    form.value.supplyVoltage = Number(getDataNum(newVal.supplyVoltage)) // 供电电压
    form.value.supplyVoltageUnit = getDataUnit(newVal.supplyVoltage) // 供电电压单位
    if (form.value.displayValueTwo) { // 设定标准器示值2
      showValueTwo.value = true
    }
    if (form.value.displayValueThree) { // 设定标准器示值3
      showValueThree.value = true
    }
  }
}, { deep: true, immediate: true })

onMounted(() => {
  form.value.points = props.itemCategoryName === '压力变送器' ? 5 : props.itemCategoryName === '压力传感器' ? 6 : 3
  form.value.cycleNumber = props.itemCategoryName === '压力变送器' || props.itemCategoryName === '压力传感器' ? 3 : props.itemCategoryName === '数字压力计' ? 2 : 0
})

defineExpose({ list, form })
</script>

<template>
  <div style="padding: 0 10px 20px;">
    <el-checkbox v-model="form.appearance" :checked="true" :disabled="pageType === 'detail'">
      外观
    </el-checkbox>
    <el-checkbox v-model="form.tightness" :disabled="pageType === 'detail'">
      密封性
    </el-checkbox>
    <el-checkbox v-model="form.insulationResistance" :checked="true" :disabled="pageType === 'detail'">
      绝缘电阻
    </el-checkbox>
    <el-checkbox v-model="form.pointerDeflectionStability" :disabled="pageType === 'detail'">
      指针偏转平稳性
    </el-checkbox>
    <el-checkbox v-model="form.zeroDrift" :checked="true" :disabled="pageType === 'detail'">
      零位漂移
    </el-checkbox>
    <el-checkbox v-model="form.indicationError" :checked="true" :disabled="pageType === 'detail'">
      示值误差、回程误差、轻敲位移
    </el-checkbox>
  </div>

  <el-form
    ref="ruleFormRef"
    :model="form"
    label-width="130"
    label-position="right"
    :rules="rules"
  >
    <el-row v-if="props.itemCategoryName === '电接点一般压力表'" :gutter="24" style="margin-top: 20px;">
      <el-col :span="6">
        <el-form-item label="设定标准器示值1:" prop="fileNoNameTwo">
          <div style="display: flex;flex-wrap: nowrap;">
            <el-input
              v-model="form.displayValueOne"
              type="textarea"
              autosize
              :placeholder="pageType === 'detail' ? '' : '请设定标准器示值'"
              :disabled="pageType === 'detail'"
              :class="{ 'detail-input': pageType === 'detail' }"
              style="flex: 1;"
            />
            <icon-button v-if="!showValueTwo && pageType !== 'detail'" style="margin-left: 10px;" size="20" icon="icon-add" title="新建" type="primary" @click="addValue" />
          </div>
        </el-form-item>
      </el-col>
      <el-col v-if="showValueTwo" :span="6">
        <el-form-item label="设定标准器示值2:" prop="fileNoNameTwo">
          <div style="display: flex;flex-wrap: nowrap;">
            <el-input
              v-model="form.displayValueTwo"
              type="textarea"
              autosize
              :placeholder="pageType === 'detail' ? '' : '请设定标准器示值'"
              :disabled="pageType === 'detail'"
              :class="{ 'detail-input': pageType === 'detail' }"
              style="flex: 1;"
            />
            <icon-button v-if="!showValueThree && pageType !== 'detail'" style="margin-left: 10px;" size="20" icon="icon-add" title="新建" type="primary" @click="addValue" />
          </div>
        </el-form-item>
      </el-col>
      <el-col v-if="showValueThree" :span="6">
        <el-form-item label="设定标准器示值3:" prop="fileNoNameTwo">
          <div style="display: flex;flex-wrap: nowrap;">
            <el-input
              v-model="form.displayValueThree"
              type="textarea"
              autosize
              :placeholder="pageType === 'detail' ? '' : '请设定标准器示值'"
              :disabled="pageType === 'detail'"
              :class="{ 'detail-input': pageType === 'detail' }"
              style="flex: 1;"
            />
            <!-- <icon-button v-if="!showValueThree && pageType !== 'detail'" style="margin-left: 10px;" size="20" icon="icon-add" title="新建" type="primary" @click="addValue" /> -->
          </div>
        </el-form-item>
      </el-col>
    </el-row>
    <el-row :gutter="24">
      <el-col :span="12" style="display: flex;justify-content: flex-start;">
        <el-form-item label="量程:" prop="rangeLower">
          <el-input-number
            v-model="form.rangeLower"
            :placeholder="pageType === 'detail' ? '' : '量程下限'"
            :disabled="pageType === 'detail'"
            style="flex: 1;"
          />
        </el-form-item>
        <span style="margin-left: 10px;">——</span>
        <el-form-item label-width="10" prop="rangeUpper">
          <el-input-number
            v-model="form.rangeUpper"
            :placeholder="pageType === 'detail' ? '' : '量程上限'"
            :disabled="pageType === 'detail'"
            style="flex: 1;"
            :min="form.rangeLower"
          />
        </el-form-item>

        <el-form-item label-width="10" prop="rangeUnit">
          <!-- 单位 -->
          <el-select
            v-if="props.pageType !== 'detail'"
            v-model="form.rangeUnit"
            placeholder="单位"
            :disabled="props.pageType === 'detail'"
            filterable
            style="width: 100px;"
          >
            <el-option v-for="item in rangeUnitList" :key="item.id" :label="item.name" :value="item.value" />
          </el-select>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="检定点个数:" prop="points">
          <el-input-number
            v-model="form.points"
            :placeholder="pageType === 'detail' ? '' : '请输入检定点个数'"
            :disabled="pageType === 'detail'"
            :step="1"
            :min="3"
            :max="20"
            :precision="0"
            class="full-width-input"
          />
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="生成方式:" prop="generateWay">
          <el-select
            v-model="form.generateWay"
            placeholder="生成方式"
            :disabled="props.pageType === 'detail'"
            filterable
            class="full-width-input"
          >
            <el-option v-for="item in generateWayList" :key="item.id" :label="item.name" :value="item.value" />
          </el-select>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="检定介质:" prop="measureMedium">
          <el-select
            v-model="form.measureMedium"
            placeholder="检定介质"
            :disabled="props.pageType === 'detail'"
            filterable
            class="full-width-input"
          >
            <el-option v-for="item in measureMediumList" :key="item.id" :label="item.name" :value="item.value" />
          </el-select>
        </el-form-item>
      </el-col>
      <el-col v-if="props.itemCategoryName === '一般压力表' || props.itemCategoryName === '电接点一般压力表' || props.itemCategoryName === '精密压力表'" :span="6">
        <el-form-item :label="props.itemCategoryName === '精密压力表' ? '分度值的1/10:' : '分度值的1/5:'" prop="division">
          <el-input-number
            v-model="form.division"
            :placeholder="pageType === 'detail' ? '' : '请输入分度值的1/5'"
            :disabled="pageType === 'detail'"
            :min="0"
            class="full-width-input"
          />
        </el-form-item>
      </el-col>
      <el-col v-if="props.itemCategoryName === '一般压力表' || props.itemCategoryName === '电接点一般压力表'" :span="6">
        <el-form-item label-width="220" label="准确度等级(量程上限90%以下):" prop="accuracyLevelLower">
          <el-select
            v-if="props.pageType !== 'detail'"
            v-model="form.accuracyLevelLower"
            placeholder="请选择"
            :disabled="props.pageType === 'detail'"
            filterable
            class="full-width-input"
          >
            <el-option v-for="item in accuracyLevelLowerList" :key="item.id" :label="item.name" :value="item.value" />
          </el-select>
        </el-form-item>
      </el-col>
      <!-- 循环次数(压力变送器、压力传感器、数字压力计) -->
      <el-col v-if="props.itemCategoryName === '压力变送器' || props.itemCategoryName === '压力传感器' || props.itemCategoryName === '数字压力计'" :span="6">
        <el-form-item label="循环次数:" prop="cycleNumber">
          <el-input-number
            v-model="form.cycleNumber"
            :placeholder="pageType === 'detail' ? '' : '请输入循环次数'"
            :disabled="pageType === 'detail'"
            :step="1"
            :min="1"
            :precision="0"
            class="full-width-input"
          />
        </el-form-item>
      </el-col>
      <el-col v-if="props.itemCategoryName === '一般压力表' || props.itemCategoryName === '电接点一般压力表' " :span="6">
        <el-form-item label="准确度等级(量程上限90%及以上):" prop="accuracyLevelUpper">
          <el-input-number
            v-model="form.accuracyLevelUpper"
            :placeholder="pageType === 'detail' ? '' : '请输入'"
            :disabled="pageType === 'detail'"
            :min="0"
            class="full-width-input"
          />
        </el-form-item>
      </el-col>
      <!-- 准确度等级(精密压力表) -->
      <el-col v-if="props.itemCategoryName === '精密压力表'" :span="6">
        <el-form-item label="准确度等级:" prop="accuracyLevel">
          <el-select
            v-if="props.pageType !== 'detail'"
            v-model="form.accuracyLevel"
            placeholder="准确度等级"
            :disabled="props.pageType === 'detail'"
            filterable
            class="full-width-input"
          >
            <el-option v-for="item in accuracyLevel_precisioPressureGaugeList" :key="item.id" :label="item.name" :value="item.value" />
          </el-select>
        </el-form-item>
      </el-col>
      <!-- 准确度等级(数字压力计) -->
      <el-col v-if="props.itemCategoryName === '数字压力计'" :span="6">
        <el-form-item label="准确度等级:" prop="accuracyLevel">
          <el-select
            v-model="form.accuracyLevel"
            placeholder="准确度等级"
            :disabled="props.pageType === 'detail'"
            filterable
            class="full-width-input"
          >
            <el-option v-for="item in accuracyLevel_digitalPressureGaugeList" :key="item.id" :label="item.name" :value="item.value" />
          </el-select>
        </el-form-item>
      </el-col>
      <!-- 准确度等级(压力变送器、压力传感器) -->
      <el-col v-if="props.itemCategoryName === '压力变送器' || props.itemCategoryName === '压力传感器' " :span="6">
        <el-form-item label="准确度等级:" prop="accuracyLevel">
          <el-input-number
            v-model="form.accuracyLevel"
            :placeholder="pageType === 'detail' ? '' : '请输入'"
            :disabled="pageType === 'detail'"
            :min="0"
            class="full-width-input"
          />
        </el-form-item>
      </el-col>
      <el-col v-if="props.itemCategoryName === '一般压力表' || props.itemCategoryName === '电接点一般压力表' || props.itemCategoryName === '精密压力表'" :span="6">
        <el-form-item label="零位是否带止销:" prop="zeroPosition">
          <el-radio-group v-model="form.zeroPosition" class="full-width-input" :disabled="props.pageType === 'detail'">
            <el-radio :label="true" size="large">
              是
            </el-radio>
            <el-radio :label="false" size="large">
              否
            </el-radio>
          </el-radio-group>
        </el-form-item>
      </el-col>

      <!-- 供电电压  -->
      <el-col v-if="props.itemCategoryName === '压力传感器'" :span="12" style="display: flex;justify-content: flex-start;">
        <el-form-item label="供电电压:" prop="supplyVoltage">
          <el-input-number
            v-model="form.supplyVoltage"
            :placeholder="pageType === 'detail' ? '' : '请选择供电电压'"
            :disabled="pageType === 'detail'"
            style="flex: 1;"
          />
        </el-form-item>
        <el-form-item label-width="10" prop="supplyVoltageUnit">
          <!-- 单位 -->
          <el-select
            v-if="props.pageType !== 'detail'"
            v-model="form.supplyVoltageUnit"
            placeholder="单位"
            :disabled="props.pageType === 'detail'"
            filterable
            style="width: 100px;"
          >
            <el-option
              v-for="item in supplyVoltageUnitList"
              :key="item.id"
              :label="item.name"
              :value="item.value"
            />
          </el-select>
        </el-form-item>
      </el-col>

      <!-- <el-col v-if="props.itemCategoryName === '压力传感器'" :span="6">
        <el-form-item label="上一周期灵敏度b0:" prop="lastCycleSensitivity">
          <el-input
            v-model="form.lastCycleSensitivity"
            class="full-width-input"
            autosize
            type="textarea"
            disabled
          />
        </el-form-item>
      </el-col> -->
    </el-row>
  </el-form>

  <detail-block :title="props.pageType !== 'detail' ? ' ' : ''">
    <template v-if="props.pageType !== 'detail'" #btns>
      <el-button type="primary" @click="calculateData">
        生成标准器示值
      </el-button>
      <el-button v-if="props.itemCategoryName === '一般压力表' || props.itemCategoryName === '压力变送器' || props.itemCategoryName === '压力传感器' || props.itemCategoryName === '电接点一般压力表'" type="primary" @click="recalculateData">
        计算结果
      </el-button>
    </template>
    <el-table
      ref="tableRef"
      v-loading="tableLoading"
      :data="list"
      border
      style="width: 100%;"
    >
      <el-table-column align="center" label="序号" width="80" type="index" />
      <el-table-column
        v-for="item in columns"
        :key="item.value"
        :prop="item.value"
        :label="item.text"
        :width="item.width"
        align="center"
      >
        <template #default="scope">
          <el-input-number
            v-if="props.pageType !== 'detail' && item.value === 'indicatingValue'"
            v-model="scope.row[item.value]"
            :placeholder="pageType === 'detail' ? '' : '标准器示值'"
            :disabled="pageType === 'detail'"
            class="full-width-input"
            :min="form.rangeLower"
            :max="form.rangeUpper"
          />
        </template>
      </el-table-column>
    </el-table>
  </detail-block>
</template>