Merge branch 'dongwu_develop' into boe_develop

This commit is contained in:
BOE\10867418
2023-03-20 09:47:24 +08:00
4 changed files with 29 additions and 21 deletions

View File

@@ -33,7 +33,7 @@ import {USER_PERMISSION} from "@/api/ThirdApi";
const store = useStore();
const isLogin = ref(false);
console.log("版本2.1.7------------");
console.log("版本2.1.8------------");
// 监听关闭浏览器
let time1 = ref(0);

View File

@@ -18,8 +18,8 @@ export const COURSE_PLAN_EDIT = "/admin/offcourse/editPlan post";
//删除开课
export const DEL_PLAN = id => `/admin/offcourse/deletePlan?offcoursePlanId=${id} delete`;
//作业详情
export const WORK_DETAIL = "/work/queryWorkDetailById post";
export const WORK_DETAIL = workId => `/work/queryWorkDetailById?workId=${workId} post`;
//考试
export const EXAM_DETAIL = "/examination/queryExaminationDetailById post";
export const EXAM_DETAIL = examinationId => `/examination/queryExaminationDetailById?examinationId=${examinationId} post`;
//评估
export const ASSESSMENT_DETAIL = "/assessment/queryAssessmentDetailById post";

View File

@@ -1,24 +1,29 @@
<template>
<a-checkbox @change="change">
<a-checkbox v-model:checked="checked" @change="change">
<slot></slot>
</a-checkbox>
</template>
<script setup>
import {defineEmits, defineProps} from "vue";
import {defineEmits, defineProps, ref, watchEffect} from "vue";
const props = defineProps({
checkValue: {
type: Boolean,
default: true
},
unCheckValue: {
type: Boolean,
modelValue: {
type: [Boolean, Number, String],
default: false
},
checkValue: {
type: [Boolean, Number, String],
default: false
},
unCheckValue: {
type: [Boolean, Number, String],
default: true
},
});
const emit = defineEmits(['update:modelValue']);
const emit = defineEmits(["update:modelValue"]);
const checked = ref(props.modelValue);
watchEffect(() => checked.value = props.modelValue);
const change = ({ target: { checked } }) => emit("update:modelValue", checked ? props.checkValue : props.unCheckValue);
function change({ target: { checked } }) {
emit("update:modelValue", checked ? props.checkValue : props.unCheckValue);
}
</script>

View File

@@ -146,6 +146,7 @@
:show-time="{ format: 'HH:mm' }"
:disabled-date="disabledDate"
format="YYYY-MM-DD HH:mm"
valueFormat="YYYY-MM-DD HH:mm"
v-model:value="dateTime"
@change="timeChange"
separator="至"
@@ -218,7 +219,7 @@
<span style="margin-right: 3px">报名设置</span>
</div>
<div class="b_input" style="width: 88%;">
<CheckBox v-model:checked="formData.applyFlag"
<CheckBox v-model="formData.applyFlag"
:check-value="1"
:un-check-value="0">
<span style="color: #6d7584">是否允许公开报名</span>
@@ -231,12 +232,12 @@
<span style="margin-right: 3px">现场参与</span>
</div>
<div class="b_input" style="width: 88%;display: flex;flex-direction: column;">
<CheckBox v-model:checked="formData.projectSignFlag"
<CheckBox v-model="formData.projectSignFlag"
:check-value="1"
:un-check-value="0">
<span style="color: #6d7584">允许项目内人员临时到场参加(不在本场次培训的人员可以临时签到参加)</span>
</CheckBox>
<CheckBox v-model:checked="formData.signFlag"
<CheckBox v-model="formData.signFlag"
:check-value="1"
style="margin-left: 0px;"
:un-check-value="0">
@@ -511,7 +512,7 @@ function confirm() {
const createNewCourse = () => {
resetFields({
id:null,
id: null,
type: props.type,
offcourseId: params.value.offcourseId,
draftTaskId: params.value.draftTaskId,
@@ -548,8 +549,10 @@ async function coursePlanConfirm() {
function planEdit(record) {
formData.value = { ...record };
formData.value.homeWorkId && request(WORK_DETAIL, { workId: formData.value.homeWorkId }).then(res => formData.value.workInfo = res.data);
formData.value.testId && request(EXAM_DETAIL, { examinationId: formData.value.testId }).then(res => formData.value.examInfo = res.data);
validated.value = 0;
formData.value.homeWorkId && request(WORK_DETAIL(formData.value.homeWorkId), {}).then(res => formData.value.workInfo = res.data);
formData.value.testId && request(EXAM_DETAIL(formData.value.testId), {}).then(res => formData.value.examInfo = res.data);
dateTime.value=[formData.value.beginTime,formData.value.endTime]
offCourseNewVisiable.value = true;
}