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

Merge branch 'jzl'

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