diff --git a/src/api/indexFace.js b/src/api/indexFace.js
index 731e8fc1..51ff5214 100644
--- a/src/api/indexFace.js
+++ b/src/api/indexFace.js
@@ -1,4 +1,7 @@
import http from "./config";
//获取面授课开课详情
-export const queryFaceDetailById = (offcoursePlanId) => http.post(`http://localhost:8080/api/admin/offcourse/detailPlan?offcoursePlanId=` + offcoursePlanId + ``)
\ No newline at end of file
+export const queryFaceDetailById = (offcoursePlanId) => http.post(`http://localhost:8080/manageApi/admin/offcourse/detailPlan?offcoursePlanId=` + offcoursePlanId + ``)
+
+//新建或编辑面授课开课
+export const editPlan = (obj) => http.post('/admin/offcourse/editPlan', obj)
\ No newline at end of file
diff --git a/src/api/indexNotice.js b/src/api/indexNotice.js
index 19a34f98..cda183fa 100644
--- a/src/api/indexNotice.js
+++ b/src/api/indexNotice.js
@@ -6,7 +6,7 @@ import http from "./config";
// projectId: projectId,
// }
// });
-export const noticeList = (projectId) => http.post(`http://localhost:8080/manageApi/admin/project/noticeList?projectId=` + projectId + ``)
+export const noticeList = (obj) => http.post('/admin/project/noticeList', obj)
//发布项目公告
export const publishNotice = (obj) => http.post('/admin/project/publishNotice', obj)
diff --git a/src/components/drawers/ AssessmentList.vue b/src/components/drawers/ AssessmentList.vue
index 1b7d4992..234da65a 100644
--- a/src/components/drawers/ AssessmentList.vue
+++ b/src/components/drawers/ AssessmentList.vue
@@ -1,3 +1,4 @@
+
@@ -65,7 +66,6 @@
-
@@ -78,32 +78,34 @@ export default {
// components: {
// },
props: {
- assessmentVisible: {
+ assessmentVisible: {
type: Boolean,
default: false,
- },
-
+ },
+ isface: {
+ type: Number,
+ default: null,
+ },
},
setup(props, ctx) {
const state = reactive({
- assessmentVisible:false,
- assessment:null,
- inputV1:"",
+ assessmentVisible: false,
+ assessment: null,
+ inputV1: "",
currentPage: 1,
pageSize: 10,
tableDataTotal: 0,
tableData: [],
- selectedRowKeys:[],
+ selectedRowKeys: [],
});
const closeDrawer = () => {
ctx.emit("update:assessmentVisible", false);
};
const afterVisibleChange = (bool) => {
console.log("state getAllInvistText", bool);
- if(props.assessmentVisible){
+ if (props.assessmentVisible) {
getAllInvistText();
}
-
};
const tableDataFunc = () => {
const columns = [
@@ -142,11 +144,16 @@ export default {
};
const rowSelection = {
type: "radio",
- onSelect:(selectedRows)=>{
+ onSelect: (selectedRows) => {
state.assessment = selectedRows;
- console.log("selectedRows=======",state.assessment);
- ctx.emit("checkedAss", state.assessment);
- state.selectedRowKeys = []
+ console.log("selectedRows=======", state.assessment);
+ if (props.isface == 1) {
+ ctx.emit("faceAssess", state.assessment);
+ } else {
+ ctx.emit("checkedAss", state.assessment);
+ }
+
+ state.selectedRowKeys = [];
closeDrawer();
},
};
@@ -166,7 +173,7 @@ export default {
data.map((value, index) => {
let obj = {
key: index,
- assessmentId:value.assessmentId,
+ assessmentId: value.assessmentId,
num: value.essayQuestionVoList.length,
name: value.assessmentName ? value.assessmentName : "-",
creator: value.createUser ? value.createUser : "-",
@@ -174,17 +181,16 @@ export default {
};
array.push(obj);
});
- state.selectedRowKeys = [],
- state.tableData = array;
+ (state.selectedRowKeys = []), (state.tableData = array);
};
//获取全部评估信息接口
const getAllInvistText = () => {
api
.queryAssessmentDetailList({
- assessmentName:state.inputV1,
- pageNo: state.currentPage,
- pageSize: state.pageSize,
- })
+ assessmentName: state.inputV1,
+ pageNo: state.currentPage,
+ pageSize: state.pageSize,
+ })
.then((res) => {
let arr = res.data.data.rows;
if (res.status === 200) {
@@ -199,7 +205,6 @@ export default {
});
};
-
//重置评估信息
const resetInvist = () => {
state.inputV1 = "";
@@ -243,7 +248,7 @@ export default {
justify-content: space-between;
.main_left {
padding-right: 30px;
- margin-top:32px;
+ margin-top: 32px;
.main_item {
display: flex;
align-items: center;
diff --git a/src/components/drawers/AddFaceteach.vue b/src/components/drawers/AddFaceteach.vue
index c366534a..6acf985d 100644
--- a/src/components/drawers/AddFaceteach.vue
+++ b/src/components/drawers/AddFaceteach.vue
@@ -48,7 +48,24 @@
选择课程:
-
+
+
{{ chooseCourseName }}
@@ -259,7 +276,22 @@
需要评估
-
+
+
{{ chooseMentName }}
@@ -271,12 +303,35 @@
+
+
配置考试:
@@ -295,7 +350,13 @@
附件:
@@ -304,6 +365,11 @@
+
@@ -315,21 +381,24 @@ import AddTest from "../../components/drawers/AddTest.vue";
import { ProjectEditTask, RouterEditTask } from "@/api/indexTask";
// import * as method from "../../api/method"
import { message } from "ant-design-vue";
-import { queryFaceDetailById } from "../../api/indexFace";
+import { queryFaceDetailById, editPlan } from "../../api/indexFace";
import dayjs from "dayjs";
+import AssessmentList from "../drawers/ AssessmentList.vue";
+// import { toDate } from "../../api/method";
export default {
name: "AddFaceteach",
components: {
SelFacet,
AddHomework,
AddTest,
+ AssessmentList,
},
props: {
addfaceteachVisible: {
type: Boolean,
default: false,
},
- EditEvalId: {
+ EditFaceId: {
// 要编辑的workId
type: Number,
default: null,
@@ -390,13 +459,42 @@ export default {
checkedHolidy: false,
checkedAssessment: false,
chooseTime: [],
+ fileList: [],
+ chooseCourse: null, //选择的在线课程
+ chooseCourseName: null, //选择的课程的名字
+ face: true, //面授传给配置作业的标识
+ chooseWork: null, //配置的work
+ chooseWorkName: null, //配置的work名字
+ chooseMent: null,
+ chooseMentName: null,
+ assessmentVisible: false,
+ isface: 1,
});
+ const clear = () => {
+ state.inputV1 = null;
+ state.inputV2 = null;
+ state.inputV3 = null;
+ state.inputV4 = null;
+ state.inputV5 = null;
+ state.inputV6 = null;
+ state.inputV7 = null;
+ state.chooseTime = [];
+ state.textV1 = null;
+ state.radioV1 = "";
+ state.radioV2 = "";
+ state.checkedHolidy = false;
+ state.checkedAssessment = false;
+ state.chooseMent = null;
+ state.chooseWork = null;
+ state.chooseCourse = null;
+ };
const closeDrawer = () => {
ctx.emit("update:addfaceteachVisible", false);
state.radioV1 = "";
state.radioV2 = "";
localStorage.setItem("stageId", props.chooseStageId);
localStorage.setItem("chapterId", props.isactive);
+ clear();
};
const afterVisibleChange = (bool) => {
if (bool && props.edit) {
@@ -427,7 +525,7 @@ export default {
//查询面授
const queryFaceTeach = () => {
//暂时写一个假的offcoursePlanId
- queryFaceDetailById(2).then((res) => {
+ queryFaceDetailById(props.EditFaceId).then((res) => {
// state.inputV1 = res.data.data.name;
// state.inputV2 = res.data.data.teacherId;
console.log("获取到了面授课开课详情", res.data.data);
@@ -447,6 +545,7 @@ export default {
state.inputV5 = result.beforeStart;
state.inputV6 = result.afterStart;
state.inputV7 = result.beforeEnd;
+ state.fileList = JSON.parse(result.attach);
// state.radioV1 = result.
state.checkedHolidy =
result.completeType == 1
@@ -473,10 +572,79 @@ export default {
};
//新建或编辑面授
- const updateFaceTeach = () => {};
- const upDateTable = () => {};
+ // 新增任务
+ const updateFaceTeach = () => {
+ if (
+ state.inputV1 == "" ||
+ state.chooseCourse == null ||
+ state.inputV2 == "" ||
+ state.chooseTime == [] ||
+ state.inputV3 == "" ||
+ state.inputV4 == ""
+ ) {
+ message.destroy();
+ return message.warning("请输入必填字段");
+ } else {
+ let obj = {
+ address: state.inputV4,
+ afterStart: state.inputV6,
+ applyFlag: 1,
+ attach: JSON.stringify(state.fileList),
+ beforeEnd: state.inputV7,
+ beforeStart: state.inputV5,
+ // beginTime: dayjs(state.chooseTime[0]).format("YYYY-MM-DD"),
+ beginTime: parseInt(
+ new Date(state.chooseTime[0].$d).getTime() / 1000
+ ),
+ completeType: state.radioV1 == "1" ? 2 : 1,
+ description: state.textV1,
+ // endTime: dayjs(state.chooseTime[1]).format("YYYY-MM-DD"),
+ endTime: parseInt(new Date(state.chooseTime[0].$d).getTime() / 1000),
+ evalFlag: state.checkedAssessment == true ? 1 : 0,
+ evaluateId:
+ state.chooseMent == null ? 0 : state.chooseMent.assessmentId,
+ homeWorkId: 0,
+ name: state.inputV1,
+ noProjectMember: state.radioV2 == "1" ? 0 : 1,
+ offcourseId: 0,
+ offcoursePlanId: props.edit ? props.EditFaceId : 0,
+ projectMember: state.radioV2 == "1" ? 1 : 0,
+ signFlag: 0,
+ signWordFlag: 0,
+ teacherId: 0,
+ testId: 0,
+ };
+
+ if (props.edit) {
+ editPlan(obj)
+ .then((res) => {
+ updateTask(res);
+ closeDrawer();
+ })
+ .catch((err) => {
+ message.error(`添加失败${err}`);
+ });
+ } else {
+ editPlan(obj)
+ .then((res) => {
+ updateTask(res);
+ closeDrawer();
+ })
+ .catch((err) => {
+ message.error(`添加失败${err}`);
+ });
+ }
+ }
+ };
+ const upDateTable = (value) => {
+ console.log("gg", value);
+ console.log("gg", value[0].name);
+ state.chooseCourse = value[0];
+ state.chooseCourseName = value[0].name;
+ };
//更新任务列表
+ // 新增编辑或新增项目任务
const updateTask = (res) => {
if (props.isLevel == 1) {
let editObj1 = {
@@ -511,17 +679,44 @@ export default {
ProjectEditTask(editObj)
.then(() => {
message.success(
- `${props.EditTestId ? "编辑" : "新增"}阶段任务成功`
+ `${props.EditFaceId ? "编辑" : "新增"}阶段任务成功`
);
ctx.emit("changeData", false);
})
.catch(() => {
- message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
+ message.error(`${props.EditFaceId ? "编辑" : "新增"}阶段任务失败`);
});
} else if (props.isLevel == 3) {
console.log("");
}
};
+ const closeTag = () => {
+ state.chooseCourse = null;
+ state.chooseCourseName = null;
+ };
+ const closeTagWork = () => {
+ state.chooseWork = null;
+ state.chooseWorkName = null;
+ };
+ const getWork = (value) => {
+ console.log("getWork", value);
+ state.chooseWork = value;
+ state.chooseWorkName = value.workName;
+ console.log("getWorkName", value.workName);
+ };
+ const handleChange = ({ file, fileList }) => {
+ if (file.status !== "uploading") {
+ console.log(file, fileList);
+ }
+ };
+ const showAssessment = () => {
+ state.assessmentVisible = true;
+ };
+ const faceAssess = (value) => {
+ console.log(value);
+ state.chooseMent = value;
+ state.chooseMentName = value.name;
+ };
return {
...toRefs(state),
showDrawerSelFacet,
@@ -534,6 +729,13 @@ export default {
updateFaceTeach,
updateTask,
upDateTable,
+ closeTag,
+ getWork,
+ closeTagWork,
+ clear,
+ handleChange,
+ showAssessment,
+ faceAssess,
// change,
};
},
diff --git a/src/components/drawers/AddHomework.vue b/src/components/drawers/AddHomework.vue
index 1f5f6d76..0f2a48df 100644
--- a/src/components/drawers/AddHomework.vue
+++ b/src/components/drawers/AddHomework.vue
@@ -77,7 +77,7 @@
@@ -96,7 +96,7 @@
@@ -164,6 +164,10 @@ export default {
type: Number,
default: null,
},
+ face: {
+ type: Boolean,
+ default: false,
+ },
},
setup(props, ctx) {
const formState = reactive({
@@ -362,6 +366,13 @@ export default {
}
};
+ const cle = () => {
+ console.log("xx", formState);
+ if (props.face) {
+ ctx.emit("getWork", formState);
+ }
+ };
+
return {
afterVisibleChange,
closeDrawer,
@@ -375,6 +386,7 @@ export default {
formRef,
// layout,
rules,
+ cle,
...toRefs(state),
};
},
diff --git a/src/components/drawers/NoticeHis.vue b/src/components/drawers/NoticeHis.vue
index 953cf8aa..023a452c 100644
--- a/src/components/drawers/NoticeHis.vue
+++ b/src/components/drawers/NoticeHis.vue
@@ -62,12 +62,17 @@ export default {
state.notice = array;
};
const getNotice = () => {
- noticeList(props.projectId)
+ let obj = {
+ pageNo: 1,
+ pageSize: 10,
+ projectId: props.projectId,
+ };
+ noticeList(obj)
.then((res) => {
console.log("获取公告列表成功");
let result = res.data.data;
- if (result.length > 0) {
- setNoticeData(result);
+ if (result.total > 0) {
+ setNoticeData(result.rows);
}
})
.catch((err) => {
diff --git a/src/components/drawers/NoticePub.vue b/src/components/drawers/NoticePub.vue
index fe4cb355..e98f695e 100644
--- a/src/components/drawers/NoticePub.vue
+++ b/src/components/drawers/NoticePub.vue
@@ -56,10 +56,10 @@ export default {
return message.warning("请输入公告内容");
} else {
let obj = {
- createId: state.projectInfo.createId,
- createName: state.projectInfo.createName,
+ // createId: state.projectInfo.createId,
+ // createName: state.projectInfo.createName,
notice: state.noticeContent,
- noticeId: 0,
+ // noticeId: 0,
projectId: props.projectId,
title: "",
};
diff --git a/src/components/drawers/SelFacet.vue b/src/components/drawers/SelFacet.vue
index 92941fe6..79eeabc4 100644
--- a/src/components/drawers/SelFacet.vue
+++ b/src/components/drawers/SelFacet.vue
@@ -216,7 +216,7 @@ export default {
state.selectedRowKeys = selectedRowKeys;
state.selectedRows = selectedRows;
- console.log(selectedRows);
+ console.log("选择了", state.selectedRows[0].name);
};
const closeDrawer = () => {
ctx.emit("update:selfacetVisible", false);
diff --git a/src/components/drawers/StuScoreDetail.vue b/src/components/drawers/StuScoreDetail.vue
index b137242c..d287d101 100644
--- a/src/components/drawers/StuScoreDetail.vue
+++ b/src/components/drawers/StuScoreDetail.vue
@@ -53,7 +53,7 @@