fix:预览问卷
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 6m53s

This commit is contained in:
dev_ljl 2025-08-20 14:26:59 +08:00
parent fc08c5525c
commit 4139af5673
4 changed files with 12 additions and 18 deletions

View File

@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import {reactive, shallowRef} from 'vue'; import {reactive, ref} from 'vue';
import {useVbenModal} from '@vben/common-ui'; import {useVbenModal} from '@vben/common-ui';
import {questionnaireInfo} from "#/api/property/customerService/questionnaire/questionnaire"; import {questionnaireInfo} from "#/api/property/customerService/questionnaire/questionnaire";
import type { import type {
@ -33,7 +33,7 @@ const [BasicModal, modalApi] = useVbenModal({
}, },
}); });
const questionnaireDetail = shallowRef<null | QuestionnaireVO>(null); const questionnaireDetail = ref<null | QuestionnaireVO>(null);
async function handleOpenChange(open: boolean) { async function handleOpenChange(open: boolean) {
if (!open) { if (!open) {
@ -44,7 +44,6 @@ async function handleOpenChange(open: boolean) {
questionnaireDetail.value = await questionnaireInfo(id); questionnaireDetail.value = await questionnaireInfo(id);
if (questionnaireDetail.value.questionnaireQuestionVos) { if (questionnaireDetail.value.questionnaireQuestionVos) {
questionnaireDetail.value.questionnaireQuestionVos.forEach(item => { questionnaireDetail.value.questionnaireQuestionVos.forEach(item => {
item.answer = ''
if (item.questionnaireQuestionItemVos) { if (item.questionnaireQuestionItemVos) {
item.options = item.questionnaireQuestionItemVos.map(item => item.itemContent) item.options = item.questionnaireQuestionItemVos.map(item => item.itemContent)
} }

View File

@ -35,10 +35,10 @@ async function loadTree() {
showTreeSkeleton.value = false; showTreeSkeleton.value = false;
} }
async function handleReload() { // async function handleReload() {
await loadTree(); // await loadTree();
emit('reload'); // emit('reload');
} // }
onMounted(loadTree); onMounted(loadTree);
</script> </script>
@ -87,13 +87,6 @@ onMounted(loadTree);
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
:deep(html),
:deep(body),
:deep(#app) {
height: 100%;
margin: 0;
padding: 0;
}
.bg-background{ .bg-background{
background-color: white; background-color: white;
:deep(.ant-tree){ :deep(.ant-tree){

View File

@ -370,6 +370,7 @@ onBeforeUnmount(() => {
.left-content { .left-content {
flex: 1; flex: 1;
height: 95vh;
} }
.right-content { .right-content {
@ -468,14 +469,14 @@ onBeforeUnmount(() => {
} }
.chart-placeholder { .chart-placeholder {
height: 310px; height: 36vh;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-radius: 4px; border-radius: 4px;
} }
.power-chart{ .power-chart{
height: 47vh; height: 38vh;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;

View File

@ -301,6 +301,7 @@ onBeforeUnmount(() => {
.left-content { .left-content {
flex: 1; flex: 1;
height: 95vh;
} }
.right-content { .right-content {
@ -386,11 +387,11 @@ onBeforeUnmount(() => {
} }
.power-chart{ .power-chart{
height: 55vh; height: 45vh;
} }
.energy-chart{ .energy-chart{
height: 240px; height: 30vh;
} }
</style> </style>