|
@@ -7,7 +7,7 @@
|
|
<el-form-item label="科目名称">
|
|
<el-form-item label="科目名称">
|
|
<CourseSelect :examId="form.examId" v-model="form.code" />
|
|
<CourseSelect :examId="form.examId" v-model="form.code" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="科目名称">
|
|
|
|
|
|
+ <el-form-item label="状态">
|
|
<StateSelect
|
|
<StateSelect
|
|
:options="[
|
|
:options="[
|
|
{ code: 0, name: '未绑卷' },
|
|
{ code: 0, name: '未绑卷' },
|
|
@@ -17,7 +17,7 @@
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-button @click="searchForm">查询</el-button>
|
|
<el-button @click="searchForm">查询</el-button>
|
|
- <el-button>导入</el-button>
|
|
|
|
|
|
+ <el-button @click="importPaper">导入</el-button>
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
<el-table :data="tableData" stripe style="width: 100%;">
|
|
<el-table :data="tableData" stripe style="width: 100%;">
|
|
@@ -25,24 +25,26 @@
|
|
<el-table-column width="100" label="ID">
|
|
<el-table-column width="100" label="ID">
|
|
<span slot-scope="scope">{{ scope.row.id }}</span>
|
|
<span slot-scope="scope">{{ scope.row.id }}</span>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column width="200" label="场次代码">
|
|
|
|
- <span slot-scope="scope">{{ scope.row.code }}</span>
|
|
|
|
|
|
+ <el-table-column width="200" label="科目代码">
|
|
|
|
+ <span slot-scope="scope">{{ scope.row.courseCode }}</span>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="候考时间">
|
|
|
|
- <span slot-scope="scope">{{ scope.row.prepareSeconds / 60 }}</span>
|
|
|
|
|
|
+ <el-table-column label="科目名称">
|
|
|
|
+ <span slot-scope="scope">{{ scope.row.courseName }}</span>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column width="120" label="状态">
|
|
<el-table-column width="120" label="状态">
|
|
<span slot-scope="scope">{{
|
|
<span slot-scope="scope">{{
|
|
- scope.row.enable | zeroOneEnableDisableFilter
|
|
|
|
|
|
+ scope.row.hasPaper === 1 ? "已绑卷" : "未绑卷"
|
|
}}</span>
|
|
}}</span>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column width="100" label="开始时间">
|
|
|
|
|
|
+ <el-table-column width="100" label="音频题">
|
|
<span slot-scope="scope">{{
|
|
<span slot-scope="scope">{{
|
|
- scope.row.startTime | datetimeFilter
|
|
|
|
|
|
+ scope.row.hasAudio === 1 ? "是" : "否"
|
|
}}</span>
|
|
}}</span>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column width="100" label="结束时间">
|
|
|
|
- <span slot-scope="scope">{{ scope.row.endTime | datetimeFilter }}</span>
|
|
|
|
|
|
+ <el-table-column width="100" label="提交答案">
|
|
|
|
+ <span slot-scope="scope">{{
|
|
|
|
+ scope.row.hasAnswer | zeroOneEnableDisableFilter
|
|
|
|
+ }}</span>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column width="120" label="更新人">
|
|
<el-table-column width="120" label="更新人">
|
|
<span slot-scope="scope">{{ scope.row.updateName }}</span>
|
|
<span slot-scope="scope">{{ scope.row.updateName }}</span>
|
|
@@ -57,14 +59,6 @@
|
|
<el-button size="mini" type="primary" plain @click="edit(scope.row)">
|
|
<el-button size="mini" type="primary" plain @click="edit(scope.row)">
|
|
编辑
|
|
编辑
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button
|
|
|
|
- size="mini"
|
|
|
|
- type="primary"
|
|
|
|
- plain
|
|
|
|
- @click="toggleEnableActivity(scope.row)"
|
|
|
|
- >
|
|
|
|
- {{ scope.row.enable ? "禁用" : "启用" }}
|
|
|
|
- </el-button>
|
|
|
|
</div>
|
|
</div>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -80,24 +74,31 @@
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <!-- <ActivityManagementDialog
|
|
|
|
|
|
+ <PaperImportDialog
|
|
ref="theDialog"
|
|
ref="theDialog"
|
|
- :examId="examId"
|
|
|
|
- :activity="selectedActivity"
|
|
|
|
|
|
+ :examId="form.examId"
|
|
@reload="searchForm"
|
|
@reload="searchForm"
|
|
- /> -->
|
|
|
|
|
|
+ />
|
|
|
|
+
|
|
|
|
+ <CoursePaperDialog
|
|
|
|
+ ref="theDialog2"
|
|
|
|
+ :course="selectedCourse"
|
|
|
|
+ @reload="searchForm"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { searchCourses } from "@/api/examwork-course";
|
|
import { searchCourses } from "@/api/examwork-course";
|
|
-// import ActivityManagementDialog from "./ActivityManagementDialog";
|
|
|
|
|
|
+import PaperImportDialog from "./PaperImportDialog";
|
|
|
|
+import CoursePaperDialog from "./CoursePaperDialog";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "CourseManagement",
|
|
name: "CourseManagement",
|
|
- // components: {
|
|
|
|
- // ActivityManagementDialog,
|
|
|
|
- // },
|
|
|
|
|
|
+ components: {
|
|
|
|
+ PaperImportDialog,
|
|
|
|
+ CoursePaperDialog,
|
|
|
|
+ },
|
|
computed: {},
|
|
computed: {},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -113,14 +114,19 @@ export default {
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
total: 10,
|
|
total: 10,
|
|
- selectedActivity: {},
|
|
|
|
|
|
+ selectedCourse: {},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async created() {},
|
|
async created() {},
|
|
methods: {
|
|
methods: {
|
|
async searchForm() {
|
|
async searchForm() {
|
|
- const valid = await this.$refs.form.validate();
|
|
|
|
- if (!valid) return;
|
|
|
|
|
|
+ try {
|
|
|
|
+ const valid = await this.$refs.form.validate();
|
|
|
|
+ if (!valid) return;
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log(error);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
const res = await searchCourses({
|
|
const res = await searchCourses({
|
|
examId: this.form.examId,
|
|
examId: this.form.examId,
|
|
code: this.form.code,
|
|
code: this.form.code,
|
|
@@ -128,8 +134,8 @@ export default {
|
|
pageNumber: this.currentPage,
|
|
pageNumber: this.currentPage,
|
|
pageSize: this.pageSize,
|
|
pageSize: this.pageSize,
|
|
});
|
|
});
|
|
- this.tableData = res.data.data.records.records;
|
|
|
|
- this.total = res.data.data.records.total;
|
|
|
|
|
|
+ this.tableData = res.data.data.records;
|
|
|
|
+ this.total = res.data.data.total;
|
|
},
|
|
},
|
|
handleCurrentChange(val) {
|
|
handleCurrentChange(val) {
|
|
this.currentPage = val;
|
|
this.currentPage = val;
|
|
@@ -140,13 +146,19 @@ export default {
|
|
this.currentPage = 1;
|
|
this.currentPage = 1;
|
|
this.searchForm();
|
|
this.searchForm();
|
|
},
|
|
},
|
|
- add() {
|
|
|
|
- this.selectedActivity = {};
|
|
|
|
|
|
+ async importPaper() {
|
|
|
|
+ try {
|
|
|
|
+ const valid = await this.$refs.form.validate();
|
|
|
|
+ if (!valid) return;
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log(error);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
this.$refs.theDialog.openDialog();
|
|
this.$refs.theDialog.openDialog();
|
|
},
|
|
},
|
|
- edit(activity) {
|
|
|
|
- this.selectedActivity = activity;
|
|
|
|
- this.$refs.theDialog.openDialog();
|
|
|
|
|
|
+ edit(course) {
|
|
|
|
+ this.selectedCourse = course;
|
|
|
|
+ this.$refs.theDialog2.openDialog();
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|