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>
<script>
import { mapState, mapActions } from "vuex";
import { mapState, mapActions, mapMutations } from "vuex";
import practice from "./practice";
import ass from "./ass";
@ -81,19 +81,21 @@ export default {
};
},
computed: {
...mapState("project", [
"lastRecordType"
])
...mapState({
'lastRecordType': state => state.project.lastRecordType
})
},
mounted() {
created() {
this.active = this.lastRecordType ? this.lastRecordType : "practice";
},
mounted() {
this.getData();
this.getschoolCourse();
},
methods: {
...mapActions("user", [
"setRecord"
]),
...mapActions({
setRecord: "project/setRecord"
}),
getschoolCourse() { //
this.$get(this.api.schoolCourse).then(res => {
if (res.data && res.data.length) {
@ -121,7 +123,8 @@ export default {
},
tabChange(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) {
commit("SET_SYSTEM_ID", systemId);
},
setRecord({ state, commit }, type) {
commit("SET_RECORD", type);
setRecord({ state, commit }, active) {
commit('SET_RECORD', active)
}
}
};
Loading…
Cancel
Save