update store
This commit is contained in:
		
							
								
								
									
										2
									
								
								.env.dev
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								.env.dev
									
									
									
									
									
								
							@@ -5,7 +5,7 @@ ENV = 'development'
 | 
			
		||||
VUE_APP_TITLE = 芋道管理系统
 | 
			
		||||
 | 
			
		||||
# 芋道管理系统/开发环境
 | 
			
		||||
VUE_APP_BASE_API = 'http://192.168.0.30:48080'
 | 
			
		||||
VUE_APP_BASE_API = 'http://192.168.1.61:48080'
 | 
			
		||||
 | 
			
		||||
# 路由懒加载
 | 
			
		||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										25
									
								
								src/store/modules/home.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								src/store/modules/home.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
const state = {
 | 
			
		||||
    info: null
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const mutations = {
 | 
			
		||||
  SET_INFO: (state) => {
 | 
			
		||||
    state.info = state
 | 
			
		||||
  }, 
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const actions = {
 | 
			
		||||
  setInfo({ commit }, ) {
 | 
			
		||||
    commit("SET_INFO", );
 | 
			
		||||
  },
 | 
			
		||||
  closeSideBar({ commit }, { withoutAnimation }) {
 | 
			
		||||
    commit("CLOSE_SIDEBAR", withoutAnimation);
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
  namespaced: true,
 | 
			
		||||
  state,
 | 
			
		||||
  mutations,
 | 
			
		||||
  actions,
 | 
			
		||||
};
 | 
			
		||||
@@ -29,6 +29,7 @@
 | 
			
		||||
        <button
 | 
			
		||||
          type="button"
 | 
			
		||||
          class="fullscreen-btn"
 | 
			
		||||
          :class="[isFullscreen ? 'exit-fullscreen' : '']"
 | 
			
		||||
          @click="toggleFullScreen"
 | 
			
		||||
        />
 | 
			
		||||
      </div>
 | 
			
		||||
@@ -108,6 +109,10 @@ export default {
 | 
			
		||||
  background: url(../../../assets/images/full-icon.png) 0 0 / 100% 100%
 | 
			
		||||
    no-repeat;
 | 
			
		||||
}
 | 
			
		||||
.exit-fullscreen {
 | 
			
		||||
  background: url(../../../assets/images/homeindex/exit-fullscreen.png) 0 0 / 100% 100%
 | 
			
		||||
    no-repeat;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.page-title {
 | 
			
		||||
  flex: 1;
 | 
			
		||||
 
 | 
			
		||||
@@ -108,6 +108,14 @@ export default {
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    this.$axios
 | 
			
		||||
      .post("/ip/prod-target/query-by-date", { factorys: [], date: 4 })
 | 
			
		||||
      .then((res) => {
 | 
			
		||||
        if (res.data && Array.isArray(res.data)) {
 | 
			
		||||
          this.$store.dispatch("home/setInfo", res.data);
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
    this.$nextTick(() => {
 | 
			
		||||
      this.initPins();
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user