调查问卷

This commit is contained in:
yanran200730
2021-11-22 16:39:07 +08:00
parent fc80c2c4b0
commit 5640d8b6e5
12 changed files with 3541 additions and 3 deletions

View File

@@ -0,0 +1,52 @@
<template>
<section class="askForm">
<template v-if="showDetail&&!isManager">
<form-detail/>
</template>
<template v-else-if="isManager">
<form-list ref="FormList"/>
</template>
<ai-loading v-else :tips="errMsg"/>
</section>
</template>
<script>
import AiLoading from "../../components/AiLoading";
import {mapState} from "vuex";
import FormDetail from "./formDetail";
import FormList from "./formList";
export default {
name: "askForm",
components: {FormList, FormDetail, AiLoading},
computed: {
...mapState(['openUser', 'user']),
showDetail() {
return !!this.$route.query?.id
},
isManager() {
let {hash, query: {preview}} = this.$route
if (preview) return false
else if (hash == "#dev") return true
else return hash != '#form' && !!this.user.id
}
},
data() {
return {
errMsg: "加载表单中..."
}
},
onReachBottom() {
this.$refs?.FormList?.reachBottom()
}
}
</script>
<style lang="scss" scoped>
.askForm {
position: absolute;
width: 100%;
height: 100%;
background: #fff;
}
</style>