import { onKeepAlive } from "@/config/settings";
import { mapGetters } from "vuex";
import { title } from "@/config/settings";

export default {
  computed: {
    ...mapGetters({
      systemType: "MUser/systemType",
    }),
    nowExpireTime() {
      return this.$store.getters["MUser/nowExpireTime"];
    },
    shelfLifeSetUp() {
      return parseInt(this.$store.getters["MUser/shelfLifeSetUp"]);
    },
    userName() {
      return this.$store.getters["MUser/userName"];
    },
  },
  data() {
    return {
      enterprise_title: title,
      onKeepAlive: onKeepAlive,
      sub_loading: false,
    };
  },
  methods: {
    // 判断企业是否过期
    enterExpireTime() {
      if (new Date().getTime() >= this.nowExpireTime * 1000) {
        this.$router.push("/ExpireTip");
      }
    },
    // 级联选择器自定义选择即改变
    clickChange(event) {
      event.target.parentElement.parentElement.firstChild.click();
    },
  },
};
