|
@@ -8,6 +8,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="main">
|
|
|
<classList
|
|
|
+ :name="name"
|
|
|
:headNameList="headNameList"
|
|
|
@assign="clickAssign"
|
|
|
:assignShow="assignShow"
|
|
@@ -36,9 +37,11 @@
|
|
|
import NavBar from '@/layout/common/topInfo.vue';
|
|
|
import footInfo from '@/layout/common/footInfo.vue';
|
|
|
import classList from '@/layout/class/classList.vue';
|
|
|
-import { createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
+// import { createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
+import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
const { mapActions: mapGroup } = createNamespacedHelpers('group');
|
|
|
const { mapActions: mapStudent } = createNamespacedHelpers('student');
|
|
|
+const { mapActions: mapclasses } = createNamespacedHelpers('classes');
|
|
|
let site = JSON.parse(sessionStorage.getItem('site'));
|
|
|
const termid = site.termid;
|
|
|
const batchid = site.batchid;
|
|
@@ -54,24 +57,26 @@ export default {
|
|
|
classList, //班级名单
|
|
|
},
|
|
|
data: () => ({
|
|
|
+ name: '',
|
|
|
+ xsid: '',
|
|
|
// 班主任看学生名单
|
|
|
headNameList: [
|
|
|
- {
|
|
|
- name: '测试人员',
|
|
|
- job: '班长',
|
|
|
- },
|
|
|
- {
|
|
|
- name: '测试人',
|
|
|
- job: '',
|
|
|
- },
|
|
|
- {
|
|
|
- name: '测试人员',
|
|
|
- job: '班长',
|
|
|
- },
|
|
|
- {
|
|
|
- name: '测试人',
|
|
|
- job: '班长',
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // name: '测试人员',
|
|
|
+ // job: '班长',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // name: '测试人',
|
|
|
+ // job: '',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // name: '测试人员',
|
|
|
+ // job: '班长',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // name: '测试人',
|
|
|
+ // job: '班长',
|
|
|
+ // },
|
|
|
],
|
|
|
assignShow: false,
|
|
|
assignForm: {},
|
|
@@ -104,8 +109,11 @@ export default {
|
|
|
}),
|
|
|
created() {
|
|
|
this.findList();
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
},
|
|
|
- computed: {},
|
|
|
mounted() {
|
|
|
this.title = this.$route.meta.title;
|
|
|
this.isleftarrow = this.$route.meta.isleftarrow;
|
|
@@ -117,11 +125,37 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
- clickAssign() {
|
|
|
+ ...mapStudent({ list: 'query', add: 'create', fet: 'fetch', updates: 'update' }),
|
|
|
+ async search() {
|
|
|
+ let classid = this.user.classid;
|
|
|
+ const res = await this.list({ classid });
|
|
|
+ console.log(res);
|
|
|
+
|
|
|
+ this.$set(this, `headNameList`, res.data);
|
|
|
+ },
|
|
|
+ async clickAssign({ id, name }) {
|
|
|
+ console.log(name);
|
|
|
+
|
|
|
this.assignShow = true;
|
|
|
+ this.$set(this, `xsid`, id);
|
|
|
+ this.$set(this, `name`, name);
|
|
|
},
|
|
|
- onAssignShow(assignForm) {
|
|
|
+ async onAssignShow(assignForm) {
|
|
|
+ console.log(this.xsid);
|
|
|
+
|
|
|
this.assignShow = false;
|
|
|
+ this.assignForm.id = this.xsid;
|
|
|
+ let data = this.assignForm;
|
|
|
+ let res = await this.updates(data);
|
|
|
+ let classid = this.user.classid;
|
|
|
+ const ress = await this.list({ classid });
|
|
|
+ console.log(res);
|
|
|
+ this.$set(this, `headNameList`, ress.data);
|
|
|
+ console.log(res);
|
|
|
+ this.$message({
|
|
|
+ message: '评分成功',
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
},
|
|
|
outAssignShow() {
|
|
|
this.assignShow = false;
|