<template>
  <template v-if="itemSlot.style !== '固定'">
    <tr
      v-if="isShow"
      :key="itemSlot.slotName + indexSlot + Math.floor(Math.random() * 100000) + 1"
    >
      <td rowspan="6" colspan="2">{{ itemSlot.slotIndex }}</td>
      <td rowspan="6" colspan="2">{{ itemSlot.slotName }}</td>
    </tr>
    <tr v-else :key="itemSlot.slotName + indexSlot + Math.floor(Math.random() * 100000) + 1">
      <td rowspan="6" :colspan="quality ? '1' : '4'">{{ itemSlot.slotName }}</td>
    </tr>
    <template
      v-for="(itemChild, indexChild) in itemSlot.childrenList"
      :key="itemSlot.slotName + indexSlot + indexChild + Math.floor(Math.random() * 100000) + 1"
    >
      <tr v-if="indexChild == 0">
        <td :colspan="quality ? '2' : '2'">{{ itemChild.detailName }}</td>
        <td :colspan="quality ? '2' : '2'">{{ itemChild.ask }}</td>
        <td :colspan="quality ? '4' : '4'" >
          <div v-if="itemType=='电子档案维护'">
            <el-input v-model="itemChild.paramValue" placeholder="请输入内容" />
          </div>
          <div v-else>
            {{ itemChild.paramValue }}
          </div>
        </td>
      </tr>
      <tr
        v-else
        :key="itemSlot.slotName + indexSlot + indexChild + Math.floor(Math.random() * 100000) + 1"
      >
        <td :colspan="quality ? '2' : '3'">{{ itemChild.detailName }}</td>
        <td :colspan="quality ? '6' : '4'">
          <div v-if="itemType=='电子档案维护'">
            <el-input v-model="itemChild.paramValue" placeholder="请输入内容" />
          </div>
          <div v-else>
            {{ itemChild.paramValue }}
          </div>
        </td>
      </tr>
    </template>
  
</template>
<template v-else>
  <!-- 第1行 -->
  <tr>
    <td rowspan="5"></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <!-- 第2行 -->
  <tr>
    <td></td>
    <td colspan="2"></td>
    
  </tr>
  <!-- 第3行 -->
  <tr>
    <td></td>
   <td colspan="2"></td>
  </tr>
  <tr>
    <td></td>
   <td colspan="2"></td>
  </tr>
  <tr>
    <td></td>
    <td colspan="2"></td>
  </tr>
 </template>
</template>
<script>
export default {
  props: {
    itemSlot: {
      type: Object,
      default: () => {},
    },
    indexSlot: {
      type: Number,
      default: 0,
    },
    quality:{
      type: Boolean,
      default: false
    },
      isShow: {
      type: Boolean,
      default: false
    },
    itemType:{
      type: String,
      default: ''
    }
  },
  data() {
    return {};
  },
  methods: {},
};
</script>
<style lang="scss" scoped>
</style>