Files
dvcp_v2_wxcp_app/src/apps/AppAskForm/AppForm.vue

39 lines
768 B
Vue
Raw Normal View History

2021-11-22 16:39:07 +08:00
<template>
2021-11-25 17:04:43 +08:00
<section class="AppForm">
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 {
2021-11-25 17:04:43 +08:00
name: "AppForm",
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>
2021-11-25 17:04:43 +08:00
.AppForm {
2021-11-22 16:39:07 +08:00
position: absolute;
width: 100%;
height: 100%;
background: #fff;
}
</style>