This commit is contained in:
parent
fc08c5525c
commit
4139af5673
@ -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)
|
||||||
}
|
}
|
||||||
|
@ -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){
|
||||||
|
@ -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;
|
||||||
|
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user