Commit 2a7346df authored by 纪泽龙's avatar 纪泽龙

Merge branch 'jzl'

parents ac7a59f7 1ee8f76b
......@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-23 11:02:24
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-09-28 11:37:33
* @LastEditTime: 2022-12-28 09:57:47
* @FilePath: /danger-manage-web/src/api/educationPlanExam/trainingProgram.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -71,7 +71,7 @@ export function deleteLesson(query) {
export function testPublish(data) {
return request({
url: '/system/course/testPublish',
method: 'put',
method: 'post',
data:data
})
}
......@@ -165,7 +165,7 @@ export function testPersonDetailByCourseId(query) {
*/
export function bachAddTopic(data) {
return request({
url: '/system/course/bachAddTopic',
url: 'system/topic/bachAddTopic',
method: 'post',
data: data
})
......
......@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-12-27 09:30:19
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-12-27 15:59:28
* @LastEditTime: 2022-12-27 17:11:25
* @FilePath: /danger-manage-web/src/views/educationPlanExam/textPaper/components/ChangeQuestion.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -105,6 +105,7 @@
<script>
import { listBank, delBank } from "@/api/educationPlanExam/questionBank";
import { bachAddTopic } from "@/api/educationPlanExam/lessonsProgram.js";
// 部门列表
......@@ -197,11 +198,16 @@ export default {
};
});
console.log(this.courseId,topicInfos);
const data = {courseId:this.courseId,topicInfos}
console.log(this.courseId, topicInfos);
const data = { courseId: this.courseId, topicInfos };
console.log(data);
// this.$parent.$parent.componentsNumChange(2);
bachAddTopic(data).then((res) => {
console.log(res);
if (res.code == 200) {
this.$parent.$parent.componentsNumChange(2);
this.$parent.$parent.$parent.getList();
}
});
},
resetClick() {},
search() {},
......
......@@ -16,7 +16,7 @@
</el-form-item>
<el-form-item label="考试开始时间" prop="startTime">
<el-date-picker
v-model="queryParams.startTime"
v-model="queryParams.testStartTime"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="选择日期时间"
......@@ -25,7 +25,7 @@
</el-form-item>
<el-form-item label="考试结束时间" prop="endTime">
<el-date-picker
v-model="queryParams.endTime"
v-model="queryParams.testEndTime"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="选择日期时间"
......@@ -62,12 +62,7 @@
</el-row>
<el-table v-loading="loading" :data="lessonsList">
<el-table-column
label="序号"
align="center"
prop="courseNum"
width="55"
/>
<el-table-column label="序号" align="center" prop="bankNum" width="55" />
<el-table-column label="课程标题" align="center" prop="courseName" />
<el-table-column
label="开始时间"
......@@ -88,7 +83,7 @@
width="180"
>
<template v-slot="{ row: { topicNum, courseId } }">
<div @click="checkQuestion(courseId)" class="timuNum">
<div class="timuNum">
<div v-if="topicNum > 0">{{ `已录入${topicNum}题` }}</div>
<div v-else>未录入</div>
</div>
......@@ -105,9 +100,10 @@
align="center"
class-name="small-padding fixed-width"
>
<template v-slot="{ row: { status, courseId } }">
<template v-slot="{ row: { status, courseId, qualifiedNum } }">
<!-- <div>{{status}}</div> -->
<el-button
:disabled="status == 1"
v-if="status == 0"
size="mini"
type="text"
......@@ -116,7 +112,9 @@
>录入考题</el-button
>
<el-button
:disabled="status == 1"
v-if="status == 0"
size="mini"
type="text"
icon="el-icon-edit"
......@@ -131,11 +129,13 @@
>删除</el-button
>
<el-button
:disabled="status == 1"
v-if="status == 0"
size="mini"
type="text"
icon="el-icon-delete"
@click="issueLesson(courseId)"
@click="issueLesson(courseId, qualifiedNum)"
>发布考试</el-button
>
</template>
......@@ -155,6 +155,9 @@
:courseId.sync="courseId"
:visible.sync="dilogFlag"
/>
<el-dialog title="提示" :visible.sync="issue" width="30%">
<div>123</div>
</el-dialog>
</div>
</template>
......@@ -164,6 +167,7 @@ import {
getLessonById,
issue,
deleteLesson,
testPublish,
} from "@/api/educationPlanExam/lessonsProgram.js";
// 获取培训计划
import { getPlanList } from "@/api/educationPlanExam/trainingProgram";
......@@ -189,9 +193,9 @@ export default {
pageNum: 1,
pageSize: 10,
dataKind: 1,
courseType: null,
courseName: null,
releaseTime: "",
testStartTime: "",
testEndTime: "",
},
// 表单参数
form: {},
......@@ -201,6 +205,7 @@ export default {
componentsNum: 1,
// 点击的id,如果是新增为空
courseId: null,
issue: false,
};
},
computed: {
......@@ -233,7 +238,15 @@ export default {
getLessons(this.queryParams)
.then((res) => {
console.log(res);
this.lessonsList = res.rows;
this.lessonsList = res.rows.map((item, index) => {
return {
bankNum:
index +
1 +
(this.queryParams.pageNum - 1) * this.queryParams.pageSize,
...item,
};
});
this.total = res.total;
})
.finally(() => {
......@@ -277,9 +290,10 @@ export default {
this.queryParams = {
pageNum: 1,
pageSize: 10,
courseType: null,
dataKind: 1,
courseName: null,
releaseTime: "",
testStartTime: "",
testEndTime: "",
};
},
deletLesson(courseId) {
......@@ -303,7 +317,7 @@ export default {
.catch(() => {});
},
// 发布
issueLesson(courseId) {
issueLesson(courseId, qualifiedNum) {
this.$confirm("请确定发布", {
confirmButtonText: "确定",
cancelButtonText: "取消",
......@@ -321,7 +335,9 @@ export default {
.then((res) => {
if (res) {
// 成功就发布
return issue({ courseId });
// return issue({ courseId });
return testPublish({ courseId, personnelType: 1 });
} else {
this.$message({
message: "请先录入答题合格数",
......@@ -354,7 +370,7 @@ export default {
}
.timuNum {
color: #1d84ff;
cursor: pointer;
// cursor: pointer;
}
::v-deep .el-select {
width: 100%;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment