<template>
  <div>
    <div>
      <Navbar v-if="pageInformation.showPage === 0" :title="$t('lang.AssetInventory.inventoryDataProcessing')" :is-go-back="false" />
      <div v-if="pageInformation.showPage === 0 " id="step-container" style="margin-top: 20px;">
        <section>
          <a-steps :current="pageInformation.currentStep">
            <a-step :title="$t('lang.ConsolidatedAssetInventory.selectInventoryDataProcessingType')" />
            <a-step :title="$t('lang.ConsolidatedAssetInventory.processInventoryData')" />
          </a-steps>
        </section>
        <a-divider style="margin:20px 0  6px 0 !important;" />
      </div>
      <section>
        <inventory-data-processing-step1 v-if="pageInformation.showPage == 0" :current-step="pageInformation" @next="nextStep" />
        <inventory-data-processing-step2 v-if="pageInformation.showPage == 1" :current-step="pageInformation" @next="nextStep" @previous="previousStep" />
        <inventory-data-processing-step3 v-if="pageInformation.showPage == 2" :current-step="pageInformation" @next="nextStep" @previous="previousStep" />
        <inventory-data-processing-step4 v-if="pageInformation.showPage == 3" :current-step="pageInformation" @next="nextStep" @previous="previousStep" />
        <inventory-data-processing-step7 v-if="pageInformation.showPage == 7" :current-step="pageInformation" @next="nextStep" @previous="previousStep" />
        <inventory-data-processing-step8 v-if="pageInformation.showPage == 8" :current-step="pageInformation" @previous="previousStep" />
      </section>
    </div>
  </div>
</template>

<script>

import InventoryDataProcessingStep1 from './InventoryDataProcessingStep1.vue';
import InventoryDataProcessingStep2 from './InventoryDataProcessingStep2.vue';
import InventoryDataProcessingStep3 from './InventoryDataProcessingStep3.vue';
import InventoryDataProcessingStep4 from './InventoryDataProcessingStep4.vue';
import InventoryDataProcessingStep7 from './InventoryDataProcessingStep7.vue';
import InventoryDataProcessingStep8 from './InventoryDataProcessingStep8.vue';

export default {

  components: {
    
    'inventory-data-processing-step1': InventoryDataProcessingStep1,
    'inventory-data-processing-step2': InventoryDataProcessingStep2,
    'inventory-data-processing-step3': InventoryDataProcessingStep3,
    'inventory-data-processing-step4': InventoryDataProcessingStep4,
    'inventory-data-processing-step7': InventoryDataProcessingStep7,
    'inventory-data-processing-step8': InventoryDataProcessingStep8,

  },
  data: function() {
    return {
      pageInformation:{
        currentStep: 0,
        showPage: 0,
        assetInventoryStep3: undefined,
      },
    };
  },

  methods: {
    nextStep: function(data) {
      var _self = this;
      _self.pageInformation = data;
      Object.assign(this.pageInformation, data);
    },
    previousStep: function(data) {
      var _self = this;
      _self.pageInformation = data;
    },
    /**
     * 修改数据
     */
    update: function (pageInformation) {
      Object.assign(this.pageInformation, pageInformation);
    },

    mounted: function() {

    },
  },
};
</script>
<style scoped>
 
  #step-container{
    margin: 0 !important;
  }
  .ant-divider-horizontal {
    margin: 8px 0;
  }

</style>
