1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <template>
- <div class="wait-task-analysis">
- <div class="part-box part-box-pad">
- <el-table ref="TableList" :data="dataList">
- <el-table-column
- type="index"
- label="序号"
- width="50"
- :index="indexMethod"
- ></el-table-column>
- <el-table-column prop="semesterName" label="学期"></el-table-column>
- <el-table-column prop="examName" label="考试"> </el-table-column>
- <el-table-column prop="courseCode" label="课程(代码)" min-width="120">
- <span slot-scope="scope">
- {{ scope.row.courseName }}({{ scope.row.courseCode }})
- </span>
- </el-table-column>
- <el-table-column class-name="action-column" label="操作" width="100">
- <template slot-scope="scope">
- <el-button class="btn-primary" type="text" @click="toDo(scope.row)"
- >立即处理</el-button
- >
- </template>
- </el-table-column>
- </el-table>
- <div class="part-page">
- <el-pagination
- background
- layout="total,prev, pager, next"
- :current-page="current"
- :total="total"
- :page-size="size"
- @current-change="toPage"
- >
- </el-pagination>
- </div>
- </div>
- <!-- ModifyBaseConfig -->
- <modify-base-config
- ref="ModifyBaseConfig"
- :instance="curTask"
- @closed="taskModified"
- ></modify-base-config>
- </div>
- </template>
- <script>
- import { mapMutations, mapActions } from "vuex";
- import { analysisTaskListPage } from "../api";
- import ModifyBaseConfig from "../../analysis/components/ModifyBaseConfig.vue";
- export default {
- name: "wait-task-analysis",
- components: { ModifyBaseConfig },
- data() {
- return {
- current: 1,
- size: this.GLOBAL.pageSize,
- total: 0,
- dataList: [],
- curTask: {}
- };
- },
- mounted() {
- this.getList();
- },
- methods: {
- ...mapMutations("exam", ["updateWaitTask"]),
- ...mapActions("exam", ["updateWaitTaskCount"]),
- async getList() {
- const datas = {
- pageNumber: this.current,
- pageSize: this.size
- };
- const data = await analysisTaskListPage(datas);
- this.dataList = data.records;
- this.total = data.total;
- this.updateWaitTask({ analysis: this.total });
- },
- toPage(page) {
- this.current = page;
- this.getList();
- },
- toDo(task) {
- this.curTask = { ...task };
- this.$refs.ModifyBaseConfig.open();
- },
- taskModified() {
- this.getList();
- this.updateWaitTaskCount();
- }
- }
- };
- </script>
|