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