mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 19:06:45 +08:00
【2.23第一轮测试-面授管理-开课】创建开课点击保存 一直转圈,无法创建成功
【生产环境-课程库-面授管理】点击“查看”预览,点击预览中的"下载"会从当前窗口打开,打开后没有返回按钮,无法返回上一级,操作不方便,优化一下 【2.23第一轮测试-学习路径图-任务】创建外部考试,显示保存成功,但是到任务列表中看不到此任务
This commit is contained in:
@@ -219,6 +219,8 @@ export const cancelOrAuth = (obj) => http.post('/admin/certificate/cancelOrAuth'
|
||||
export const allPoints = (obj) => http.get('/points/project/allPoints', { params: obj })
|
||||
export const updateStuCert = (obj) => http.post('/admin/certificate/updateStuCert', obj)
|
||||
|
||||
//添加外部考试
|
||||
export const createExamination = (obj) => http.post('/examination/createExamination', obj)
|
||||
// 外部考试导入成绩
|
||||
export const ImportExternalExamScore = (obj) => http.post('/admin/external/exam/manage/importExternalExamScore', obj, { headers: { "Content-Type": "multipart/form-data" } })
|
||||
//分组
|
||||
|
||||
@@ -2,71 +2,45 @@
|
||||
<div @click="openDrawer">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<a-drawer
|
||||
:visible="visible"
|
||||
class="drawerStyle addtestDrawer"
|
||||
width="800"
|
||||
placement="right"
|
||||
>
|
||||
<a-drawer :visible="visible" class="drawerStyle addtestDrawer" width="800" placement="right">
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">{{ taskIndex >= 0 ? "编辑" : "添加" }}考试</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer" />
|
||||
</div>
|
||||
<div style="display: flex; flex-direction: row; padding-top: 0px; margin-top: 20px; margin-left: 32px;">
|
||||
<div>
|
||||
<button
|
||||
style="width: 100px; cursor: pointer;"
|
||||
@click="changeOuter(1)"
|
||||
:class="formData.examType === 1 ? 'outer' : 'notOuter'"
|
||||
>
|
||||
<button style="width: 100px; cursor: pointer;" @click="changeOuter(1)"
|
||||
:class="formData.examType === 1 ? 'outer' : 'notOuter'">
|
||||
系统考试
|
||||
</button>
|
||||
<button
|
||||
:disabled="taskIndex >= 0"
|
||||
style="width: 100px; cursor: pointer;"
|
||||
@click="changeOuter(2)"
|
||||
:class="formData.examType === 2 ? 'outer' : 'notOuter'"
|
||||
>
|
||||
<button :disabled="taskIndex >= 0" style="width: 100px; cursor: pointer;" @click="changeOuter(2)"
|
||||
:class="formData.examType === 2 ? 'outer' : 'notOuter'">
|
||||
外部考试
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="formData.examType===1" class="contentMain">
|
||||
<div v-if="formData.examType === 1" class="contentMain">
|
||||
<div class="main_left">
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
|
||||
</div>
|
||||
<span style="margin-right: 3px">考试名称:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="formData.examinationName"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入考试名称"
|
||||
:maxlength="20"
|
||||
:disabled="taskIndex >= 0"
|
||||
/>
|
||||
<a-input v-model:value="formData.examinationName" style="width: 400px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入考试名称" :maxlength="20" :disabled="taskIndex >= 0" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
|
||||
</div>
|
||||
<span style="margin-right: 3px">选择试卷:</span>
|
||||
</div>
|
||||
@@ -87,65 +61,40 @@
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
|
||||
</div>
|
||||
<span style="margin-right: 3px">考试时间:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-range-picker
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
: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"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
/>
|
||||
<a-range-picker style="width: 400px; height: 40px; border-radius: 8px" :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" :placeholder="[' 开始时间', ' 结束时间']" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
|
||||
</div>
|
||||
<span style="margin-right: 3px">考试时长:</span>
|
||||
</div>
|
||||
<div class="select">
|
||||
<a-input-number
|
||||
:disabled="taskIndex >= 0"
|
||||
:min="0"
|
||||
:max="300"
|
||||
:precision="0"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
v-model:value="formData.examinationDuration"
|
||||
></a-input-number>
|
||||
<a-input-number :disabled="taskIndex >= 0" :min="0" :max="300" :precision="0"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
v-model:value="formData.examinationDuration"></a-input-number>
|
||||
<span style="color: #999999; margin-left: 8px">分钟</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
|
||||
</div>
|
||||
<span style="margin-right: 3px">及格线:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
:disabled="taskIndex >= 0"
|
||||
v-model:value="formData.passLine"
|
||||
type="number"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
/>
|
||||
<a-input :disabled="taskIndex >= 0" v-model:value="formData.passLine" type="number"
|
||||
style="width: 400px; height: 40px; border-radius: 8px" />
|
||||
|
||||
<span style="color: #999999; margin-left: 8px">分</span>
|
||||
</div>
|
||||
@@ -155,15 +104,8 @@
|
||||
<span style="margin-right: 3px">考试说明:</span>
|
||||
</div>
|
||||
<div class="textarea">
|
||||
<a-textarea
|
||||
:disabled="taskIndex >= 0"
|
||||
v-model:value="formData.examinationExplain"
|
||||
placeholder="请输入考试说明"
|
||||
allow-clear
|
||||
show-count
|
||||
:maxlength="200"
|
||||
:rows="6"
|
||||
/>
|
||||
<a-textarea :disabled="taskIndex >= 0" v-model:value="formData.examinationExplain" placeholder="请输入考试说明"
|
||||
allow-clear show-count :maxlength="200" :rows="6" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item2">
|
||||
@@ -174,21 +116,12 @@
|
||||
<div class="setbox">
|
||||
<div class="timerbox">
|
||||
<span>允许重复考试:</span>
|
||||
<a-input-number
|
||||
:disabled="taskIndex >= 0"
|
||||
:min="-1"
|
||||
:max="300"
|
||||
:precision="0"
|
||||
style="
|
||||
width: 100px;
|
||||
height: 32px;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;"
|
||||
v-model:value="formData.examinationLimit"
|
||||
></a-input-number>
|
||||
<span style="color: #999999; margin-left: 8px"
|
||||
>次,-1表示无限制</span
|
||||
>
|
||||
<a-input-number :disabled="taskIndex >= 0" :min="-1" :max="300" :precision="0" style="
|
||||
width: 100px;
|
||||
height: 32px;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;" v-model:value="formData.examinationLimit"></a-input-number>
|
||||
<span style="color: #999999; margin-left: 8px">次,-1表示无限制</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -199,11 +132,7 @@
|
||||
<span style="margin-right: 3px">显示答案:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-radio-group
|
||||
:disabled="taskIndex >= 0"
|
||||
style="margin-right: 12px"
|
||||
v-model:value="formData.showAnswers"
|
||||
>
|
||||
<a-radio-group :disabled="taskIndex >= 0" style="margin-right: 12px" v-model:value="formData.showAnswers">
|
||||
<a-radio :value="1">允许查看</a-radio>
|
||||
<a-radio :value="2">不允许查看</a-radio>
|
||||
</a-radio-group>
|
||||
@@ -214,11 +143,7 @@
|
||||
<span style="margin-right: 3px">显示解析:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-radio-group
|
||||
:disabled="taskIndex >= 0"
|
||||
style="margin-right: 12px"
|
||||
v-model:value="formData.showAnalysis"
|
||||
>
|
||||
<a-radio-group :disabled="taskIndex >= 0" style="margin-right: 12px" v-model:value="formData.showAnalysis">
|
||||
<a-radio :value="1">允许查看</a-radio>
|
||||
<a-radio :value="2">不允许查看</a-radio>
|
||||
</a-radio-group>
|
||||
@@ -229,11 +154,7 @@
|
||||
<span style="margin-right: 3px">评分模式:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-radio-group
|
||||
:disabled="taskIndex >= 0"
|
||||
style="margin-right: 12px"
|
||||
v-model:value="formData.scoringModel"
|
||||
>
|
||||
<a-radio-group :disabled="taskIndex >= 0" style="margin-right: 12px" v-model:value="formData.scoringModel">
|
||||
<a-radio :value="1">最高一次</a-radio>
|
||||
<a-radio :value="2">最后一次</a-radio>
|
||||
</a-radio-group>
|
||||
@@ -246,11 +167,8 @@
|
||||
<span style="margin-right: 3px">试题排列:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-radio-group
|
||||
:disabled="taskIndex >= 0"
|
||||
style="margin-right: 12px"
|
||||
v-model:value="formData.questionArrangement"
|
||||
>
|
||||
<a-radio-group :disabled="taskIndex >= 0" style="margin-right: 12px"
|
||||
v-model:value="formData.questionArrangement">
|
||||
<a-radio :value="1">试题乱序</a-radio>
|
||||
<a-radio :value="2">选项乱序</a-radio>
|
||||
<a-radio :value="3">全部乱序</a-radio>
|
||||
@@ -266,39 +184,25 @@
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
|
||||
</div>
|
||||
<span style="margin-right: 3px">考试名称:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="formData.examinationName"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入考试名称"
|
||||
:maxlength="20"
|
||||
/>
|
||||
<a-input v-model:value="formData.examinationName" style="width: 400px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入考试名称" :maxlength="20" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
|
||||
</div>
|
||||
<span style="margin-right: 3px">数据来源:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="formData.source"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入数据来源"
|
||||
:maxlength="20"
|
||||
/>
|
||||
<a-input v-model:value="formData.source" style="width: 400px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入数据来源" :maxlength="20" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item2">
|
||||
@@ -306,14 +210,8 @@
|
||||
<span style="margin-right: 3px">考试说明:</span>
|
||||
</div>
|
||||
<div class="textarea">
|
||||
<a-textarea
|
||||
v-model:value="formData.externalExplain"
|
||||
placeholder="请输入考试说明"
|
||||
allow-clear
|
||||
show-count
|
||||
:maxlength="200"
|
||||
:rows="6"
|
||||
/>
|
||||
<a-textarea v-model:value="formData.externalExplain" placeholder="请输入考试说明" allow-clear show-count
|
||||
:maxlength="200" :rows="6" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -326,10 +224,11 @@
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script setup>
|
||||
import {defineEmits, defineProps, ref, watch} from "vue";
|
||||
import { defineEmits, defineProps, ref, watch } from "vue";
|
||||
import STest from "./SelectTest.vue";
|
||||
import { createExamination } from "@/api/index1";
|
||||
import dayjs from "dayjs";
|
||||
import {Form, message} from "ant-design-vue";
|
||||
import { Form, message } from "ant-design-vue";
|
||||
|
||||
const props = defineProps({
|
||||
type: Number,
|
||||
@@ -410,7 +309,7 @@ const emit = defineEmits({})
|
||||
const taskIndex = ref(-1);
|
||||
const dateTime = ref([]);
|
||||
|
||||
const {resetFields, validate} = Form.useForm(formData, rulesRef);
|
||||
const { resetFields, validate } = Form.useForm(formData, rulesRef);
|
||||
|
||||
watch(() => formData.value.examType, () => {
|
||||
formData.value.examType === 1 ? rulesRef.value = innerRule : rulesRef.value = outerRule
|
||||
@@ -436,19 +335,26 @@ const disabledDate = (current) => {
|
||||
|
||||
// 系统考试
|
||||
async function confirm() {
|
||||
debugger
|
||||
await validate().catch(({errorFields}) => {
|
||||
// debugger
|
||||
await validate().catch(({ errorFields }) => {
|
||||
message.warning(errorFields[0].errors.join());
|
||||
throw Error("数据校验不通过")
|
||||
});
|
||||
if (taskIndex.value === -1) {
|
||||
const list = props.taskList
|
||||
list.push({name: formData.value.examinationName, type: props.type, info: {...formData.value}})
|
||||
list.push({ name: formData.value.examinationName, type: props.type, info: { ...formData.value } })
|
||||
} else {
|
||||
const data = props.taskList[taskIndex.value]
|
||||
data.name = formData.value.examinationName
|
||||
data.info = {...formData.value}
|
||||
data.info = { ...formData.value }
|
||||
}
|
||||
let obj = formData.value;
|
||||
createExamination(obj).then(res => {
|
||||
console.log(res)
|
||||
message.success("添加成功");
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
emit('update:taskList', [...props.taskList])
|
||||
closeDrawer()
|
||||
}
|
||||
@@ -473,7 +379,7 @@ function changeOuter(v) {
|
||||
formData.value.examType = v;
|
||||
}
|
||||
|
||||
defineExpose({openDrawer})
|
||||
defineExpose({ openDrawer })
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.ant-table-striped :deep(.table-striped) td {
|
||||
@@ -660,7 +566,7 @@ defineExpose({openDrawer})
|
||||
padding-left: 5px !important;
|
||||
}
|
||||
|
||||
.ant-table-thead > tr > th {
|
||||
.ant-table-thead>tr>th {
|
||||
background-color: rgba(239, 244, 252, 1);
|
||||
}
|
||||
|
||||
@@ -668,9 +574,7 @@ defineExpose({openDrawer})
|
||||
background-color: #eff4fc !important;
|
||||
}
|
||||
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
.ant-table-tbody>tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user