|
@@ -19,12 +19,12 @@
|
|
disabled
|
|
disabled
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item>
|
|
|
|
|
|
+ <!-- <el-form-item>
|
|
<el-button type="primary" @click="toAddPaper">新增绑卷</el-button>
|
|
<el-button type="primary" @click="toAddPaper">新增绑卷</el-button>
|
|
- </el-form-item>
|
|
|
|
|
|
+ </el-form-item> -->
|
|
</div>
|
|
</div>
|
|
<el-table :data="papers" stripe style="width: 100%;">
|
|
<el-table :data="papers" stripe style="width: 100%;">
|
|
- <el-table-column label="试卷名称">
|
|
|
|
|
|
+ <!-- <el-table-column label="试卷名称">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-select
|
|
<el-select
|
|
v-if="scope.row.isHandleAdd"
|
|
v-if="scope.row.isHandleAdd"
|
|
@@ -41,6 +41,9 @@
|
|
</el-select>
|
|
</el-select>
|
|
<span v-else>{{ scope.row.name }}</span>
|
|
<span v-else>{{ scope.row.name }}</span>
|
|
</template>
|
|
</template>
|
|
|
|
+ </el-table-column> -->
|
|
|
|
+ <el-table-column label="试卷名称">
|
|
|
|
+ <span slot-scope="scope">{{ scope.row.name }}</span>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column width="100" label="分值">
|
|
<el-table-column width="100" label="分值">
|
|
<span slot-scope="scope">{{ scope.row.totalScore }}</span>
|
|
<span slot-scope="scope">{{ scope.row.totalScore }}</span>
|
|
@@ -73,7 +76,12 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="操作" width="100">
|
|
<el-table-column label="操作" width="100">
|
|
<div slot-scope="scope">
|
|
<div slot-scope="scope">
|
|
- <el-button size="mini" type="danger" plain @click="toDelete(scope)">
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="danger"
|
|
|
|
+ plain
|
|
|
|
+ @click="toDelete(scope.row)"
|
|
|
|
+ >
|
|
删除
|
|
删除
|
|
</el-button>
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
@@ -97,6 +105,14 @@
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="是否允许小程序作答">
|
|
|
|
+ <el-radio-group v-model="refreshCourse.mobilePhotoUpload">
|
|
|
|
+ <el-radio :label="1">是</el-radio>
|
|
|
|
+ <el-radio :label="0">否</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
@@ -116,6 +132,7 @@ import {
|
|
saveCourse,
|
|
saveCourse,
|
|
savePapers,
|
|
savePapers,
|
|
searchUnionPapers,
|
|
searchUnionPapers,
|
|
|
|
+ examDeletePaper,
|
|
} from "@/api/examwork-course";
|
|
} from "@/api/examwork-course";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -140,7 +157,7 @@ export default {
|
|
handler() {
|
|
handler() {
|
|
this.refreshCourse = {};
|
|
this.refreshCourse = {};
|
|
this.papers = [];
|
|
this.papers = [];
|
|
- this.getPaperSources();
|
|
|
|
|
|
+ // this.getPaperSources();
|
|
this.initData();
|
|
this.initData();
|
|
},
|
|
},
|
|
},
|
|
},
|
|
@@ -184,8 +201,16 @@ export default {
|
|
isHandleAdd: true,
|
|
isHandleAdd: true,
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- toDelete({ $index }) {
|
|
|
|
- this.papers.splice($index, 1);
|
|
|
|
|
|
+ async toDelete(row) {
|
|
|
|
+ const confirm = await this.$confirm(`操作提示`, "确定要删除试卷吗?", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning",
|
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
|
+ }).catch(() => {});
|
|
|
|
+ if (confirm !== "confirm") return;
|
|
|
|
+ await examDeletePaper(row.id);
|
|
|
|
+ this.$notify({ title: "操作成功", type: "success" });
|
|
},
|
|
},
|
|
selectPaperChange({ row, $index }) {
|
|
selectPaperChange({ row, $index }) {
|
|
const sPapers = this.papers
|
|
const sPapers = this.papers
|
|
@@ -215,6 +240,7 @@ export default {
|
|
courseCode: this.refreshCourse.courseCode,
|
|
courseCode: this.refreshCourse.courseCode,
|
|
objectiveShuffle: this.refreshCourse.objectiveShuffle,
|
|
objectiveShuffle: this.refreshCourse.objectiveShuffle,
|
|
optionShuffle: this.refreshCourse.optionShuffle,
|
|
optionShuffle: this.refreshCourse.optionShuffle,
|
|
|
|
+ mobilePhotoUpload: this.refreshCourse.mobilePhotoUpload,
|
|
});
|
|
});
|
|
const ps = [];
|
|
const ps = [];
|
|
for (const paper of this.papers) {
|
|
for (const paper of this.papers) {
|
|
@@ -239,5 +265,3 @@ export default {
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
-
|
|
|
|
-<style></style>
|
|
|