<template>
  <div v-if="pageStatus == 0">配置加载中...</div>
  <div v-else-if="pageStatus == 1">此页面不对此账号开放</div>
  <div v-else-if="pageStatus == 2">权限已下放到站点，请登录站点账号配置</div>
  <div v-else-if="pageStatus == 3">加载发生错误</div>
  <div class="tabZujian" v-else-if="pageStatus == 4">
    <el-tabs v-model="activeName"  @tab-click="handleClick">
      <el-tab-pane label="油品管理" name="adjust" key="adjust">
        <adjust />
      </el-tab-pane>
      <el-tab-pane label="调价记录" name="record" key="record">
        <record  :getListChange="getListChange"/>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import adjust from "./adjust";
import record from "./record";
export default {
  name: "Station_Adjustment",
  components: {
    adjust,
    record,
  },
  data() {
    return {
      activeName: "adjust",
      pageStatus: 0,
      getListChange:true
    };
  },
  created() {
    this.setPageStatus();
  },
  methods: {
    setPageStatus() {
      this.queryPageStatus([2]).then((res) => {
        this.pageStatus = res;
      });
    },
    handleClick(tab) {
      if(tab.name=="record"){
        this.getListChange = !this.getListChange
      }
    }
  },
};
</script>
<style>
.tabZujian {
  margin-left: 20px;
  margin-top: 20px;
}
</style>
