|
@@ -1,26 +1,82 @@
|
|
|
<template>
|
|
|
<div id="index">
|
|
|
- <van-tabbar v-model="active">
|
|
|
- <van-tabbar-item info="3">
|
|
|
- <span>自定义</span>
|
|
|
- <img slot="icon" slot-scope="props" :src="props.active ? icon.active : icon.inactive" />
|
|
|
- </van-tabbar-item>
|
|
|
- <van-tabbar-item icon="search">标签</van-tabbar-item>
|
|
|
- <van-tabbar-item icon="setting-o">标签</van-tabbar-item>
|
|
|
- </van-tabbar>
|
|
|
+ <el-form :label-position="labelPosition" label-width="80px" :model="formLabelAlign">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24" class="text_auto">{{ info.name }}</el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24" class="text_left" v-for="(item, index) in info.question" :key="index">
|
|
|
+ {{ item.type }}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="text_center">456</el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <footInfo></footInfo>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import footInfo from '@/layout/index/footInfo.vue';
|
|
|
+import { createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
+const { mapActions: mapQuestion } = createNamespacedHelpers('questionnaire');
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
|
- components: {},
|
|
|
- data: () => ({}),
|
|
|
- created() {},
|
|
|
+ components: {
|
|
|
+ footInfo,
|
|
|
+ },
|
|
|
+ data: () => ({
|
|
|
+ info: {
|
|
|
+ name: '2020年疫情发展问卷调查',
|
|
|
+ num: '1',
|
|
|
+ question: [],
|
|
|
+ },
|
|
|
+ }),
|
|
|
+ created() {
|
|
|
+ this.searchInfo();
|
|
|
+ },
|
|
|
computed: {},
|
|
|
- methods: {},
|
|
|
+ methods: {
|
|
|
+ ...mapQuestion(['query', 'fetch']),
|
|
|
+ async searchInfo({ ...info } = {}) {
|
|
|
+ const res = await this.query({ ...info });
|
|
|
+ console.log(res.data);
|
|
|
+ // this.$set(this, `leaveList`, res.data);
|
|
|
+ },
|
|
|
+ // let result;
|
|
|
+ // for (const val of result.data) {
|
|
|
+ // console.log(val);
|
|
|
+ // for (const res of val.question) {
|
|
|
+ // console.log(id);
|
|
|
+ // this.$set(this, `question`, res.data);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style lang="less" scoped></style>
|
|
|
+<style lang="less" scoped>
|
|
|
+.text_auto {
|
|
|
+ width: 100%;
|
|
|
+ // height: 50px;
|
|
|
+ line-height: 50px;
|
|
|
+ position: relative;
|
|
|
+ text-align: center;
|
|
|
+ border-bottom: 1px dashed #333;
|
|
|
+}
|
|
|
+
|
|
|
+.text_left {
|
|
|
+ width: 100%;
|
|
|
+ // height: 50px;
|
|
|
+ line-height: 50px;
|
|
|
+ position: relative;
|
|
|
+ padding-left: 25px;
|
|
|
+ color: blue;
|
|
|
+}
|
|
|
+.text_center {
|
|
|
+ width: 100%;
|
|
|
+ line-height: 10px;
|
|
|
+ position: relative;
|
|
|
+ padding-left: 50px;
|
|
|
+}
|
|
|
+</style>
|