|
@@ -91,6 +91,11 @@ export default {
|
|
|
gcourseid: this.$route.query.courseid,
|
|
|
back:this.$route.query.back
|
|
|
}
|
|
|
+ },
|
|
|
+ watch:{
|
|
|
+ cJson(newValue){
|
|
|
+ console.log("newValue",newValue)
|
|
|
+ }
|
|
|
},
|
|
|
computed:{
|
|
|
showAutoFillBtn(){
|
|
@@ -245,11 +250,21 @@ export default {
|
|
|
if (res.data[2].length) {
|
|
|
this.cJson = JSON.parse(res.data[2][0].courseJson)
|
|
|
|
|
|
+ this.$forceUpdate()
|
|
|
+
|
|
|
let cJson = this.setJSON(JSON.parse(JSON.stringify(this.cJson)))
|
|
|
let cJson2 = this.setJSON(this.setJson2(JSON.parse(JSON.stringify(this.cJson2))))
|
|
|
|
|
|
if (JSON.stringify(cJson) != JSON.stringify(cJson2)) {
|
|
|
- this.isReset = true
|
|
|
+ cJson2.forEach(i=>{
|
|
|
+ let _findIndex = this.cJson.findIndex(i2=> i2.ttype == i.ttype && i2.type == i.type && i2.json.title==i.json.title);
|
|
|
+ if(_findIndex!=-1){
|
|
|
+ i.json = this.cJson[_findIndex].json;
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ this.cJson = JSON.parse(JSON.stringify(cJson2));
|
|
|
+ this.isReset = true;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -482,7 +497,6 @@ export default {
|
|
|
this.isReset = true;
|
|
|
}
|
|
|
this.$forceUpdate();
|
|
|
-
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
this.loading = false
|