public.js 627 Bytes
import { getForm } from "../flowform";
import { getHomeNoticeList } from "@/api/user.js"
export default {
  data () {
    return {
      noticeList: [],
    }
  },
  created () {
    getHomeNoticeList().then(res => {
      if (res.result) {
        this.noticeList = res.result.noticeList
      }
    })
  },
  methods: {
    //右侧表单选项卡事件
    beforeLeave (activeName, oldActiveName) {
      if (activeName && activeName != 0) this.getFromRouter(activeName)
    },
    //切换选项卡内容组件
    getFromRouter (tabname) {
      this.componentTag = getForm(tabname, this.$route.query.sqywbm);
    }
  }
}