index.vue 1.21 KB
<template>
  <div class="clerk-wrapper">
    <el-tabs type="border-card" v-model="activeName" >
      <el-tab-pane :label="$t('Management.storeInspectionResult')" name="first">
        <result v-if='activeName == "first"' @getStore='getStore'></result>
      </el-tab-pane>
      <el-tab-pane :label="$t('Management.storeInspectionRecord')" name="second">
        <record v-if='activeName == "second"' :groupMallId='mallId' :startDate='startDate' :endDate = 'endDate'></record>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
  import result from './result.vue'
  import record from './record.vue'
  export default{
    components:{
      result,
      record
    },
    data() {
      return {
        activeName: 'first',
        mallId:'',
        startDate:'',
        endDate:''
      };
    },
    methods: {
      getStore(data){
        this.mallId = data.mallId
        this.startDate = data.startDate
        this.endDate = data.endDate
        this.activeName = 'second'
      }
    }
  }
</script>

<style lang="less" scoped="scoped">
  .clerk-wrapper{
    padding: 8px 15px;
  }
  /deep/.el-tabs{
    box-shadow:none;
    border-width: 0;
    .el-tabs__content{
      padding: 15px 0;
    }
  }
</style>