|
@@ -2736,6 +2736,9 @@ export default {
|
|
|
}else if (tool == 79){
|
|
}else if (tool == 79){
|
|
|
this.answerQ = "";
|
|
this.answerQ = "";
|
|
|
this.addPhoto();
|
|
this.addPhoto();
|
|
|
|
|
+ }else if (tool == 84){
|
|
|
|
|
+ this.answerQ = "";
|
|
|
|
|
+ this.addFile();
|
|
|
} else if (tool == 72) {
|
|
} else if (tool == 72) {
|
|
|
this.$refs.appDialog.openG(
|
|
this.$refs.appDialog.openG(
|
|
|
[],
|
|
[],
|
|
@@ -3392,6 +3395,37 @@ export default {
|
|
|
this.editId = null;
|
|
this.editId = null;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ addFile() {
|
|
|
|
|
+ // if (this.answerQ == "") {
|
|
|
|
|
+ // this.$message.error(this.lang.ssEnterQuesL);
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+ let _data = { id: new Date().getTime(), tool: 84, title: this.lang.ssFile, brief: this.lang.ssFileTool, json: { answerQ: this.answerQ, fileList: [] }, url: "" }
|
|
|
|
|
+ if (this.editId) {
|
|
|
|
|
+ let oldData = this.pptCourseJson.toolsList.find(i => i.id === this.editId);
|
|
|
|
|
+ _data.id = oldData.id;
|
|
|
|
|
+ _data.title = oldData.title;
|
|
|
|
|
+ _data.brief = oldData.brief;
|
|
|
|
|
+ this.pptCourseJson.toolsList.splice(this.pptCourseJson.toolsList.findIndex(i => i.id === this.editId), 1, _data);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.pptCourseJson.toolsList.push(_data);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.dialogVisible8 = false;
|
|
|
|
|
+ this.getWorkPageId(_data.id, 84, { answerQ: this.answerQ, fileList: [] }).then(res => {
|
|
|
|
|
+ let baseUrl = this.setUrl()
|
|
|
|
|
+ let url = `${baseUrl}/pbl-teacher-table/dist/workPage.html#/setWorkPage?id=${res}&type=${_data.tool}`;
|
|
|
|
|
+ this.pptCourseJson.toolsList.find(i => i.id === _data.id).url = url;
|
|
|
|
|
+ this.setPPtToolList();
|
|
|
|
|
+ _data.url = url
|
|
|
|
|
+ if (!this.editId) {
|
|
|
|
|
+ this.addContent(_data)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.addContent(_data, 2)
|
|
|
|
|
+ }
|
|
|
|
|
+ this.editId = null;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
async getWorkPageId(id, tool, json) {
|
|
async getWorkPageId(id, tool, json) {
|
|
|
let params = [{
|
|
let params = [{
|
|
|
userid: this.userid,
|
|
userid: this.userid,
|