kaohe_jump_bug

UI_2022-02-10
luoJunYong.123 3 years ago
parent 1caaa74de8
commit 8381e75e05
  1. 21
      src/pages/record/list/index.vue
  2. 4
      src/store/modules/project.js

@ -59,7 +59,7 @@
</template> </template>
<script> <script>
import { mapState, mapActions } from "vuex"; import { mapState, mapActions, mapMutations } from "vuex";
import practice from "./practice"; import practice from "./practice";
import ass from "./ass"; import ass from "./ass";
@ -81,19 +81,21 @@ export default {
}; };
}, },
computed: { computed: {
...mapState("project", [ ...mapState({
"lastRecordType" 'lastRecordType': state => state.project.lastRecordType
]) })
}, },
mounted() { created() {
this.active = this.lastRecordType ? this.lastRecordType : "practice"; this.active = this.lastRecordType ? this.lastRecordType : "practice";
},
mounted() {
this.getData(); this.getData();
this.getschoolCourse(); this.getschoolCourse();
}, },
methods: { methods: {
...mapActions("user", [ ...mapActions({
"setRecord" setRecord: "project/setRecord"
]), }),
getschoolCourse() { // getschoolCourse() { //
this.$get(this.api.schoolCourse).then(res => { this.$get(this.api.schoolCourse).then(res => {
if (res.data && res.data.length) { if (res.data && res.data.length) {
@ -121,7 +123,8 @@ export default {
}, },
tabChange(index) { tabChange(index) {
this.active = index; this.active = index;
this.setRecord(this.actice); this.setRecord(index)
// this.$store.dispatch('project/setRecord', index)
} }
}, },

@ -19,8 +19,8 @@ export default {
setSystemId({ state, commit }, systemId) { setSystemId({ state, commit }, systemId) {
commit("SET_SYSTEM_ID", systemId); commit("SET_SYSTEM_ID", systemId);
}, },
setRecord({ state, commit }, type) { setRecord({ state, commit }, active) {
commit("SET_RECORD", type); commit('SET_RECORD', active)
} }
} }
}; };
Loading…
Cancel
Save