Bläddra i källkod

update store

projects/mescc/lb-home-map
DESKTOP-FUDKNA8\znjsz 5 månader sedan
förälder
incheckning
8075325f50
4 ändrade filer med 39 tillägg och 1 borttagningar
  1. +1
    -1
      .env.dev
  2. +25
    -0
      src/store/modules/home.js
  3. +5
    -0
      src/views/copilot/components/CopilotHeader.vue
  4. +8
    -0
      src/views/index.vue

+ 1
- 1
.env.dev Visa fil

@@ -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
- 0
src/store/modules/home.js Visa fil

@@ -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,
};

+ 5
- 0
src/views/copilot/components/CopilotHeader.vue Visa fil

@@ -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;


+ 8
- 0
src/views/index.vue Visa fil

@@ -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();



Laddar…
Avbryt
Spara