mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-08 10:26:44 +08:00
feat:修改版本号
This commit is contained in:
@@ -44,7 +44,7 @@ export default defineComponent({
|
||||
const store = useStore();
|
||||
const isLogin = ref(false);
|
||||
// console.log("router", router.getRoutes(), route);
|
||||
console.log("版本0.9.12------------");
|
||||
console.log("版本0.9.13------------");
|
||||
const routes = computed(() => {
|
||||
return router.getRoutes().filter((e) => e.meta?.isLink);
|
||||
});
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
外部考试
|
||||
</button> -->
|
||||
</div>
|
||||
|
||||
<div class="contentMain">
|
||||
<div class="main_left">
|
||||
<div class="main_item">
|
||||
|
||||
<div class="contentMain">
|
||||
<div class="main_left">
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img
|
||||
@@ -49,13 +49,13 @@
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="test.examinationName"
|
||||
style="width: 400px; height: 40px; border-radius: 8px;"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入考试名称"
|
||||
:maxlength="20"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
@@ -70,18 +70,12 @@
|
||||
<button class="xkbtn" @click="selectTest">
|
||||
{{ chooseCourse ? "重选" : "选择" }}试卷
|
||||
</button>
|
||||
<div v-if="paperName != ''">
|
||||
<a-tag
|
||||
|
||||
closable
|
||||
color="processing"
|
||||
@close="delTag"
|
||||
>
|
||||
<span style="font-size: 14px; line-height: 33px">{{
|
||||
paperName
|
||||
}}</span>
|
||||
</a-tag>
|
||||
|
||||
<div v-if="paperName != ''">
|
||||
<a-tag closable color="processing" @close="delTag">
|
||||
<span style="font-size: 14px; line-height: 33px">{{
|
||||
paperName
|
||||
}}</span>
|
||||
</a-tag>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 选择面授侧弹窗 -->
|
||||
@@ -94,7 +88,7 @@
|
||||
</div>
|
||||
<!-- 选择面授侧弹窗 -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
@@ -105,8 +99,9 @@
|
||||
</div>
|
||||
<span style="margin-right: 3px">考试时间:</span>
|
||||
</div>
|
||||
<div class="btnbox" >
|
||||
<a-range-picker style="width: 400px; height: 40px; border-radius: 8px;"
|
||||
<div class="btnbox">
|
||||
<a-range-picker
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
show-time
|
||||
format="YYYY/MM/DD HH:mm"
|
||||
v-model:value="test.chooseTime"
|
||||
@@ -129,7 +124,7 @@
|
||||
:min="0"
|
||||
:max="300"
|
||||
:precision="0"
|
||||
style="width: 400px; height: 40px; border-radius: 8px;"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
v-model:value="test.examinationDuration"
|
||||
></a-input-number>
|
||||
<span style="color: #999999; margin-left: 8px">分钟</span>
|
||||
@@ -154,7 +149,7 @@
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">考试限制:</span>
|
||||
</div>
|
||||
<div class="kqszbox">
|
||||
<div class="kqszbox">
|
||||
<div class="setbox">
|
||||
<div class="timerbox">
|
||||
<span>允许重复考试:</span>
|
||||
@@ -170,166 +165,138 @@
|
||||
"
|
||||
v-model:value="test.examinationLimit"
|
||||
></a-input-number>
|
||||
<span style="color: #999999; margin-left: 8px">次,-1表示无限制</span>
|
||||
<span style="color: #999999; margin-left: 8px"
|
||||
>次,-1表示无限制</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">显示答案:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
|
||||
<a-radio-group
|
||||
style="margin-right: 12px"
|
||||
v-model:value="test.showAnswers"
|
||||
>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="1"
|
||||
@click="cloradio1"
|
||||
>允许查看
|
||||
</a-radio>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="2"
|
||||
@click="cloradio1"
|
||||
>不允许查看
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-radio-group
|
||||
style="margin-right: 12px"
|
||||
v-model:value="test.showAnswers"
|
||||
>
|
||||
<a-radio v-model:checked="checked" :value="1" @click="cloradio1"
|
||||
>允许查看
|
||||
</a-radio>
|
||||
<a-radio v-model:checked="checked" :value="2" @click="cloradio1"
|
||||
>不允许查看
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">显示解析:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
|
||||
<a-radio-group
|
||||
style="margin-right: 12px"
|
||||
v-model:value="test.showAnalysis"
|
||||
>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="1"
|
||||
@click="cloradio2"
|
||||
>允许查看
|
||||
</a-radio>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="2"
|
||||
@click="cloradio2"
|
||||
>不允许查看
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-radio-group
|
||||
style="margin-right: 12px"
|
||||
v-model:value="test.showAnalysis"
|
||||
>
|
||||
<a-radio v-model:checked="checked" :value="1" @click="cloradio2"
|
||||
>允许查看
|
||||
</a-radio>
|
||||
<a-radio v-model:checked="checked" :value="2" @click="cloradio2"
|
||||
>不允许查看
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">评分模式:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
|
||||
<a-radio-group
|
||||
style="margin-right: 12px"
|
||||
v-model:value="test.scoringModel"
|
||||
>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="1"
|
||||
@click="cloradio3"
|
||||
>最高一次
|
||||
</a-radio>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="2"
|
||||
@click="cloradio3"
|
||||
>最后一次
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-radio-group
|
||||
style="margin-right: 12px"
|
||||
v-model:value="test.scoringModel"
|
||||
>
|
||||
<a-radio v-model:checked="checked" :value="1" @click="cloradio3"
|
||||
>最高一次
|
||||
</a-radio>
|
||||
<a-radio v-model:checked="checked" :value="2" @click="cloradio3"
|
||||
>最后一次
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">及格线:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
|
||||
<a-input
|
||||
v-model:value="test.passLine"
|
||||
type="number"
|
||||
style="width: 400px; height: 40px; border-radius: 8px;"
|
||||
/>
|
||||
|
||||
<span style="color: #999999; margin-left: 8px">分</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="test.passLine"
|
||||
type="number"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
/>
|
||||
|
||||
<span style="color: #999999; margin-left: 8px">分</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="main_item">
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">作业要求:</span>
|
||||
</div>
|
||||
<span style="margin-right: 3px">作业要求:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
|
||||
<a-radio-group
|
||||
style="margin-right: 12px"
|
||||
v-model:value="test.questionArrangement"
|
||||
>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="1"
|
||||
@click="cloradio4"
|
||||
>试题乱序
|
||||
</a-radio>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="2"
|
||||
@click="cloradio4"
|
||||
>选项乱序
|
||||
</a-radio>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="3"
|
||||
@click="cloradio4"
|
||||
>全部乱序
|
||||
</a-radio>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="4"
|
||||
@click="cloradio4"
|
||||
>不乱序
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
|
||||
<a-radio-group
|
||||
style="margin-right: 12px"
|
||||
v-model:value="test.questionArrangement"
|
||||
>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="1"
|
||||
@click="cloradio4"
|
||||
>试题乱序
|
||||
</a-radio>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="2"
|
||||
@click="cloradio4"
|
||||
>选项乱序
|
||||
</a-radio>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="3"
|
||||
@click="cloradio4"
|
||||
>全部乱序
|
||||
</a-radio>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="4"
|
||||
@click="cloradio4"
|
||||
>不乱序
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<a-button class="btn1" @click="closeDrawer2">取消</a-button>
|
||||
<a-button class="btn2" @click="updateTest">确定</a-button>
|
||||
</div>
|
||||
<!-- 加载动画 -->
|
||||
<div class="aeLoading" :style="{ display: addLoading ? 'flex' : 'none' }">
|
||||
<a-spin :spinning="addLoading" tip="" />
|
||||
</div>
|
||||
|
||||
<!-- 选择考试抽屉 -->
|
||||
<s-test v-model:STvisible="STvisible" @getSTData="getData" />
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<a-button class="btn1" @click="closeDrawer2">取消</a-button>
|
||||
<a-button class="btn2" @click="updateTest">确定</a-button>
|
||||
</div>
|
||||
<!-- 加载动画 -->
|
||||
<div class="aeLoading" :style="{ display: addLoading ? 'flex' : 'none' }">
|
||||
<a-spin :spinning="addLoading" tip="" />
|
||||
</div>
|
||||
|
||||
<!-- 选择考试抽屉 -->
|
||||
<s-test v-model:STvisible="STvisible" @getSTData="getData" />
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive,toRefs } from "vue";
|
||||
import { reactive, toRefs } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import {
|
||||
createExamination,
|
||||
@@ -407,10 +374,8 @@ export default {
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
test:{
|
||||
test: {},
|
||||
|
||||
},
|
||||
|
||||
addLoading: false,
|
||||
isOuter: 1, // 是否为外部考试
|
||||
STvisible: false, //选择试卷抽屉
|
||||
@@ -433,14 +398,11 @@ export default {
|
||||
],
|
||||
});
|
||||
|
||||
|
||||
const clearAll = () => {
|
||||
state.test={};
|
||||
|
||||
state.test = {};
|
||||
};
|
||||
|
||||
|
||||
const closeDrawer = () => {
|
||||
|
||||
state.statechoosedTime = "";
|
||||
ctx.emit("update:addtestVisible", false);
|
||||
ctx.emit("update:edit", false);
|
||||
@@ -474,14 +436,15 @@ export default {
|
||||
state.paperName = "";
|
||||
};
|
||||
const queryTest = () => {
|
||||
|
||||
queryExaminationDetailById({ examinationId: props.EditTestId })
|
||||
.then((res) => {
|
||||
state.test = res.data.data;
|
||||
state.test.showAnswers = Number(state.test.showAnswers);
|
||||
state.test.showAnalysis = Number(state.test.showAnalysis);
|
||||
state.test.scoringModel =Number(state.test.scoringModel);
|
||||
state.test.questionArrangement =Number(state.test.questionArrangement);
|
||||
state.test.scoringModel = Number(state.test.scoringModel);
|
||||
state.test.questionArrangement = Number(
|
||||
state.test.questionArrangement
|
||||
);
|
||||
state.test.chooseTime = [
|
||||
dayjs(res.data.data.examinationStartTime, "YYYY-MM-DD HH:mm:ss"),
|
||||
dayjs(res.data.data.examinationEndTime, "YYYY-MM-DD HH:mm:ss"),
|
||||
@@ -489,16 +452,14 @@ export default {
|
||||
state.paperName = state.test.examinationTestName;
|
||||
// state.paperId=dayjs
|
||||
state.paperId = state.test.examinationTestId;
|
||||
|
||||
console.log("querytest",state.test);
|
||||
|
||||
console.log("querytest", state.test);
|
||||
})
|
||||
.catch(() => {
|
||||
//message.error(`查询失败`);
|
||||
});
|
||||
};
|
||||
const updateTest = () => {
|
||||
|
||||
|
||||
if (!state.test.examinationName) {
|
||||
message.destroy();
|
||||
return message.warning("请输入考试名称");
|
||||
@@ -508,29 +469,29 @@ export default {
|
||||
return message.warning("请输入选择试卷");
|
||||
}
|
||||
if (!state.test.chooseTime) {
|
||||
message.destroy();
|
||||
return message.warning("请输入开始结束时间");
|
||||
message.destroy();
|
||||
return message.warning("请输入开始结束时间");
|
||||
}
|
||||
if (!state.test.examinationDuration) {
|
||||
message.destroy();
|
||||
return message.warning("请输入考试时长");
|
||||
}
|
||||
|
||||
|
||||
state.addLoading = true;
|
||||
console.log("test",state.test);
|
||||
// state.test.examinationStartTime = toDate(
|
||||
console.log("test", state.test);
|
||||
// state.test.examinationStartTime = toDate(
|
||||
// new Date(state.test.chooseTime[0].$d).getTime() / 1000,
|
||||
// "Y-M-D h:m"
|
||||
// );
|
||||
// state.test.examinationEndTime =toDate(
|
||||
// new Date(state.test.$slotschooseTime[1].$d).getTime() / 1000,
|
||||
// "Y-M-D h:m"
|
||||
// );
|
||||
// "Y-M-D h:m"
|
||||
// );
|
||||
// state.test.examinationEndTime =toDate(
|
||||
// new Date(state.test.$slotschooseTime[1].$d).getTime() / 1000,
|
||||
// "Y-M-D h:m"
|
||||
// );
|
||||
state.test.examinationStartTime = toDate(
|
||||
new Date(state.test.chooseTime[0].$d).getTime() / 1000,
|
||||
"Y-M-D h:m"
|
||||
);
|
||||
state.test.examinationEndTime =toDate(
|
||||
state.test.examinationEndTime = toDate(
|
||||
new Date(state.test.chooseTime[1].$d).getTime() / 1000,
|
||||
"Y-M-D h:m"
|
||||
);
|
||||
@@ -538,7 +499,7 @@ export default {
|
||||
//TODO缺少paperName字段
|
||||
state.test.examinationTestName = state.paperName;
|
||||
|
||||
if (props.EditTestId>0) {
|
||||
if (props.EditTestId > 0) {
|
||||
// 编辑任务
|
||||
updateExamination(state.test)
|
||||
.then(async (res) => {
|
||||
@@ -566,14 +527,14 @@ export default {
|
||||
state.EditTestId = res.data.data.examinationId;
|
||||
if (props.faceLevel) {
|
||||
state.EditTestId = res.data.data.examinationId;
|
||||
|
||||
|
||||
closeDrawer();
|
||||
} else {
|
||||
if (props.isLevel == 1) {
|
||||
if(!props.isactive){
|
||||
message.destroy();
|
||||
return message.warning("请先选中关卡");
|
||||
}
|
||||
if (!props.isactive) {
|
||||
message.destroy();
|
||||
return message.warning("请先选中关卡");
|
||||
}
|
||||
let editObj1 = {
|
||||
chapterId: props.isactive,
|
||||
duration: res.data.data.examinationDuration,
|
||||
@@ -588,7 +549,7 @@ export default {
|
||||
console.log("props.edit", props.edit);
|
||||
message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
|
||||
|
||||
closeDrawer();
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -673,7 +634,6 @@ export default {
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
closeDrawer2,
|
||||
@@ -682,9 +642,9 @@ export default {
|
||||
cloradio2,
|
||||
cloradio3,
|
||||
cloradio4,
|
||||
|
||||
|
||||
clearAll,
|
||||
|
||||
|
||||
delTag,
|
||||
// layout,
|
||||
|
||||
@@ -872,36 +832,36 @@ export default {
|
||||
}
|
||||
}
|
||||
.main_table {
|
||||
position: relative;
|
||||
padding-bottom: 80px;
|
||||
.ant-checkbox-wrapper {
|
||||
align-items: center;
|
||||
margin-top: -2px;
|
||||
}
|
||||
.ant-table-selection-column {
|
||||
padding: 0px !important;
|
||||
padding-left: 5px !important;
|
||||
}
|
||||
.ant-table-thead > tr > th {
|
||||
background-color: rgba(239, 244, 252, 1);
|
||||
}
|
||||
th.h {
|
||||
background-color: #eff4fc !important;
|
||||
}
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
.pa {
|
||||
left: 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
}
|
||||
position: relative;
|
||||
padding-bottom: 80px;
|
||||
.ant-checkbox-wrapper {
|
||||
align-items: center;
|
||||
margin-top: -2px;
|
||||
}
|
||||
.ant-table-selection-column {
|
||||
padding: 0px !important;
|
||||
padding-left: 5px !important;
|
||||
}
|
||||
.ant-table-thead > tr > th {
|
||||
background-color: rgba(239, 244, 252, 1);
|
||||
}
|
||||
th.h {
|
||||
background-color: #eff4fc !important;
|
||||
}
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
.pa {
|
||||
left: 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
}
|
||||
}
|
||||
.main_btns {
|
||||
height: 72px;
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user