第一步:导出菁优网试卷或
模板下载 。
@@ -163,6 +160,7 @@ export default {
subjectName: "",
title: "",
type: 1, //试卷类型
+ share: 0, //分享类型
},
classList: [],
subjectList: [],
@@ -187,7 +185,6 @@ export default {
share: 0,
},
diaUp: false,//上传word弹窗开关
- examinationPaperType: 1,//题型类型
url: "/api_html/common/paper/upload",//上传文档地址
};
},
@@ -217,6 +214,7 @@ export default {
path: "/examinationPaperArchiving",
});
},
+ //去备题
toAdd(query) {
if (!this.query.classId) {
this.$message.warning("没有任课班级,请先设置。");
@@ -228,6 +226,18 @@ export default {
query ? (routerItem["query"] = { ...query }) : "";
this.$router.push(routerItem);
},
+ //去组卷
+ toAddAsk(query) {
+ if (!this.query.classId) {
+ this.$message.warning("没有任课班级,请先设置。");
+ return;
+ }
+ let routerItem = {
+ path: "/examinationPaperAddAsk",
+ };
+ query ? (routerItem["query"] = { ...query }) : "";
+ this.$router.push(routerItem);
+ },
toEdit(item) {
this.$router.push({
path: "/examinationPaperEdit",
@@ -255,6 +265,10 @@ export default {
break;
}
},
+ changPaperType(type) {
+ this.query.type = type
+ this.changShare(1)
+ },
changePage(page) {
this.page = page;
this._QueryData(this.query.title);
@@ -295,18 +309,20 @@ export default {
},
//根据试卷名称查找
async getData(bool) {
+ this.page = 1;
this._QueryData(bool);
this._QueryTotal();
},
//切换班级
async changClazz() {
+ this.page = 1;
await this._QuerySubjectList();
this._QueryData(false);
this._QueryTotal();
},
//切换类型
- async changType(type) {
- this.query.type = type
+ async changShare(share) {
+ this.query.share = share
this.page = 1;
this._QueryData(false);
},
@@ -380,14 +396,10 @@ export default {
let query = {};
if (!type) {
this.query.title = "";
- query = { ...this.query };
- } else {
- query = { title: this.query.title };
}
- query.classId = this.query.classId;
- query.subjectName = this.query.subjectName;
+ query = { ...this.query };
for (let key in query) {
- if (!query[key]) {
+ if (!query[key] && query[key] !== 0) {
delete query[key]
}
}
@@ -451,7 +463,11 @@ export default {
});
this.diaUp = false;
let params = JSON.stringify(res.data)
- this.toAdd({ params, isUpload: 1 })
+ if (this.query.type == 2) {
+ this.toAdd({ params, isUpload: 1 })
+ } else {
+ this.toAddAsk({ params })
+ }
}
},
handleAdd(value) {