|
@@ -230,7 +230,7 @@
|
|
|
</el-tooltip>
|
|
|
|
|
|
<el-tooltip effect="dark" content="复制" placement="top">
|
|
|
- <div class="t_b_Item" @click="copyCourse(item.courseId)">
|
|
|
+ <div class="t_b_Item" @click="copyCourse(item.courseId, item.setting)">
|
|
|
<img src="../../assets/icon/course/copy.svg">
|
|
|
</div>
|
|
|
</el-tooltip>
|
|
@@ -419,6 +419,7 @@ import CourseProblem from "./components/courseProblem";
|
|
|
import shareDialog from './dialog/shareDialog.vue'
|
|
|
import templateDialog from "./aiAddCourse/templateDialog.vue";
|
|
|
import templateDialogE from "./aiEasy/templateDialog.vue";
|
|
|
+import { v4 as uuidv4 } from "uuid";
|
|
|
|
|
|
export default {
|
|
|
components: { EditorBar, CourseProblem,shareDialog,templateDialog,templateDialogE },
|
|
@@ -1431,15 +1432,21 @@ export default {
|
|
|
this.problemCourse = res;
|
|
|
this.dialogVisible = true;
|
|
|
},
|
|
|
- copyCourse(cid) {
|
|
|
+ copyCourse(cid, setting) {
|
|
|
+ let settingJson = ''
|
|
|
+ if(setting && JSON.parse(setting)){
|
|
|
+ settingJson = JSON.parse(setting)
|
|
|
+ settingJson.chatid = uuidv4()
|
|
|
+ }
|
|
|
let params = [
|
|
|
{
|
|
|
cid: cid,
|
|
|
uid: this.userid,
|
|
|
+ setting: JSON.stringify(settingJson),
|
|
|
},
|
|
|
];
|
|
|
this.ajax
|
|
|
- .post(this.$store.state.api + "copyCourse", params)
|
|
|
+ .post(this.$store.state.api + "copyCourse2", params)
|
|
|
.then((res) => {
|
|
|
this.page = 1;
|
|
|
if (this.role == "1") {
|