feat:合并

This commit is contained in:
lixg
2023-02-14 15:40:45 +08:00
9 changed files with 6932 additions and 82 deletions

View File

@@ -412,6 +412,10 @@ export default {
type: Number,
default: null,
},
taskCourseID: {
type: Number,
default: null,
},
EditFaceId: {
// 要编辑的workId
type: Number,
@@ -666,6 +670,7 @@ export default {
//新建或编辑面授
// 新增任务
const updateFaceTeach = () => {
console.log(props)
if (
state.courseName == "" ||
state.chooseCourse == null ||
@@ -695,12 +700,17 @@ export default {
afterStart: state.afterStartValue || 0,
beforeStart: state.before || 0,
beginTime: parseInt(
new Date(state.chooseTime[0].$d).getTime() / 1000
),
// beginTime: parseInt(
// new Date(state.chooseTime[0].$d).getTime() / 1000
// ),
// beginTime: dayjs(new Date(state.chooseTime[0]).getTime(), "YYYY-MM-DD HH-mm"),
beginTime: dayjs(state.chooseTime[0]).format("YYYY-MM-DD HH:mm"),
completeType: type.concat(t),
description: state.description,
endTime: parseInt(new Date(state.chooseTime[1].$d).getTime() / 1000),
// endTime: parseInt(new Date(state.chooseTime[1].$d).getTime() / 1000),
// endTime: dayjs(new Date(state.chooseTime[1]).getTime(), "YYYY-MM-DD HH-mm"),
endTime: dayjs(state.chooseTime[1]).format("YYYY-MM-DD HH:mm"),
evalFlag: state.needEval && state.assessmentId > 0 ? 1 : 0,
evaluateId: state.assessmentId,
homeWorkId: state.EditWorkId,
@@ -711,7 +721,7 @@ export default {
testId: state.EditTestId,
duration: state.duration,
attach:state.attach,
id: props.edit ? props.taskIdDraft : null
id: props.edit ? props.taskIdDraft : props.taskCourseID
};
console.log("obj============", obj, "6" + "9");
console.log("222222222");
@@ -719,6 +729,7 @@ export default {
editPlan(obj)
.then(async (res) => {
message.destroy();
console.log('添加成功----》', res)
// message.success(`添加成功`);
await updateTask(res);
ctx.emit("changeData", false);
@@ -744,15 +755,16 @@ export default {
message.destroy();
return message.warning("请先选中关卡");
}
console.log('=====>1111',props.edit , props.taskIdDraft , props.taskCourseID)
let editObj1 = {
chapterId: props.isactive,
courseId: res.data.data.offcoursePlanId,
courseId: res.data.data.id,
name: res.data.data.name,
duration: res.data.data.duration,
routerId: props.routerId,
routerTaskId: props.routerTaskId || 0,
type: 2,
id: props.taskIdDraft
id: props.edit ? props.taskIdDraft : res.data.data.id
};
await RouterEditTask(editObj1)
.then(() => {
@@ -773,7 +785,7 @@ export default {
projectTaskId: props.projectTaskId || 0,
stageId: props.chooseStageId || 0,
type: 2,
id: props.taskIdDraft
id: props.edit ? props.taskIdDraft : props.taskCourseID
};
// 新增编辑或新增项目
await ProjectEditTask(editObj)
@@ -794,7 +806,7 @@ export default {
projectTaskId: props.projectTaskId || 0,
stageId: props.chooseStageId || 0,
type: 2,
id: props.taskIdDraft
id: props.edit ? props.taskIdDraft : props.taskCourseID
})
.then(() => {
//message.success(`${props.EditFaceId ? "编辑" : "新增"}阶段任务成功` );

View File

@@ -743,7 +743,6 @@ export default {
liveExplain: state.textV1,
liveNotice: state.liveNotice,
liveFlag: "",
id: props.edit ? Number(props.EditLiveId) : 0,
liveLink: state.inputV4,
liveName: state.inputV1,
livePlayback: state.switchC1 ? "1" : "0",

View File

@@ -274,7 +274,10 @@ export default {
type: Number,
default: null,
},
taskCourseID: {
type: Number,
default: null,
},
projectTaskId: {
// 要编辑的projectId
type: Number,
@@ -506,9 +509,9 @@ export default {
data.map((value) => {
if (value.type == 3) {
let obj = {
key: value.projectId,
key: value.id,
parentId: value.parentId,
projectId: value.projectId,
projectId: value.id,
name: value.name,
manager: value.manager,
time: dayjs(value.createTime).format("YYYY-MM-DD"),

View File

@@ -454,7 +454,7 @@ export default {
// 导出数据
function exportTaskStu() {
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&taskId=${props.datasource.projectTaskId}&taskType=${props.datasource.type}`)
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&taskId=${props.datasource.id}&taskType=${props.datasource.type}`)
// window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?pageNo=${state.currentPage}&pageSize=${state.pageSize}&currentStageId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&taskId=${props.datasource.projectTaskId}&status=${state.name}&studentName=${state.projectName}`)
}

View File

@@ -1544,7 +1544,7 @@ import { useStore } from "vuex";
import DropDown from "@/components/common/DropDown";
import { checkPer } from "@/utils/utils";
import dayjs from "dayjs";
import { commonExport } from '@/utils/commonExcel'
// import { commonExport } from '@/utils/commonExcel'
//列表表格
const columns1 = [
@@ -4052,50 +4052,50 @@ export default defineComponent({
);
endTime = parseInt(new Date(state.projectTime[1].$d).getTime() / 1000);
}
console.log(startTime,endTime)
list({
pageNo: 1,
pageSize: 100000,
auditStatus: state.auditStatus,
// categoryId: state.categoryId,
sysTypeId: state.sysTypeId,
projectName: state.projectName,
name: state.name,
createName: state.createName,
endTime: endTime,
beginTime: startTime,
}).then(res=>{
let list = res.data.data.rows.map(s=>{
s.contentTxt = findClassFullName(sysTypeOptions.value, s.sysTypeId) || "-";
s.typeName = '面授'
s.publishStatusText = s.publishStatus === 0?'未发布':'已发布'
s.statusText = s.status === 0?'否':'是'
s.auditStatusText = s.auditStatus === 0?'未提交': s.auditStatus === 1?'待审核':s.auditStatus === 2?'已审核':s.auditStatus === -1?"审核未通过":''
return s
})
console.log(list)
let heads = [
{ header: '名称', key: 'name', width: 18 },
{ header: '类型', key: 'typeName', width: 10 },
{ header: '归属路径图', key: 'routerName', width: 13 },
{ header: '归属项目', key: 'projectName', width: 13 },
{ header: '内容分类', key: 'contentTxt', width: 20 },
// { header: '级分类', key: 'firstLevelCategory', width: 10 },
// { header: '级分类', key: 'secondLevelCategory', width: 10 },
// { header: '三级分类', key: 'thirdLevelCategory', width: 10 },
{ header: '开课次数', key: 'planCnt', width: 10 },
{ header: '学习人数', key: 'studentCnt', width: 10 },
{ header: '评分', key: 'score', width: 10 },
{ header: '状态', key: 'auditStatusText', width: 20 },
{ header: '是否发布', key: 'publishStatusText', width: 10 },
{ header: '创建人', key: 'createName', width: 10 },
{ header: '创建时间', key: 'createTime', width: 22 },
{ header: '上线时间', key: 'publishTime', width: 22 },
{ header: '是否停用', key: 'statusText', width: 10 },
]
commonExport(heads,list,"课程导出")
})
// list({
// pageNo: 1,
// pageSize: 100000,
// auditStatus: state.auditStatus,
// // categoryId: state.categoryId,
// sysTypeId: state.sysTypeId,
// projectName: state.projectName,
// name: state.name,
// createName: state.createName,
// endTime: endTime,
// beginTime: startTime,
// }).then(res=>{
// let list = res.data.data.rows.map(s=>{
// s.contentTxt = findClassFullName(sysTypeOptions.value, s.sysTypeId) || "-";
// s.typeName = '面授'
// s.publishStatusText = s.publishStatus === 0?'未发布':'已发布'
// s.statusText = s.status === 0?'否':'是'
// s.auditStatusText = s.auditStatus === 0?'未提交': s.auditStatus === 1?'待审核':s.auditStatus === 2?'已审核':s.auditStatus === -1?"审核未通过":''
// return s
// })
// console.log(list)
// let heads = [
// { header: '名称', key: 'name', width: 18 },
// { header: '类型', key: 'typeName', width: 10 },
// { header: '归属路径图', key: 'routerName', width: 13 },
// { header: '归属项目', key: 'projectName', width: 13 },
// { header: '内容分类', key: 'contentTxt', width: 20 },
// // { header: '一级分类', key: 'firstLevelCategory', width: 10 },
// // { header: '级分类', key: 'secondLevelCategory', width: 10 },
// // { header: '级分类', key: 'thirdLevelCategory', width: 10 },
// { header: '开课次数', key: 'planCnt', width: 10 },
// { header: '学习人数', key: 'studentCnt', width: 10 },
// { header: '评分', key: 'score', width: 10 },
// { header: '状态', key: 'auditStatusText', width: 20 },
// { header: '是否发布', key: 'publishStatusText', width: 10 },
// { header: '创建人', key: 'createName', width: 10 },
// { header: '创建时间', key: 'createTime', width: 22 },
// { header: '上线时间', key: 'publishTime', width: 22 },
// { header: '是否停用', key: 'statusText', width: 10 },
// ]
// commonExport(heads,list,"课程导出")
// })
// window.open(
// `${process.env.VUE_APP_BASE_API}/admin/offcourse/export?pageNo=${

View File

@@ -19,8 +19,8 @@
<draggable v-model="level" chosenClass="chosen" ghostClass="ghost" forceFallback="true" group="stage"
animation="500" @end="changeSort">
<template #item="{ element }">
<div class="items" :class="isactive == element.chapterId ? 'active' : ''"
@click="changebgc(element.chapterId)">
<div class="items" :class="isactive == element.id ? 'active' : ''"
@click="changebgc(element.id)">
<div class="items1">
<div class="boxs_left">
<a-popover placement="topLeft" trigger="click">
@@ -54,7 +54,7 @@
<div class="imgIcon" @click="showModal(element)"></div>
</div>
<div class="boxs_right">
<div class="imgIcon" @click="showDeleteChapter(element.chapterId)"></div>
<div class="imgIcon" @click="showDeleteChapter(element.id)"></div>
</div>
</div>
<div class="items2">
@@ -210,7 +210,7 @@
<div class="lin"></div>
</div>
<div class="item">
<div class="itcon" @click="showAddface">
<div class="itcon" @click="showAddface()">
<div class="img">
<img src="../../assets/images/leveladd/mian.png" />
</div>
@@ -219,7 +219,7 @@
<!-- 添加面授 -->
<add-faceteach @changeData="updateTableData" v-model:edit="edit" v-model:isactive="isactive"
v-model:routerId="routerId" v-model:chooseStageId="chooseStageId" v-model:routerTaskId="routerTaskId"
v-model:addfaceteachVisible="addfaceteachVisible" v-model:EditFaceId="EditFaceId" :isLevel="isLevel" v-model:taskIdDraft="taskIdDraft" v-model:taskCourseID="taskCourseID" />
v-model:addfaceteachVisible="addfaceteachVisible" v-model:EditFaceId="EditFaceId" v-model:taskIdDraft="taskIdDraft" v-model:taskCourseID="taskCourseID" :isLevel="isLevel" />
<!-- 添加面授 -->
<div class="lin"></div>
</div>
@@ -555,7 +555,7 @@
)">
编辑
</span>
<span style="color: #4ea6ff; cursor: pointer" @click="showDeleteModal(element.routerTaskId)">
<span style="color: #4ea6ff; cursor: pointer" @click="showDeleteModal(element.id)">
删除
</span>
</div>
@@ -1000,6 +1000,7 @@ export default {
chooseChapterId: null,
updateChapterID: null, //编辑关卡id
updateID: null, //编辑关卡id
deleteChapterModal: false, //删除关卡弹窗
deleteChapterId: null, //删除关卡id
@@ -1021,7 +1022,7 @@ export default {
state.value1 = element.name;
state.value2 = element.remark;
state.updateChapterID = element.chapterId;
state.updateID = element.id;
}
};
const closeModal = () => {
@@ -1062,10 +1063,10 @@ export default {
name: state.value1,
remark: state.value2,
routerId: state.routerId,
id: state.updateID,
chapterId: state.updateChapterID,
};
api
.updateChapter(obj)
api.updateChapter(obj)
.then((res) => {
console.log("修改成功", res);
message.success("修改成功");
@@ -1121,7 +1122,7 @@ export default {
const deleteChapter = () => {
console.log("chapterId", state.deleteChapterId);
let obj = {
chapterId: state.deleteChapterId,
id: state.deleteChapterId,
};
api
.deleteChapter(obj)
@@ -1288,22 +1289,16 @@ export default {
const dataAssignment = (id) => {
console.log(state.level);
for (let i = 0; i < state.level.length; i++) {
console.log("state.level[i].chapterId", state.level[i].chapterId, id);
if (state.level[i].chapterId == Number(id)) {
if (state.level[i].id == Number(id)) {
let array = [];
state.chooseProjectList = JSON.stringify(state.level[i].taskList);
console.log("state.level[i].taskList", state.level[i].taskList);
state.level[i].taskList.forEach((element) => {
console.log("element", element);
let obj = {
id: element.routerTaskId,
id: element.id,
key: element.routerTaskId,
lei: checkType(element.type),
creater: element.name,
cretime:
element.duration || element.duration == 0
? element.duration
: "-",
cretime: element.duration || element.duration === 0 ? element.duration : "-",
checked1: element.flag,
routerTaskId: element.routerTaskId,
courseId: element.courseId,
@@ -1313,12 +1308,9 @@ export default {
chapterId: element.chapterId,
...element
};
// console.log("obj", obj);
array.push(obj);
// console.log("array", array);
});
state.tableData = array;
// console.log("tableData", state.tableData);
}
}
};

View File

@@ -1672,7 +1672,7 @@ export default {
}
function push(record) {
showProjectPub({
projectId: record.projectId,
projectId: record.id,
name: record.name,
time: record.beginTime + "-" + record.endTime,
});

View File

@@ -12,7 +12,7 @@ module.exports = defineConfig({
publicPath: process.env.VUE_APP_BASE,
outputDir: process.env.VUE_APP_OUTPUT_DIR,
devServer: {
port: 8080,
port: 8070,
proxy: {
"/manageApi": {
target: 'http:' + process.env.VUE_APP_PROXY_URL,

6844
yarn.lock Normal file

File diff suppressed because it is too large Load Diff