增加知识点完成状态

main
JayChou 7 days ago
parent da6045421f
commit 824c4ca70c
  1. 1
      src/layout/knowledgePage.vue
  2. 13
      src/layout/studyPage.vue
  3. 3
      src/utils/auth.ts
  4. 6
      src/views/largeDataScreen/home.vue

@ -94,6 +94,7 @@ const enter = () => {
const allStudied = Knowledges.value.every(item => item.isStudy); const allStudied = Knowledges.value.every(item => item.isStudy);
if (allStudied) { if (allStudied) {
router.push('/studyPage'); router.push('/studyPage');
localStorage.setItem('isStudy', 'true');
} else { } else {
ElMessage.error('请先完成所有学习内容') ElMessage.error('请先完成所有学习内容')
} }

@ -13,7 +13,11 @@
<div <div
class="box" class="box"
:style="{ :style="{
backgroundImage: isBox1Clicked ? `url(${btn1})` : `url(${btn2})`, backgroundImage: isStudy
? `url(${btn1})`
: isBox2Clicked
? `url(${btn1})`
: `url(${btn2})`,
}" }"
@click="handleBoxClick(1)" @click="handleBoxClick(1)"
> >
@ -22,9 +26,7 @@
<div <div
class="box" class="box"
:style="{ :style="{
backgroundImage: complete backgroundImage: complete ? `url(${btn1})` : `url(${btn2})`,
? `url(${btn1})`
: `url(${btn2})`,
}" }"
@click="handleBoxClick(2)" @click="handleBoxClick(2)"
> >
@ -100,8 +102,9 @@ import { submitExperiment, getScore } from "@/api";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
const isShowExperiment = const isShowExperiment =
Number(localStorage.getItem("activeStepIndex")) == 12 ? true : false; Number(localStorage.getItem("activeStepIndex")) == 12 ? true : false;
const isStudy = Boolean(localStorage.getItem("isStudy")) || false;
const router = useRouter(); const router = useRouter();
const complete = localStorage.getItem('complete') const complete = localStorage.getItem("complete");
const user = userStore(); const user = userStore();
const loginFn = () => { const loginFn = () => {
// user.token ? router.push("/spacePage") : ""; // user.token ? router.push("/spacePage") : "";

@ -14,6 +14,9 @@ const clearLocalStorage = () => {
localStorage.removeItem("product"); localStorage.removeItem("product");
localStorage.removeItem("installationStep"); localStorage.removeItem("installationStep");
localStorage.removeItem("stepIds"); localStorage.removeItem("stepIds");
// localStorage.removeItem("wenduCode");
// localStorage.removeItem("shiduCode");
localStorage.removeItem('isStudy')
} }
export { export {

@ -749,6 +749,7 @@
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
<div class="setting"><el-button @click="router.back()">返回</el-button></div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -1262,4 +1263,9 @@ const insatIdea = () => {
:deep(.el-input__inner) { :deep(.el-input__inner) {
color: rgba(0, 0, 0, 0.6); color: rgba(0, 0, 0, 0.6);
} }
.setting{
position: absolute;
top: 20px;
right: 50px;
}
</style> </style>

Loading…
Cancel
Save