feat:修改学习路径获取学员列表

This commit is contained in:
lixg
2022-11-30 09:58:46 +08:00
parent b4b8d46fa1
commit 6275706f2a
4 changed files with 93 additions and 87 deletions

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-21 14:32:52
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2022-11-29 17:09:48
* @LastEditTime: 2022-11-29 21:03:51
* @FilePath: /fe-manage/src/api/config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@@ -53,7 +53,7 @@ http.interceptors.response.use(
return response;
} else {
if (code === 1000) {
window.open("https://u-pre.boe.com/web/", '_self');
// window.open("https://u-pre.boe.com/web/", '_self');
}
console.log("api %o", msg);
}

View File

@@ -15,8 +15,8 @@
@click="closeDrawer"
/>
</div>
<div style="display: flex; flex-direction: row; padding-top:32px;">
<div style="display: flex; flex-direction: row; padding-top: 32px">
<button
style="width: 100px"
@click="changeOuter(1)"
@@ -359,7 +359,7 @@
</a-form-item>
</div>
</div>
<div class="main_item2">
<a-form-item
has-feedback
@@ -382,8 +382,6 @@
<a-button class="btn2" html-type="submit">确定</a-button>
</div>
</a-form>
</div>
<!-- 加载动画 -->
<div class="aeLoading" :style="{ display: addLoading ? 'flex' : 'none' }">
@@ -394,7 +392,7 @@
</a-drawer>
</template>
<script>
import { reactive, ref, toRefs } from "vue";
import { reactive, ref, toRefs } from "vue";
import { message } from "ant-design-vue";
import {
createExamination,
@@ -460,7 +458,7 @@ export default {
type: Boolean,
default: false,
},
projectTemplateId:{
projectTemplateId: {
type: Number,
default: null,
},
@@ -468,9 +466,9 @@ export default {
setup(props, ctx) {
const formState = reactive({
examinationName: "",
examinationDuration:0,
examinationDuration: 0,
examinationLimit: "",
passLine:null,
passLine: null,
examinationEndTime: "",
examinationExplain: "",
questionArrangement: 1,
@@ -553,7 +551,7 @@ export default {
return Promise.reject("请输入作业名称");
}
};
let checkQuestionArrangement = async (_rule, value) => {
if (!value) {
return Promise.reject("请输入作业名称");
@@ -620,7 +618,7 @@ export default {
trigger: "change",
},
],
questionArrangement: [
{
validator: checkQuestionArrangement,
@@ -643,7 +641,8 @@ export default {
updateTest();
};
const handleFinishFailed = () => {
const handleFinishFailed = (e) => {
console.log("提交失败", e);
message.error("handleFinishFailed");
};
@@ -655,7 +654,6 @@ export default {
console.log(args);
};
const closeDrawer = () => {
formState.choosedTime = "";
ctx.emit("update:addtestVisible", false);
ctx.emit("update:edit", false);
@@ -676,7 +674,7 @@ export default {
};
const queryTest = () => {
// state.addLoading = true;
// state.addLoading = true;
queryExaminationDetailById({ examinationId: props.EditTestId })
.then((res) => {
formState.examinationName = res.data.data.examinationName;
@@ -720,7 +718,7 @@ export default {
examinationLimit: formState.examinationLimit,
examinationName: formState.examinationName,
examinationPaperId: 0,
// examinationPaperName: formState.choosedTest,
// examinationPaperName: formState.choosedTest,
examinationStartTime: dayjs(formState.choosedTime[0]).format(
"YYYY-MM-DD"
),
@@ -734,10 +732,12 @@ export default {
// 编辑任务
updateExamination(obj)
.then((res) => {
console.log("编辑考试", res);
updateTask(res);
closeDrawer();
})
.catch(() => {
.catch((err) => {
console.log("编辑失败", err);
message.error(`编辑失败`);
});
} else {
@@ -747,7 +747,8 @@ export default {
updateTask(res);
closeDrawer();
})
.catch(() => {
.catch((err) => {
console.log("创建失败", err);
message.error(`编辑失败`);
});
}
@@ -755,74 +756,77 @@ export default {
const updateTask = (res) => {
state.EditTestId = res.data.data.examinationId;
console.log("state.EditTestId=====0",state.EditTestId,props.faceLevel);
if(props.faceLevel){
console.log("state.EditTestId=====0", state.EditTestId, props.faceLevel);
if (props.faceLevel) {
state.EditTestId = res.data.data.examinationId;
console.log("state.EditTestId=====",state.EditTestId);
}else{
console.log("state.EditTestId=====", state.EditTestId);
} else {
if (props.isLevel == 1) {
let editObj1 = {
chapterId: props.isactive,
courseId: res.data.data.examinationId,
name: res.data.data.examinationName,
routerId: props.routerId,
routerTaskId: props.routerTaskId || 0,
type: 5,
};
RouterEditTask(editObj1)
.then(() => {
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
ctx.emit("changeData", false);
state.addLoading = false;
closeDrawer();
let editObj1 = {
chapterId: props.isactive,
courseId: res.data.data.examinationId,
name: res.data.data.examinationName,
routerId: props.routerId,
routerTaskId: props.routerTaskId || 0,
type: 5,
};
RouterEditTask(editObj1)
.then(() => {
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
ctx.emit("changeData", false);
state.addLoading = false;
closeDrawer();
})
.catch(() => {
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
});
} else if (props.isLevel == 2) {
let editObj = {
courseId: res.data.data.examinationId,
duration: 0,
name: res.data.data.examinationName,
projectId: props.projectId,
projectTaskId: props.projectTaskId || 0,
stageId: props.chooseStageId || 0,
type: 5,
};
// 新增编辑或新增项目
ProjectEditTask(editObj)
.then(() => {
message.success(
`${props.EditTestId ? "编辑" : "新增"}阶段任务成功`
);
ctx.emit("changeData", false);
})
.catch(() => {
message.error(
`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`
);
});
} else if (props.isLevel == 3) {
console.log("");
addTempTask({
courseId: res.data.data.examinationId,
duration: res.data.data.examinationDuration,
name: res.data.data.examinationName,
projectTemplateId: props.projectTemplateId,
projectTaskId: props.projectTaskId || 0,
stageId: props.chooseStageId || 0,
type: 5,
})
.catch(() => {
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
});
} else if (props.isLevel == 2) {
let editObj = {
courseId: res.data.data.examinationId,
duration: 0,
name: res.data.data.examinationName,
projectId: props.projectId,
projectTaskId: props.projectTaskId || 0,
stageId: props.chooseStageId || 0,
type: 5,
};
// 新增编辑或新增项目
ProjectEditTask(editObj)
.then(() => {
message.success(
`${props.EditTestId ? "编辑" : "新增"}阶段任务成功`
);
ctx.emit("changeData", false);
})
.catch(() => {
message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
});
} else if (props.isLevel == 3) {
console.log("");
addTempTask({
courseId: res.data.data.examinationId,
duration: res.data.data.examinationDuration,
name: res.data.data.examinationName,
projectTemplateId: props.projectTemplateId,
projectTaskId: props.projectTaskId || 0,
stageId: props.chooseStageId || 0,
type: 5,
})
.then(() => {
message.success(
`${props.EditTestId ? "编辑" : "新增"}阶段任务成功`
);
ctx.emit("changeData", false);
})
.catch(() => {
message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
});
.then(() => {
message.success(
`${props.EditTestId ? "编辑" : "新增"}阶段任务成功`
);
ctx.emit("changeData", false);
})
.catch(() => {
message.error(
`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`
);
});
}
}
}
};
const cloradio1 = (value) => {
@@ -963,7 +967,7 @@ export default {
cursor: pointer;
width: 130px;
height: 40px;
background: #4ea6ff;
background: #4ea6ff;
border-radius: 8px;
border: 0;
margin-right: 8px;
@@ -1010,7 +1014,7 @@ export default {
cursor: pointer;
width: 130px;
height: 40px;
background: #4ea6ff;
background: #4ea6ff;
border-radius: 8px;
border: 0;
margin-right: 16px 8px 32px 0;

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-16 20:59:33
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2022-11-24 16:21:04
* @LastEditTime: 2022-11-29 22:30:01
* @FilePath: /fe-manage/src/views/examine/CourseReviewedN.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -595,6 +595,7 @@ export default {
state.chooseId = id;
state.chooseCreater = creater;
state.chooseOffId = offId;
getFaceList();
};
const closeCourAuditModal = () => {
state.courAuditModal = false;

View File

@@ -1494,6 +1494,7 @@ export default {
key: "opacation",
width: 140,
align: "center",
fixed: "right",
scopedSlots: { customRender: "action" }, //引入的插槽
customRender: (text) => {
return (
@@ -1642,7 +1643,7 @@ export default {
name: "",
pageNo: state.currentPage,
pageSize: 10,
routerId: 100,
routerId: state.routerId,
};
api
.getStudent(obj)