|
|
@@ -2890,7 +2890,9 @@ export default {
|
|
|
},
|
|
|
selectAppSuccess({ data, type }) {
|
|
|
let _data = { id: new Date().getTime(), tool: 72, title: data.name, brief: data.detail, json: data, icon: data.json.icon, url: data.url }
|
|
|
- if (this.editId) {
|
|
|
+ if(this.editId === 111){
|
|
|
+ this.pptCourseJson.toolsList.push(_data);
|
|
|
+ } if (this.editId) {
|
|
|
let oldData = this.pptCourseJson.toolsList.find(i => i.id === this.editId);
|
|
|
_data.id = oldData.id;
|
|
|
this.pptCourseJson.toolsList.splice(this.pptCourseJson.toolsList.findIndex(i => i.id === this.editId), 1, _data);
|
|
|
@@ -2904,7 +2906,9 @@ export default {
|
|
|
selectAppSuccess2({ data, type }) {
|
|
|
for (let i = 0; i < data.length; i++) {
|
|
|
let _data = { id: new Date().getTime(), tool: 72, title: data[i].name, brief: data[i].detail, json: data[i], icon: data[i].json.icon, url: data[i].url }
|
|
|
- if (this.editId) {
|
|
|
+ if(this.editId === 111){
|
|
|
+ this.pptCourseJson.toolsList.push(_data);
|
|
|
+ } if (this.editId) {
|
|
|
let oldData = this.pptCourseJson.toolsList.find(i => i.id === this.editId);
|
|
|
_data.id = oldData.id;
|
|
|
this.pptCourseJson.toolsList.splice(this.pptCourseJson.toolsList.findIndex(i => i.id === this.editId), 1, _data);
|
|
|
@@ -3043,7 +3047,9 @@ export default {
|
|
|
testJson.testCount = testJson.testJson.length;
|
|
|
|
|
|
let _data = { id: new Date().getTime(), tool: 45, title: this.lang.ssChoice, brief: this.lang.ssChoiceTool2, json: testJson, url: "" }
|
|
|
- if (this.editId) {
|
|
|
+ if(this.editId === 111){
|
|
|
+ this.pptCourseJson.toolsList.push(_data);
|
|
|
+ } if (this.editId) {
|
|
|
let oldData = this.pptCourseJson.toolsList.find(i => i.id === this.editId);
|
|
|
_data.id = oldData.id;
|
|
|
_data.title = oldData.title;
|
|
|
@@ -3082,7 +3088,9 @@ export default {
|
|
|
testJson.testCount = testJson.testJson.length;
|
|
|
|
|
|
let _data = { id: new Date().getTime(), tool: 78, title: this.lang.ssChoice, brief: this.lang.ssChoiceTool2, json: testJson, url: "" }
|
|
|
- if (this.editId) {
|
|
|
+ if(this.editId === 111){
|
|
|
+ this.pptCourseJson.toolsList.push(_data);
|
|
|
+ } if (this.editId) {
|
|
|
let oldData = this.pptCourseJson.toolsList.find(i => i.id === this.editId);
|
|
|
_data.id = oldData.id;
|
|
|
_data.title = oldData.title;
|
|
|
@@ -3339,7 +3347,9 @@ export default {
|
|
|
// return;
|
|
|
// }
|
|
|
let _data = { id: new Date().getTime(), tool: 15, title: this.lang.ssQAQuestion, brief: this.lang.ssQAQuestionTool, json: { answerQ: this.answerQ }, url: "" }
|
|
|
- if (this.editId) {
|
|
|
+ if(this.editId === 111){
|
|
|
+ this.pptCourseJson.toolsList.push(_data);
|
|
|
+ } if (this.editId) {
|
|
|
let oldData = this.pptCourseJson.toolsList.find(i => i.id === this.editId);
|
|
|
_data.id = oldData.id;
|
|
|
_data.title = oldData.title;
|
|
|
@@ -3370,7 +3380,9 @@ export default {
|
|
|
// return;
|
|
|
// }
|
|
|
let _data = { id: new Date().getTime(), tool: 79, title: this.lang.ssPhoto, brief: this.lang.ssPhotoTool, json: { answerQ: this.answerQ, fileList: [] }, url: "" }
|
|
|
- if (this.editId) {
|
|
|
+ if(this.editId === 111){
|
|
|
+ this.pptCourseJson.toolsList.push(_data);
|
|
|
+ } if (this.editId) {
|
|
|
let oldData = this.pptCourseJson.toolsList.find(i => i.id === this.editId);
|
|
|
_data.id = oldData.id;
|
|
|
_data.title = oldData.title;
|
|
|
@@ -3401,7 +3413,9 @@ export default {
|
|
|
// 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) {
|
|
|
+ if(this.editId === 111){
|
|
|
+ this.pptCourseJson.toolsList.push(_data);
|
|
|
+ } if (this.editId) {
|
|
|
let oldData = this.pptCourseJson.toolsList.find(i => i.id === this.editId);
|
|
|
_data.id = oldData.id;
|
|
|
_data.title = oldData.title;
|
|
|
@@ -3481,7 +3495,7 @@ export default {
|
|
|
},
|
|
|
toolBtn2(type, id, tool){
|
|
|
let _data = this.pptCourseJson.toolsList.find(i => i.id === id || i.url === id);
|
|
|
- this.editId = _data ? _data.id : 1;
|
|
|
+ this.editId = _data ? _data.id : 111;
|
|
|
if (tool == 45) {
|
|
|
this.testJsonName = "";
|
|
|
this.testJsonBrief = "";
|
|
|
@@ -3703,7 +3717,9 @@ export default {
|
|
|
}
|
|
|
|
|
|
let _data = { id: new Date().getTime(), tool: 73, title: this.lineTitle, brief: this.lang.ssH5Page, json: { lineTitle: this.lineTitle, line: this.line }, url: this.line }
|
|
|
- if (this.editId) {
|
|
|
+ if(this.editId === 111){
|
|
|
+ this.pptCourseJson.toolsList.push(_data);
|
|
|
+ } if (this.editId) {
|
|
|
let oldData = this.pptCourseJson.toolsList.find(i => i.id === this.editId);
|
|
|
_data.id = oldData.id;
|
|
|
_data.brief = oldData.brief;
|