Newer
Older
xc-business-system / src / views / business / measure / item / components / fourteen / templateDetail.vue
lyg on 12 Mar 2024 2 KB 铯原子检定项配置
<!-- 第14套:铯原子频率标准装置标准装置 -->
<script lang="ts" setup name="TemplateDetailFourteen">
import universalCounter from './components/universalCounter.vue'
import clock from './components/clock.vue'
import crystalOscillator from './components/crystalOscillator.vue'
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 standardRef = ref()
// const form = standardRef.value.form
// const list = standardRef.value.getList()
// const checkAllList = standardRef.value.checkAllList
// const getList = standardRef.value.getList
const getInfo = () => {
  return {
    form: standardRef.value.form,
    list: standardRef.value.getList(),
    checkAllList: standardRef.value.checkAllList,
    getList: standardRef.value.getList,
  }
}
defineExpose({ getInfo })
</script>

<template>
  <!-- 通用计数器 -->
  <universal-counter
    v-if="props.itemCategoryName === '通用计数器'" ref="standardRef"
    :page-type="props.pageType"
    :item-category-name="props.itemCategoryName"
    :belong-standard-equipment="props.belongStandardEquipment"
    :item-id="props.itemId"
    :list="props.list"
    :form="props.form"
  />
  <!-- 微波计数器 -->
  <universal-counter
    v-if="props.itemCategoryName === '微波计数器'" ref="standardRef"
    :page-type="props.pageType"
    :item-category-name="props.itemCategoryName"
    :belong-standard-equipment="props.belongStandardEquipment"
    :item-id="props.itemId"
    :list="props.list"
    :form="props.form"
  />
  <!-- 铷钟 -->
  <clock
    v-if="props.itemCategoryName === '铷钟'" ref="standardRef"
    :page-type="props.pageType"
    :item-category-name="props.itemCategoryName"
    :belong-standard-equipment="props.belongStandardEquipment"
    :item-id="props.itemId"
    :list="props.list"
    :form="props.form"
  />
  <!-- 晶振 -->
  <crystal-oscillator
    v-if="props.itemCategoryName === '晶振'" ref="standardRef"
    :page-type="props.pageType"
    :item-category-name="props.itemCategoryName"
    :belong-standard-equipment="props.belongStandardEquipment"
    :item-id="props.itemId"
    :list="props.list"
    :form="props.form"
  />
</template>