|
@@ -1,184 +1,3 @@
|
|
|
-<script setup lang="ts">
|
|
|
-import { getImageUrl, imagePreview, returnAppPage } from "@/utils";
|
|
|
-import { useRoute, useRouter } from "vue-router";
|
|
|
-import { useCustomizeStore } from "@/store";
|
|
|
-// import { storeToRefs } from "pinia";
|
|
|
-import { computed, onMounted, onUnmounted, ref, watch } from "vue";
|
|
|
-import ShareModal from "@/views/customize/components/ShareModal.vue";
|
|
|
-// @ts-ignore
|
|
|
-import { exportPDF } from '@/utils/exportPdf'
|
|
|
-
|
|
|
-const {
|
|
|
- b: babyId,
|
|
|
- c: classId,
|
|
|
- l: classLevelCode,
|
|
|
- // g: gameType,
|
|
|
- s: semesterType,
|
|
|
- // r: recordType,
|
|
|
- p: isParent,
|
|
|
- o: isMyRoute,
|
|
|
-} = useRoute().query;
|
|
|
-const router = useRouter();
|
|
|
-const customizeStore = useCustomizeStore();
|
|
|
-
|
|
|
-// const { semesterReport } = storeToRefs(customizeStore);
|
|
|
-const { getSemesterRecord, sendSemesterRecord } = customizeStore;
|
|
|
-
|
|
|
-const isShow = ref(false);
|
|
|
-const shareShow = ref(false);
|
|
|
-const opacity = ref(0);
|
|
|
-
|
|
|
-const semesterReport = computed(() => {
|
|
|
- return customizeStore.semesterReport;
|
|
|
-});
|
|
|
-
|
|
|
-watch(isShow, (val) => {
|
|
|
- if (val) {
|
|
|
- setTimeout(() => {
|
|
|
- document.addEventListener("click", handleClick);
|
|
|
- }, 10);
|
|
|
- } else {
|
|
|
- document.removeEventListener("click", handleClick);
|
|
|
- }
|
|
|
-});
|
|
|
-
|
|
|
-
|
|
|
-const getLabel = (index: number) => {
|
|
|
- switch (index) {
|
|
|
- case 0:
|
|
|
- return '计划'
|
|
|
- case 1:
|
|
|
- return '实施'
|
|
|
- case 2:
|
|
|
- return '总结与反思'
|
|
|
- case 3:
|
|
|
- return '调整'
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-const getStateage = (levelCode: string) => {
|
|
|
- switch (levelCode) {
|
|
|
- case '1':
|
|
|
- return '3-4岁目标'
|
|
|
- case '2':
|
|
|
- return '4-5岁目标'
|
|
|
- case '3':
|
|
|
- return '5-6岁目标'
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-function getFieldLogo(title: string) {
|
|
|
- const arr = ["通用", "科学", "艺术", "语言", "社会"];
|
|
|
- let index = arr.findIndex((item) => title.includes(item));
|
|
|
- index = index === -1 ? 0 : index;
|
|
|
- return getImageUrl(`field_logo_0${index}`);
|
|
|
-}
|
|
|
-
|
|
|
-function isHas(content: string[]) {
|
|
|
- return Array.isArray(content) && content.length > 0;
|
|
|
-}
|
|
|
-
|
|
|
-function formatFamily(name: string) {
|
|
|
- let arr = name.split("\n");
|
|
|
- return arr[arr.length - 1] === "" ? arr.slice(0, arr.length - 1) : arr;
|
|
|
-}
|
|
|
-
|
|
|
-function send() {
|
|
|
- if (semesterReport.value.sendReport) return;
|
|
|
- if (
|
|
|
- typeof babyId === "string" &&
|
|
|
- typeof classId === "string" &&
|
|
|
- typeof classLevelCode === "string" &&
|
|
|
- typeof semesterType === "string"
|
|
|
- )
|
|
|
- sendSemesterRecord({
|
|
|
- babyId,
|
|
|
- classId,
|
|
|
- classLevelCode,
|
|
|
- semesterType,
|
|
|
- recordType: "1",
|
|
|
- });
|
|
|
-}
|
|
|
-
|
|
|
-function back() {
|
|
|
- isMyRoute === "1" ? router.go(-1) : returnAppPage();
|
|
|
-}
|
|
|
-
|
|
|
-function handleClick() {
|
|
|
- console.log("handleClick");
|
|
|
- if (isShow.value) isShow.value = false;
|
|
|
-}
|
|
|
-
|
|
|
-function share() {
|
|
|
- console.log("share");
|
|
|
- shareShow.value = true;
|
|
|
-}
|
|
|
-
|
|
|
-function handleScroll() {
|
|
|
- const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
|
- const opacityVal = scrollTop / 88;
|
|
|
- opacity.value = opacityVal > 1 ? 1 : opacityVal;
|
|
|
-}
|
|
|
-
|
|
|
-function getStyle(index: number, length: number) {
|
|
|
- return {
|
|
|
- borderRadius: `${
|
|
|
- length === 1 ? "17px" : index === length - 1 ? "0 0 17px 17px" : index === 0 ? "17px 17px 0 0" : "0"
|
|
|
- }`,
|
|
|
- borderTop: `${index === 0 ? "4px solid #b6dcff" : "none"}`,
|
|
|
- borderBottom: `${index === length - 1 ? "4px solid #b6dcff" : "none"}`,
|
|
|
- boxShadow: `${index === 0 ? "0 1px 6px 0 rgba(42, 105, 253, 0.16)" : "none"}`,
|
|
|
- };
|
|
|
-}
|
|
|
-
|
|
|
-function getTargetStyle(index: number) {
|
|
|
- const style = {
|
|
|
- borderRadius: "0 0 9px 9px",
|
|
|
- };
|
|
|
- if (index === 3) {
|
|
|
- style.borderRadius = "0 0 9px 9px";
|
|
|
- } else {
|
|
|
- style.borderRadius = "0";
|
|
|
- }
|
|
|
- return style;
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-const exportReport = () => {
|
|
|
- exportPDF(semesterReport.value)
|
|
|
-}
|
|
|
-
|
|
|
-onMounted(async () => {
|
|
|
- if (
|
|
|
- typeof babyId === "string" &&
|
|
|
- typeof classId === "string" &&
|
|
|
- typeof classLevelCode === "string" &&
|
|
|
- typeof semesterType === "string"
|
|
|
- )
|
|
|
- await getSemesterRecord({ babyId, classId, classLevelCode, semesterType });
|
|
|
-
|
|
|
-
|
|
|
- document.addEventListener("scroll", handleScroll);
|
|
|
-});
|
|
|
-
|
|
|
-onUnmounted(() => {
|
|
|
- document.removeEventListener("click", handleClick);
|
|
|
- document.removeEventListener("scroll", handleScroll);
|
|
|
-});
|
|
|
-
|
|
|
-/**
|
|
|
- * 综合报告
|
|
|
- *
|
|
|
- * b: babyId
|
|
|
- * c: classId
|
|
|
- * l: classLevelCode
|
|
|
- * s: semesterType
|
|
|
- * o: isMyRoute
|
|
|
- *
|
|
|
- * http://192.168.1.17:8989/#/customize/SemesterReport?b=1304672468777553921&c=1304705777133330433&l=0&s=0&o=1
|
|
|
- */
|
|
|
-</script>
|
|
|
-
|
|
|
<template>
|
|
|
<div class="report-detail rd">
|
|
|
<!--头部-->
|
|
@@ -231,7 +50,7 @@ onUnmounted(() => {
|
|
|
<div>{{semesterReport.className }}</div>
|
|
|
</div>
|
|
|
<div class="rd-baby-hobby" :style="{ backgroundImage: `url(${getImageUrl('hobby')})`}" >
|
|
|
- {{ semesterReport.hobby.slice(0, 4).join('、')}}
|
|
|
+ {{ semesterReport.hobby.length > 4 ? semesterReport.hobby.slice(0, 4).join('、') : semesterReport.hobby.join('、')}}
|
|
|
</div>
|
|
|
<div class="rd-baby-teacher" :style="{ backgroundImage: `url(${getImageUrl('teacher')})`}" >
|
|
|
<div v-if="semesterReport.teachers.length > 1">{{semesterReport.teachers[0]}}</div>
|
|
@@ -265,6 +84,9 @@ onUnmounted(() => {
|
|
|
<p>幼儿分领域评估概括</p>
|
|
|
<div></div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <radarCharts v-if="semesterReport.radarChart" :datasource="semesterReport.radarChart" />
|
|
|
+
|
|
|
<div v-for="(item, index) in semesterReport.domainAbilityNameList" :key="index" class="rd-field-item">
|
|
|
<img :src="getFieldLogo(item.domainName)" alt="" class="logo" />
|
|
|
<div class="info">
|
|
@@ -401,13 +223,16 @@ onUnmounted(() => {
|
|
|
<!--行为记录-->
|
|
|
<div v-for="(item, index) in semesterReport.domainDataList" :key="index" class="rd-part">
|
|
|
<div class="domain">{{ item.domainName }}</div>
|
|
|
+
|
|
|
<div
|
|
|
v-for="(ability, abilityIndex) in item.recordList"
|
|
|
:key="abilityIndex"
|
|
|
class="ability grid_bgi"
|
|
|
:style="getStyle(abilityIndex, item.recordList.length)"
|
|
|
>
|
|
|
+
|
|
|
<img v-if="abilityIndex !== 0" :src="getImageUrl('ability_gap')" alt="" class="ability-gap" />
|
|
|
+ <div v-if="abilityIndex === 0" style="display: flex;align-items: center;justify-content: center;"> <radarCharts :datasource="item.radarChart" /> </div>
|
|
|
<div class="ability-title flex-center">
|
|
|
<img :src="ability.abilityIconUrl" alt="" class="ability-title-logo" />
|
|
|
<div class="ability-title-text">{{ ability.abilityName }}</div>
|
|
@@ -470,6 +295,194 @@ onUnmounted(() => {
|
|
|
<ShareModal :show="shareShow" @close="shareShow = false" />
|
|
|
</template>
|
|
|
|
|
|
+<script setup lang="ts">
|
|
|
+import { getImageUrl, imagePreview, returnAppPage } from "@/utils";
|
|
|
+import { useRoute, useRouter } from "vue-router";
|
|
|
+import { useCustomizeStore } from "@/store";
|
|
|
+// import { storeToRefs } from "pinia";
|
|
|
+import { computed, onMounted, onUnmounted, ref, watch } from "vue";
|
|
|
+import ShareModal from "@/views/customize/components/ShareModal.vue";
|
|
|
+// @ts-ignore
|
|
|
+import { exportPDF } from '@/utils/exportPdf'
|
|
|
+
|
|
|
+import radarCharts from '@/components/radarCharts.vue'
|
|
|
+
|
|
|
+const {
|
|
|
+ b: babyId,
|
|
|
+ c: classId,
|
|
|
+ l: classLevelCode,
|
|
|
+ // g: gameType,
|
|
|
+ s: semesterType,
|
|
|
+ // r: recordType,
|
|
|
+ p: isParent,
|
|
|
+ o: isMyRoute,
|
|
|
+} = useRoute().query;
|
|
|
+const router = useRouter();
|
|
|
+const customizeStore = useCustomizeStore();
|
|
|
+
|
|
|
+// const { semesterReport } = storeToRefs(customizeStore);
|
|
|
+const { getSemesterRecord, sendSemesterRecord } = customizeStore;
|
|
|
+
|
|
|
+const isShow = ref(false);
|
|
|
+const shareShow = ref(false);
|
|
|
+const opacity = ref(0);
|
|
|
+
|
|
|
+
|
|
|
+const semesterReport = computed(() => {
|
|
|
+ return customizeStore.semesterReport;
|
|
|
+});
|
|
|
+
|
|
|
+console.log('semesterReport:', semesterReport);
|
|
|
+
|
|
|
+watch(isShow, (val) => {
|
|
|
+ if (val) {
|
|
|
+ setTimeout(() => {
|
|
|
+ document.addEventListener("click", handleClick);
|
|
|
+ }, 10);
|
|
|
+ } else {
|
|
|
+ document.removeEventListener("click", handleClick);
|
|
|
+ }
|
|
|
+});
|
|
|
+
|
|
|
+
|
|
|
+const getLabel = (index: number) => {
|
|
|
+ switch (index) {
|
|
|
+ case 0:
|
|
|
+ return '计划'
|
|
|
+ case 1:
|
|
|
+ return '实施'
|
|
|
+ case 2:
|
|
|
+ return '总结与反思'
|
|
|
+ case 3:
|
|
|
+ return '调整'
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const getStateage = (levelCode: string) => {
|
|
|
+ switch (levelCode) {
|
|
|
+ case '1':
|
|
|
+ return '3-4岁目标'
|
|
|
+ case '2':
|
|
|
+ return '4-5岁目标'
|
|
|
+ case '3':
|
|
|
+ return '5-6岁目标'
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+function getFieldLogo(title: string) {
|
|
|
+ const arr = ["通用", "科学", "艺术", "语言", "社会"];
|
|
|
+ let index = arr.findIndex((item) => title.includes(item));
|
|
|
+ index = index === -1 ? 0 : index;
|
|
|
+ return getImageUrl(`field_logo_0${index}`);
|
|
|
+}
|
|
|
+
|
|
|
+function isHas(content: string[]) {
|
|
|
+ return Array.isArray(content) && content.length > 0;
|
|
|
+}
|
|
|
+
|
|
|
+function formatFamily(name: string) {
|
|
|
+ let arr = name.split("\n");
|
|
|
+ return arr[arr.length - 1] === "" ? arr.slice(0, arr.length - 1) : arr;
|
|
|
+}
|
|
|
+
|
|
|
+function send() {
|
|
|
+ if (semesterReport.value.sendReport) return;
|
|
|
+ if (
|
|
|
+ typeof babyId === "string" &&
|
|
|
+ typeof classId === "string" &&
|
|
|
+ typeof classLevelCode === "string" &&
|
|
|
+ typeof semesterType === "string"
|
|
|
+ )
|
|
|
+ sendSemesterRecord({
|
|
|
+ babyId,
|
|
|
+ classId,
|
|
|
+ classLevelCode,
|
|
|
+ semesterType,
|
|
|
+ recordType: "1",
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+function back() {
|
|
|
+ isMyRoute === "1" ? router.go(-1) : returnAppPage();
|
|
|
+}
|
|
|
+
|
|
|
+function handleClick() {
|
|
|
+ console.log("handleClick");
|
|
|
+ if (isShow.value) isShow.value = false;
|
|
|
+}
|
|
|
+
|
|
|
+function share() {
|
|
|
+ console.log("share");
|
|
|
+ shareShow.value = true;
|
|
|
+}
|
|
|
+
|
|
|
+function handleScroll() {
|
|
|
+ const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
|
+ const opacityVal = scrollTop / 88;
|
|
|
+ opacity.value = opacityVal > 1 ? 1 : opacityVal;
|
|
|
+}
|
|
|
+
|
|
|
+function getStyle(index: number, length: number) {
|
|
|
+ return {
|
|
|
+ borderRadius: `${
|
|
|
+ length === 1 ? "17px" : index === length - 1 ? "0 0 17px 17px" : index === 0 ? "17px 17px 0 0" : "0"
|
|
|
+ }`,
|
|
|
+ borderTop: `${index === 0 ? "4px solid #b6dcff" : "none"}`,
|
|
|
+ borderBottom: `${index === length - 1 ? "4px solid #b6dcff" : "none"}`,
|
|
|
+ boxShadow: `${index === 0 ? "0 1px 6px 0 rgba(42, 105, 253, 0.16)" : "none"}`,
|
|
|
+ };
|
|
|
+}
|
|
|
+
|
|
|
+function getTargetStyle(index: number) {
|
|
|
+ const style = {
|
|
|
+ borderRadius: "0 0 9px 9px",
|
|
|
+ };
|
|
|
+ if (index === 3) {
|
|
|
+ style.borderRadius = "0 0 9px 9px";
|
|
|
+ } else {
|
|
|
+ style.borderRadius = "0";
|
|
|
+ }
|
|
|
+ return style;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+const exportReport = () => {
|
|
|
+ exportPDF(semesterReport.value)
|
|
|
+}
|
|
|
+
|
|
|
+onMounted(async () => {
|
|
|
+ if (
|
|
|
+ typeof babyId === "string" &&
|
|
|
+ typeof classId === "string" &&
|
|
|
+ typeof classLevelCode === "string" &&
|
|
|
+ typeof semesterType === "string"
|
|
|
+ )
|
|
|
+ await getSemesterRecord({ babyId, classId, classLevelCode, semesterType });
|
|
|
+
|
|
|
+
|
|
|
+ document.addEventListener("scroll", handleScroll);
|
|
|
+});
|
|
|
+
|
|
|
+onUnmounted(() => {
|
|
|
+ document.removeEventListener("click", handleClick);
|
|
|
+ document.removeEventListener("scroll", handleScroll);
|
|
|
+});
|
|
|
+
|
|
|
+/**
|
|
|
+ * 综合报告
|
|
|
+ *
|
|
|
+ * b: babyId
|
|
|
+ * c: classId
|
|
|
+ * l: classLevelCode
|
|
|
+ * s: semesterType
|
|
|
+ * o: isMyRoute
|
|
|
+ *
|
|
|
+ * http://192.168.1.17:8989/#/customize/SemesterReport?b=1304672468777553921&c=1304705777133330433&l=0&s=0&o=1
|
|
|
+ */
|
|
|
+</script>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<style scoped lang="scss">
|
|
|
.rd {
|
|
|
position: relative;
|