fix:更新调试项目、学习路径图共享文档编辑

This commit is contained in:
wyx
2023-02-16 16:55:55 +08:00
parent 3000423281
commit 5591a98e33
4 changed files with 17 additions and 12 deletions

View File

@@ -4,4 +4,7 @@ import http from "./config";
export const getRouterOverview = (routerId) => http.get(`/admin/router/overview?routerId=${routerId}`)
//新建或编辑路径图
export const editRoutered = (obj) => http.post('/admin/router/edit', obj)
export const editRoutered = (obj) => http.post('/admin/router/edit', obj)
// 新建或编辑路径图共享文档
export const editRouteredDoc = (obj) => http.post('/admin/router/editShareRouter', obj)

View File

@@ -13,6 +13,8 @@ export const deleteTask = (obj) => http.delete('/admin/project/deleteTask', { pa
//新建或编辑项目
export const editProj = (obj) => http.post('/admin/project/edit', obj)
//编辑项目共享文档
export const editProjDoc = (obj) => http.post('/admin/project/editShareAttach', obj)
//路径图里的新建或编辑关卡任务
export const editTask = (obj) => http.post('/admin/router/editTask', obj)

View File

@@ -1374,7 +1374,7 @@ import { getRouterOverview } from "@/api/indexLearningPath";
import { handleLearnPath } from "../../api/index1";
import { GetRouterDetail } from "@/api/indexTask";
import * as api from "../../api/index1";
import { editRoutered } from "../../api/indexLearningPath";
import { editRouteredDoc } from "../../api/indexLearningPath";
import TwoDimensionalCode from "../../components/TwoDimensionalCode.vue";
import TableStudent from "@/components/student/TableStudent";
import { getStuPage, moveStudent } from "@/api/index1";
@@ -2255,12 +2255,12 @@ export default {
attachSwitch: data ? 1 : -1,
});
// 更新开关状态
editRoutered({
editRouteredDoc({
attach: JSON.stringify(state.fileList),
name: state.styTitle,
picUrl: state.picUrl,
remark: state.remark,
routerId: state.routerId,
id: state.routerId,
status: state.action,
attachSwitch: data ? 1 : -1,
})
@@ -2355,12 +2355,12 @@ export default {
let str = JSON.stringify(list);
console.log(str);
//要编辑路径图
editRoutered({
editRouteredDoc({
attach: str,
name: state.styTitle,
picUrl: state.picUrl,
remark: state.remark,
routerId: state.routerId,
id: state.routerId,
status: state.action,
attachSwitch: state.docChecked ? 1 : -1,
})
@@ -2480,12 +2480,12 @@ export default {
state.fileList.splice(index, 1);
let str = JSON.stringify(state.fileList);
//要编辑路径图
editRoutered({
editRouteredDoc({
attach: str,
name: state.styTitle,
picUrl: state.picUrl,
remark: state.remark,
routerId: state.routerId,
id: state.routerId,
status: state.action,
})
.then((res) => {

View File

@@ -2175,7 +2175,7 @@ import {
import { message, Modal } from "ant-design-vue";
import * as apitl from "../../api/index";
import { getTask } from "../../api/indexTaskadd";
import { editProj } from "../../api/indexTaskadd";
import { editProjDoc } from "../../api/indexTaskadd";
import { toDate } from "../../api/method";
import projSet from "../../components/Modals/projSet";
import { overview } from "../../api/indexProjStu";
@@ -4213,7 +4213,7 @@ export default {
state.docChecked = data;
state.switchopen = data;
// 更新开关状态
editProj({
editProjDoc({
attachSwitch: state.switchopen ? 1 : -1,
boeFlag: state.boeFlag,
category: state.category,
@@ -4275,7 +4275,7 @@ export default {
templateId: state.templateId || 0,
type: state.type,
});
editProj({
editProjDoc({
attachSwitch: state.switchopen ? 1 : -1,
attach: str,
boeFlag: state.boeFlag,
@@ -4548,7 +4548,7 @@ export default {
});
state.fileList.splice(index, 1);
let str = JSON.stringify(state.fileList);
editProj({
editProjDoc({
attach: str,
beginTime: state.tstartTime.slice(0, 10),
// beginTime:1668643200,