mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 12:56:45 +08:00
feat:修改学习路径获取学员列表
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user