2021-11-22 16:39:07 +08:00
|
|
|
<template>
|
|
|
|
|
<section class="askForm">
|
2021-11-25 16:02:53 +08:00
|
|
|
<template v-if="showDetail">
|
2021-11-22 16:39:07 +08:00
|
|
|
<form-detail/>
|
|
|
|
|
</template>
|
2021-11-25 16:11:32 +08:00
|
|
|
<ai-result v-else :tips="errMsg" status="error"/>
|
2021-11-22 16:39:07 +08:00
|
|
|
</section>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {mapState} from "vuex";
|
|
|
|
|
import FormDetail from "./formDetail";
|
2021-11-25 16:11:32 +08:00
|
|
|
import AiResult from "../../components/AiResult";
|
2021-11-22 16:39:07 +08:00
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "askForm",
|
2021-11-25 16:02:53 +08:00
|
|
|
appName: "问卷表单",
|
2021-11-25 16:11:32 +08:00
|
|
|
components: {AiResult, FormDetail},
|
2021-11-22 16:39:07 +08:00
|
|
|
computed: {
|
|
|
|
|
...mapState(['openUser', 'user']),
|
|
|
|
|
showDetail() {
|
|
|
|
|
return !!this.$route.query?.id
|
|
|
|
|
},
|
2021-11-25 16:11:32 +08:00
|
|
|
errMsg() {
|
|
|
|
|
return this.showDetail ? "加载表单中..." : "表单不存在"
|
2021-11-22 16:39:07 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.askForm {
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
background: #fff;
|
|
|
|
|
}
|
|
|
|
|
</style>
|