|
@@ -6,7 +6,7 @@
|
|
<topInfo></topInfo>
|
|
<topInfo></topInfo>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="main">
|
|
<el-col :span="24" class="main">
|
|
- <mainData></mainData>
|
|
|
|
|
|
+ <mainData :teacherinfo="teacherinfo" :form="form" @onsave="onsave"></mainData>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="foot">
|
|
<el-col :span="24" class="foot">
|
|
<footInfo></footInfo>
|
|
<footInfo></footInfo>
|
|
@@ -20,9 +20,10 @@
|
|
import topInfo from '@/layout/teacherscore/topInfo.vue';
|
|
import topInfo from '@/layout/teacherscore/topInfo.vue';
|
|
import footInfo from '@/layout/common/footInfo.vue';
|
|
import footInfo from '@/layout/common/footInfo.vue';
|
|
import mainData from '@/layout/teacherscore/mainData.vue';
|
|
import mainData from '@/layout/teacherscore/mainData.vue';
|
|
-const { mapActions: lesson } = createNamespacedHelpers('lesson');
|
|
|
|
|
|
+const { mapActions: teacher } = createNamespacedHelpers('teacher');
|
|
import { createNamespacedHelpers, mapGetters } from 'vuex';
|
|
import { createNamespacedHelpers, mapGetters } from 'vuex';
|
|
const { mapActions: mapStudent } = createNamespacedHelpers('student');
|
|
const { mapActions: mapStudent } = createNamespacedHelpers('student');
|
|
|
|
+const { mapActions: mapScore } = createNamespacedHelpers('score');
|
|
export default {
|
|
export default {
|
|
name: 'index',
|
|
name: 'index',
|
|
props: {},
|
|
props: {},
|
|
@@ -32,13 +33,35 @@ export default {
|
|
mainData, //课程安排主体
|
|
mainData, //课程安排主体
|
|
},
|
|
},
|
|
data: () => ({
|
|
data: () => ({
|
|
- dates: '',
|
|
|
|
- week: '',
|
|
|
|
|
|
+ teacherinfo: {},
|
|
|
|
+ form: {},
|
|
}),
|
|
}),
|
|
- created() {},
|
|
|
|
- computed: {},
|
|
|
|
|
|
+ created() {
|
|
|
|
+ this.searchInfo();
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ id() {
|
|
|
|
+ return this.$route.query.id;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
mounted() {},
|
|
mounted() {},
|
|
- methods: {},
|
|
|
|
|
|
+ watch: {},
|
|
|
|
+ methods: {
|
|
|
|
+ ...teacher({ columnList: 'query', teacherInfo: 'fetch' }),
|
|
|
|
+ ...mapScore(['fetch', 'create', 'update']),
|
|
|
|
+
|
|
|
|
+ async searchInfo() {
|
|
|
|
+ const res = await this.teacherInfo(this.id);
|
|
|
|
+ console.log(res);
|
|
|
|
+ this.$set(this, `teacherinfo`, res.data);
|
|
|
|
+ },
|
|
|
|
+ async onsave(form) {
|
|
|
|
+ let data = this.form;
|
|
|
|
+ let res = await this.create(data);
|
|
|
|
+ console.log('成功');
|
|
|
|
+ // res = await this.create(form);
|
|
|
|
+ },
|
|
|
|
+ },
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|