提交 e905a5f5 authored 作者: matian's avatar matian

updates

上级 6d83ad83
...@@ -28,7 +28,11 @@ export function getReportDetail(id) { ...@@ -28,7 +28,11 @@ export function getReportDetail(id) {
// 验证是否有未完成的答题记录 // 验证是否有未完成的答题记录
export function checkRecord(id, type) { export function checkRecord(id, type) {
return httpRequest.post(`/api/xtraining/api/v1/answer/${id}/check-record/${type}`, {}, { return httpRequest.post(
headers: { 'Content-Type': 'application/json' } `/api/xtraining/api/v1/answer/${id}/check-record/${type}`,
}) {},
{
headers: { 'Content-Type': 'application/json' }
}
)
} }
<template> <template>
<div> <div>
<ToolCard class="main_content"> <ToolCard class="main_content">
<Step :activeStep="activeStep" class="pt50-pl60"/> <Step :activeStep="activeStep" class="pt50-pl60" />
<div> <div>
<MailStepOne v-if="activeStep === 0" class="pt-50"/> <MailStepOne v-if="activeStep === 0" class="pt-50" />
<MailStepTwo v-if="activeStep === 1" class="pt-50"/> <MailStepTwo v-if="activeStep === 1" class="pt-50" />
<div class="main_content_btn"> <div class="main_content_btn">
<div class="step_prev step_btn" @click="handlePrev" v-if="activeStep > 0">上一步</div> <div class="step_prev step_btn" @click="handlePrev" v-if="activeStep > 0">上一步</div>
<div class="step_next step_btn" @click="handleNext" v-if="activeStep >= 1 || activeStep < 3">下一步</div> <div class="step_next step_btn" @click="handleNext" v-if="activeStep >= 0 && activeStep < 3">下一步</div>
<div class="step_finished step_btn" @click="handlePreview" v-if="activeStep === 3">点击生成预览</div> <div class="step_finished step_btn" @click="handlePreview" v-if="activeStep === 3">点击生成预览</div>
</div> </div>
</div> </div>
...@@ -20,6 +20,7 @@ import ToolCard from '@/components/base/ToolCard.vue' ...@@ -20,6 +20,7 @@ import ToolCard from '@/components/base/ToolCard.vue'
import MailStepOne from '../components/mail/MailStepOne.vue' import MailStepOne from '../components/mail/MailStepOne.vue'
import Step from '@/components/base/Step.vue' import Step from '@/components/base/Step.vue'
import MailStepTwo from '../components/mail/MailStepTwo.vue' import MailStepTwo from '../components/mail/MailStepTwo.vue'
import { cacheReport } from '../api'
export default { export default {
components: { components: {
ToolCard, ToolCard,
...@@ -39,6 +40,10 @@ export default { ...@@ -39,6 +40,10 @@ export default {
}, },
// 下一步 // 下一步
handleNext() { handleNext() {
const reports = { type: 1, commit_report: [{ 1: 1 }] }
cacheReport(this.$store.state.case.id, { reports: JSON.stringify(reports) }).then(res => {
console.log(res, 'res111')
})
this.activeStep++ this.activeStep++
}, },
// 点击生成预览 // 点击生成预览
...@@ -55,7 +60,7 @@ export default { ...@@ -55,7 +60,7 @@ export default {
.main_content_btn { .main_content_btn {
display: flex; display: flex;
justify-content: center; justify-content: center;
padding-bottom:70px; padding-bottom: 70px;
.step_btn { .step_btn {
width: 119px; width: 119px;
height: 32px; height: 32px;
...@@ -82,10 +87,10 @@ export default { ...@@ -82,10 +87,10 @@ export default {
} }
} }
} }
.pt50-pl60{ .pt50-pl60 {
padding: 50px 0 0 60px; padding: 50px 0 0 60px;
} }
.pt-50{ .pt-50 {
padding-top: 50px; padding-top: 50px;
} }
</style> </style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论