// 用于单站监控二级菜单页面获取路由中的站点ID
const getQuerySiteId=  {
  data: function () {
    return {
      siteId:''
    }
  },
  watch: {
    '$route.query':{
      handler (newQuery,oldQuery) {
        // 参数变化处理
        this.$nextTick(() => {
          const {siteId} =newQuery
          if(siteId){
            this.siteId = siteId
            siteId && this.init(newQuery.siteId)
            console.log('mixin=>getQuerySiteId=>页面参数siteId发生了变化,this.siteId=',this.siteId)
          }
        })
      },
      immediate: true,
    }
  },
}
export default getQuerySiteId
