feat:修改版本号

This commit is contained in:
lixg
2022-12-14 09:03:23 +08:00
parent a093dd629e
commit 0382f7ae12
2 changed files with 181 additions and 221 deletions

View File

@@ -44,7 +44,7 @@ export default defineComponent({
const store = useStore(); const store = useStore();
const isLogin = ref(false); const isLogin = ref(false);
// console.log("router", router.getRoutes(), route); // console.log("router", router.getRoutes(), route);
console.log("版本0.9.12------------"); console.log("版本0.9.13------------");
const routes = computed(() => { const routes = computed(() => {
return router.getRoutes().filter((e) => e.meta?.isLink); return router.getRoutes().filter((e) => e.meta?.isLink);
}); });

View File

@@ -49,7 +49,7 @@
<div class="btnbox"> <div class="btnbox">
<a-input <a-input
v-model:value="test.examinationName" v-model:value="test.examinationName"
style="width: 400px; height: 40px; border-radius: 8px;" style="width: 400px; height: 40px; border-radius: 8px"
placeholder="请输入考试名称" placeholder="请输入考试名称"
:maxlength="20" :maxlength="20"
/> />
@@ -71,17 +71,11 @@
{{ chooseCourse ? "重选" : "选择" }}试卷 {{ chooseCourse ? "重选" : "选择" }}试卷
</button> </button>
<div v-if="paperName != ''"> <div v-if="paperName != ''">
<a-tag <a-tag closable color="processing" @close="delTag">
closable
color="processing"
@close="delTag"
>
<span style="font-size: 14px; line-height: 33px">{{ <span style="font-size: 14px; line-height: 33px">{{
paperName paperName
}}</span> }}</span>
</a-tag> </a-tag>
</div> </div>
</div> </div>
<!-- 选择面授侧弹窗 --> <!-- 选择面授侧弹窗 -->
@@ -105,8 +99,9 @@
</div> </div>
<span style="margin-right: 3px">考试时间</span> <span style="margin-right: 3px">考试时间</span>
</div> </div>
<div class="btnbox" > <div class="btnbox">
<a-range-picker style="width: 400px; height: 40px; border-radius: 8px;" <a-range-picker
style="width: 400px; height: 40px; border-radius: 8px"
show-time show-time
format="YYYY/MM/DD HH:mm" format="YYYY/MM/DD HH:mm"
v-model:value="test.chooseTime" v-model:value="test.chooseTime"
@@ -129,7 +124,7 @@
:min="0" :min="0"
:max="300" :max="300"
:precision="0" :precision="0"
style="width: 400px; height: 40px; border-radius: 8px;" style="width: 400px; height: 40px; border-radius: 8px"
v-model:value="test.examinationDuration" v-model:value="test.examinationDuration"
></a-input-number> ></a-input-number>
<span style="color: #999999; margin-left: 8px">分钟</span> <span style="color: #999999; margin-left: 8px">分钟</span>
@@ -170,37 +165,30 @@
" "
v-model:value="test.examinationLimit" v-model:value="test.examinationLimit"
></a-input-number> ></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> </div>
</div> </div>
<div class="main_item"> <div class="main_item">
<div class="signbox"> <div class="signbox">
<span style="margin-right: 3px">显示答案</span> <span style="margin-right: 3px">显示答案</span>
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-radio-group <a-radio-group
style="margin-right: 12px" style="margin-right: 12px"
v-model:value="test.showAnswers" v-model:value="test.showAnswers"
> >
<a-radio <a-radio v-model:checked="checked" :value="1" @click="cloradio1"
v-model:checked="checked"
:value="1"
@click="cloradio1"
>允许查看 >允许查看
</a-radio> </a-radio>
<a-radio <a-radio v-model:checked="checked" :value="2" @click="cloradio1"
v-model:checked="checked"
:value="2"
@click="cloradio1"
>不允许查看 >不允许查看
</a-radio> </a-radio>
</a-radio-group> </a-radio-group>
</div> </div>
</div> </div>
<div class="main_item"> <div class="main_item">
@@ -208,25 +196,17 @@
<span style="margin-right: 3px">显示解析</span> <span style="margin-right: 3px">显示解析</span>
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-radio-group <a-radio-group
style="margin-right: 12px" style="margin-right: 12px"
v-model:value="test.showAnalysis" v-model:value="test.showAnalysis"
> >
<a-radio <a-radio v-model:checked="checked" :value="1" @click="cloradio2"
v-model:checked="checked"
:value="1"
@click="cloradio2"
>允许查看 >允许查看
</a-radio> </a-radio>
<a-radio <a-radio v-model:checked="checked" :value="2" @click="cloradio2"
v-model:checked="checked"
:value="2"
@click="cloradio2"
>不允许查看 >不允许查看
</a-radio> </a-radio>
</a-radio-group> </a-radio-group>
</div> </div>
</div> </div>
<div class="main_item"> <div class="main_item">
@@ -234,25 +214,17 @@
<span style="margin-right: 3px">评分模式</span> <span style="margin-right: 3px">评分模式</span>
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-radio-group <a-radio-group
style="margin-right: 12px" style="margin-right: 12px"
v-model:value="test.scoringModel" v-model:value="test.scoringModel"
> >
<a-radio <a-radio v-model:checked="checked" :value="1" @click="cloradio3"
v-model:checked="checked"
:value="1"
@click="cloradio3"
>最高一次 >最高一次
</a-radio> </a-radio>
<a-radio <a-radio v-model:checked="checked" :value="2" @click="cloradio3"
v-model:checked="checked"
:value="2"
@click="cloradio3"
>最后一次 >最后一次
</a-radio> </a-radio>
</a-radio-group> </a-radio-group>
</div> </div>
</div> </div>
<div class="main_item"> <div class="main_item">
@@ -260,11 +232,10 @@
<span style="margin-right: 3px">及格线</span> <span style="margin-right: 3px">及格线</span>
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-input <a-input
v-model:value="test.passLine" v-model:value="test.passLine"
type="number" type="number"
style="width: 400px; height: 40px; border-radius: 8px;" style="width: 400px; height: 40px; border-radius: 8px"
/> />
<span style="color: #999999; margin-left: 8px"></span> <span style="color: #999999; margin-left: 8px"></span>
@@ -276,7 +247,6 @@
<span style="margin-right: 3px">作业要求</span> <span style="margin-right: 3px">作业要求</span>
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-radio-group <a-radio-group
style="margin-right: 12px" style="margin-right: 12px"
v-model:value="test.questionArrangement" v-model:value="test.questionArrangement"
@@ -306,13 +276,10 @@
>不乱序 >不乱序
</a-radio> </a-radio>
</a-radio-group> </a-radio-group>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="main_btns"> <div class="main_btns">
<a-button class="btn1" @click="closeDrawer2">取消</a-button> <a-button class="btn1" @click="closeDrawer2">取消</a-button>
@@ -329,7 +296,7 @@
</a-drawer> </a-drawer>
</template> </template>
<script> <script>
import { reactive,toRefs } from "vue"; import { reactive, toRefs } from "vue";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import { import {
createExamination, createExamination,
@@ -407,9 +374,7 @@ export default {
}, },
setup(props, ctx) { setup(props, ctx) {
const state = reactive({ const state = reactive({
test:{ test: {},
},
addLoading: false, addLoading: false,
isOuter: 1, // 是否为外部考试 isOuter: 1, // 是否为外部考试
@@ -433,14 +398,11 @@ export default {
], ],
}); });
const clearAll = () => { const clearAll = () => {
state.test={}; state.test = {};
}; };
const closeDrawer = () => { const closeDrawer = () => {
state.statechoosedTime = ""; state.statechoosedTime = "";
ctx.emit("update:addtestVisible", false); ctx.emit("update:addtestVisible", false);
ctx.emit("update:edit", false); ctx.emit("update:edit", false);
@@ -474,14 +436,15 @@ export default {
state.paperName = ""; state.paperName = "";
}; };
const queryTest = () => { const queryTest = () => {
queryExaminationDetailById({ examinationId: props.EditTestId }) queryExaminationDetailById({ examinationId: props.EditTestId })
.then((res) => { .then((res) => {
state.test = res.data.data; state.test = res.data.data;
state.test.showAnswers = Number(state.test.showAnswers); state.test.showAnswers = Number(state.test.showAnswers);
state.test.showAnalysis = Number(state.test.showAnalysis); state.test.showAnalysis = Number(state.test.showAnalysis);
state.test.scoringModel =Number(state.test.scoringModel); state.test.scoringModel = Number(state.test.scoringModel);
state.test.questionArrangement =Number(state.test.questionArrangement); state.test.questionArrangement = Number(
state.test.questionArrangement
);
state.test.chooseTime = [ state.test.chooseTime = [
dayjs(res.data.data.examinationStartTime, "YYYY-MM-DD HH:mm:ss"), dayjs(res.data.data.examinationStartTime, "YYYY-MM-DD HH:mm:ss"),
dayjs(res.data.data.examinationEndTime, "YYYY-MM-DD HH:mm:ss"), dayjs(res.data.data.examinationEndTime, "YYYY-MM-DD HH:mm:ss"),
@@ -490,15 +453,13 @@ export default {
// state.paperId=dayjs // state.paperId=dayjs
state.paperId = state.test.examinationTestId; state.paperId = state.test.examinationTestId;
console.log("querytest",state.test); console.log("querytest", state.test);
}) })
.catch(() => { .catch(() => {
//message.error(`查询失败`); //message.error(`查询失败`);
}); });
}; };
const updateTest = () => { const updateTest = () => {
if (!state.test.examinationName) { if (!state.test.examinationName) {
message.destroy(); message.destroy();
return message.warning("请输入考试名称"); return message.warning("请输入考试名称");
@@ -517,7 +478,7 @@ export default {
} }
state.addLoading = true; state.addLoading = true;
console.log("test",state.test); console.log("test", state.test);
// state.test.examinationStartTime = toDate( // state.test.examinationStartTime = toDate(
// new Date(state.test.chooseTime[0].$d).getTime() / 1000, // new Date(state.test.chooseTime[0].$d).getTime() / 1000,
// "Y-M-D h:m" // "Y-M-D h:m"
@@ -530,7 +491,7 @@ export default {
new Date(state.test.chooseTime[0].$d).getTime() / 1000, new Date(state.test.chooseTime[0].$d).getTime() / 1000,
"Y-M-D h:m" "Y-M-D h:m"
); );
state.test.examinationEndTime =toDate( state.test.examinationEndTime = toDate(
new Date(state.test.chooseTime[1].$d).getTime() / 1000, new Date(state.test.chooseTime[1].$d).getTime() / 1000,
"Y-M-D h:m" "Y-M-D h:m"
); );
@@ -538,7 +499,7 @@ export default {
//TODO缺少paperName字段 //TODO缺少paperName字段
state.test.examinationTestName = state.paperName; state.test.examinationTestName = state.paperName;
if (props.EditTestId>0) { if (props.EditTestId > 0) {
// 编辑任务 // 编辑任务
updateExamination(state.test) updateExamination(state.test)
.then(async (res) => { .then(async (res) => {
@@ -570,7 +531,7 @@ export default {
closeDrawer(); closeDrawer();
} else { } else {
if (props.isLevel == 1) { if (props.isLevel == 1) {
if(!props.isactive){ if (!props.isactive) {
message.destroy(); message.destroy();
return message.warning("请先选中关卡"); return message.warning("请先选中关卡");
} }
@@ -673,7 +634,6 @@ export default {
}; };
return { return {
afterVisibleChange, afterVisibleChange,
closeDrawer, closeDrawer,
closeDrawer2, closeDrawer2,