guhongwei преди 5 години
родител
ревизия
9ab12c27b2

+ 40 - 0
src/layout/class/classList.vue

@@ -0,0 +1,40 @@
+<template>
+  <div id="classList">
+    <el-row>
+      <el-col :span="24">
+        <van-tabs v-model="active">
+          <van-tab title="班级名单">
+            显示班级学生名称(带有职务),班主任:点击学生指派学生担任职务。学委:给学生上分(平时成绩只有一个,课程作业成绩,都要显示)
+          </van-tab>
+          <van-tab title="班级分组">
+            班级分组,需要有创建分组按钮,显示小组名称,小组人数,加入小组。(未分组学生显示)
+          </van-tab>
+        </van-tabs>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'classList',
+  props: {},
+  components: {},
+  data: () => ({
+    active: 0,
+  }),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+/deep/.van-tabs__line {
+  width: 50% !important;
+  background-color: #405ffe;
+}
+/deep/.van-tab--active {
+  color: #405ffe;
+}
+</style>

+ 30 - 0
src/layout/common/footInfo.vue

@@ -0,0 +1,30 @@
+<template>
+  <div id="footInfo">
+    <el-row>
+      <el-col :span="24">
+        <van-tabbar v-model="active">
+          <van-tabbar-item to="/" icon="home-o">首页</van-tabbar-item>
+          <van-tabbar-item to="/class/index" icon="friends-o">班级名单</van-tabbar-item>
+          <van-tabbar-item to="/question/index" icon="question-o">问卷调查</van-tabbar-item>
+          <van-tabbar-item to="/user/index" icon="user-o">个人信息</van-tabbar-item>
+        </van-tabbar>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'footInfo',
+  props: {},
+  components: {},
+  data: () => ({
+    active: 0,
+  }),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped></style>

src/layout/index/topInfo.vue → src/layout/common/topInfo.vue


src/layout/index/topInfos.vue → src/layout/common/topInfos.vue


+ 0 - 40
src/layout/index/footInfo.vue

@@ -1,40 +0,0 @@
-<template>
-  <div id="footInfo">
-    <el-row>
-      <van-tabbar v-model="active">
-        <van-tabbar-item to="/" icon="home-o">首页</van-tabbar-item>
-        <van-tabbar-item to="/class/index" icon="friends-o">班级名单</van-tabbar-item>
-        <van-tabbar-item to="/question/index" icon="question-o">问卷调查</van-tabbar-item>
-        <van-tabbar-item to="/user/index" icon="user-o">个人信息</van-tabbar-item>
-      </van-tabbar>
-    </el-row>
-  </div>
-</template>
-
-<script>
-export default {
-  name: 'footInfo',
-  props: {},
-  components: {},
-  data: () => ({
-    active: 0,
-  }),
-  created() {},
-  computed: {},
-  methods: {},
-};
-</script>
-
-<style lang="less" scoped>
-p {
-  padding: 0;
-  margin: 0;
-}
-.link {
-  padding: 6px 0 0 0;
-  text-align: center;
-}
-.link p {
-  text-decoration: none;
-}
-</style>

+ 23 - 0
src/layout/index/mainData.vue

@@ -0,0 +1,23 @@
+<template>
+  <div id="mainData">
+    <el-row>
+      <el-col :span="24">
+        课程安排 功能:可给教课教师评分
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'mainData',
+  props: {},
+  components: {},
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped></style>

+ 187 - 0
src/layout/user/messageInfo copy.vue

@@ -0,0 +1,187 @@
+<template>
+  <div id="messageInfo">
+    <el-row>
+      <el-col :span="24" class="messageInfo">
+        <el-col :span="24" class="images">
+          <div class="demo-basic--circle">
+            <div class="block"><el-avatar :size="163" :src="circleUrl"></el-avatar></div>
+          </div>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">姓名</p>
+            <p class="name">{{ messInfo.name }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">身份证号</p>
+            <p class="name">{{ messInfo.id_number }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">性别</p>
+            <p class="name">{{ messInfo.gender }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">民族</p>
+            <p class="name">{{ messInfo.nation }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">手机号</p>
+            <p class="name">{{ messInfo.phone }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">QQ</p>
+            <p class="name">{{ messInfo.qq }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">学校</p>
+            <p class="name">{{ messInfo.school_name }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">所在院系</p>
+            <p class="name">{{ messInfo.faculty }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">所在专业</p>
+            <p class="name">{{ messInfo.major }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">入学年份</p>
+            <p class="name">{{ messInfo.entry_year }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">毕业年份</p>
+            <p class="name">{{ messInfo.finish_year }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">在校所担当职务</p>
+            <p class="name">{{ messInfo.school_job }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">e-mail</p>
+            <p class="name">{{ messInfo.email }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="mess">
+          <el-col :span="22" class="info">
+            <p class="title">户口所在地</p>
+            <p class="name">{{ messInfo.family_place }}</p>
+          </el-col>
+          <el-col :span="2" class="icon">
+            <van-icon name="arrow" />
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'messageInfo',
+  props: {
+    messInfo: null,
+  },
+  components: {},
+  data: () => ({
+    circleUrl: require('@/assets/circle.png'),
+  }),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+p {
+  padding: 0;
+  margin: 0;
+}
+.images {
+  text-align: center;
+  padding: 15px 0;
+}
+.mess {
+  min-height: 50px;
+  border-bottom: 1px solid #efeff4;
+}
+.info {
+  padding: 0 15px;
+}
+.info .title {
+  font-size: 14px;
+  color: #92a1b1;
+  padding: 4px 0;
+}
+.info .name {
+  font-size: 16px;
+  color: #000;
+}
+.icon {
+  padding: 11px 0;
+  font-size: 20px;
+  color: #ccc;
+}
+</style>

+ 22 - 157
src/layout/user/messageInfo.vue

@@ -1,137 +1,14 @@
 <template>
-  <div id="messageInfo">
+  <div id="topInfo">
     <el-row>
-      <el-col :span="24" class="messageInfo">
-        <el-col :span="24" class="images">
-          <div class="demo-basic--circle">
-            <div class="block"><el-avatar :size="163" :src="circleUrl"></el-avatar></div>
-          </div>
+      <el-col :span="24" class="message" @click.native="$router.push({ path: '/user/personalDetail', query: { id: info.id } })">
+        <el-col :span="6" class="name">
+          {{ info.name }}
         </el-col>
-        <el-col :span="24" class="mess">
-          <el-col :span="22" class="info">
-            <p class="title">姓名</p>
-            <p class="name">{{ messInfo.name }}</p>
-          </el-col>
-          <el-col :span="2" class="icon">
-            <van-icon name="arrow" />
-          </el-col>
-        </el-col>
-        <el-col :span="24" class="mess">
-          <el-col :span="22" class="info">
-            <p class="title">身份证号</p>
-            <p class="name">{{ messInfo.id_number }}</p>
-          </el-col>
-          <el-col :span="2" class="icon">
-            <van-icon name="arrow" />
-          </el-col>
-        </el-col>
-        <el-col :span="24" class="mess">
-          <el-col :span="22" class="info">
-            <p class="title">性别</p>
-            <p class="name">{{ messInfo.gender }}</p>
-          </el-col>
-          <el-col :span="2" class="icon">
-            <van-icon name="arrow" />
-          </el-col>
-        </el-col>
-        <el-col :span="24" class="mess">
-          <el-col :span="22" class="info">
-            <p class="title">民族</p>
-            <p class="name">{{ messInfo.nation }}</p>
-          </el-col>
-          <el-col :span="2" class="icon">
-            <van-icon name="arrow" />
-          </el-col>
-        </el-col>
-        <el-col :span="24" class="mess">
-          <el-col :span="22" class="info">
-            <p class="title">手机号</p>
-            <p class="name">{{ messInfo.phone }}</p>
-          </el-col>
-          <el-col :span="2" class="icon">
-            <van-icon name="arrow" />
-          </el-col>
-        </el-col>
-        <el-col :span="24" class="mess">
-          <el-col :span="22" class="info">
-            <p class="title">QQ</p>
-            <p class="name">{{ messInfo.qq }}</p>
-          </el-col>
-          <el-col :span="2" class="icon">
-            <van-icon name="arrow" />
-          </el-col>
-        </el-col>
-        <el-col :span="24" class="mess">
-          <el-col :span="22" class="info">
-            <p class="title">学校</p>
-            <p class="name">{{ messInfo.school_name }}</p>
-          </el-col>
-          <el-col :span="2" class="icon">
-            <van-icon name="arrow" />
-          </el-col>
-        </el-col>
-        <el-col :span="24" class="mess">
-          <el-col :span="22" class="info">
-            <p class="title">所在院系</p>
-            <p class="name">{{ messInfo.faculty }}</p>
-          </el-col>
-          <el-col :span="2" class="icon">
-            <van-icon name="arrow" />
-          </el-col>
-        </el-col>
-        <el-col :span="24" class="mess">
-          <el-col :span="22" class="info">
-            <p class="title">所在专业</p>
-            <p class="name">{{ messInfo.major }}</p>
-          </el-col>
-          <el-col :span="2" class="icon">
-            <van-icon name="arrow" />
-          </el-col>
-        </el-col>
-        <el-col :span="24" class="mess">
-          <el-col :span="22" class="info">
-            <p class="title">入学年份</p>
-            <p class="name">{{ messInfo.entry_year }}</p>
-          </el-col>
-          <el-col :span="2" class="icon">
-            <van-icon name="arrow" />
-          </el-col>
-        </el-col>
-        <el-col :span="24" class="mess">
-          <el-col :span="22" class="info">
-            <p class="title">毕业年份</p>
-            <p class="name">{{ messInfo.finish_year }}</p>
-          </el-col>
-          <el-col :span="2" class="icon">
-            <van-icon name="arrow" />
-          </el-col>
-        </el-col>
-        <el-col :span="24" class="mess">
-          <el-col :span="22" class="info">
-            <p class="title">在校所担当职务</p>
-            <p class="name">{{ messInfo.school_job }}</p>
-          </el-col>
-          <el-col :span="2" class="icon">
-            <van-icon name="arrow" />
-          </el-col>
-        </el-col>
-        <el-col :span="24" class="mess">
-          <el-col :span="22" class="info">
-            <p class="title">e-mail</p>
-            <p class="name">{{ messInfo.email }}</p>
-          </el-col>
-          <el-col :span="2" class="icon">
-            <van-icon name="arrow" />
-          </el-col>
-        </el-col>
-        <el-col :span="24" class="mess">
-          <el-col :span="22" class="info">
-            <p class="title">户口所在地</p>
-            <p class="name">{{ messInfo.family_place }}</p>
-          </el-col>
-          <el-col :span="2" class="icon">
-            <van-icon name="arrow" />
-          </el-col>
+        <el-col :span="18" class="mess">
+          <p>{{ info.school_name }}</p>
+          <p>{{ info.faculty }}&nbsp;&nbsp;{{ info.major }}</p>
+          <p>民族:{{ info.nation }}&nbsp;性别:{{ info.gender }}</p>
         </el-col>
       </el-col>
     </el-row>
@@ -140,14 +17,12 @@
 
 <script>
 export default {
-  name: 'messageInfo',
+  name: 'topInfo',
   props: {
-    messInfo: null,
+    info: null,
   },
   components: {},
-  data: () => ({
-    circleUrl: require('@/assets/circle.png'),
-  }),
+  data: () => ({}),
   created() {},
   computed: {},
   methods: {},
@@ -159,29 +34,19 @@ p {
   padding: 0;
   margin: 0;
 }
-.images {
-  text-align: center;
-  padding: 15px 0;
-}
-.mess {
-  min-height: 50px;
-  border-bottom: 1px solid #efeff4;
+.message {
+  padding: 10px 0;
 }
-.info {
-  padding: 0 15px;
-}
-.info .title {
-  font-size: 14px;
-  color: #92a1b1;
-  padding: 4px 0;
+.name {
+  text-align: center;
+  line-height: 100px;
+  font-size: 20px;
+  font-family: 微软雅黑;
+  font-weight: bold;
 }
-.info .name {
+.mess p {
+  padding: 5px 0;
   font-size: 16px;
-  color: #000;
-}
-.icon {
-  padding: 11px 0;
-  font-size: 20px;
-  color: #ccc;
+  color: #333;
 }
 </style>

+ 0 - 49
src/layout/user/topInfo.vue

@@ -1,49 +0,0 @@
-<template>
-  <div id="topInfo">
-    <el-row>
-      <el-col :span="24" class="message" @click.native="$router.push({ path: '/user/personalDetail', query: { id: info.id } })">
-        <el-col :span="6" class="name">
-          {{ info.name }}
-        </el-col>
-        <el-col :span="18" class="mess">
-          <p>{{ info.school_name }}</p>
-          <p>{{ info.faculty }}&nbsp;&nbsp;{{ info.major }}</p>
-          <p>民族:{{ info.nation }}&nbsp;性别:{{ info.gender }}</p>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-export default {
-  name: 'topInfo',
-  props: {
-    info: null,
-  },
-  components: {},
-  data: () => ({}),
-  created() {},
-  computed: {},
-  methods: {},
-};
-</script>
-
-<style lang="less" scoped>
-p {
-  padding: 0;
-  margin: 0;
-}
-.name {
-  text-align: center;
-  line-height: 100px;
-  font-size: 20px;
-  font-family: 微软雅黑;
-  font-weight: bold;
-}
-.mess p {
-  padding: 5px 0;
-  font-size: 16px;
-  color: #333;
-}
-</style>

+ 1 - 1
src/views/class/achieve.vue

@@ -19,7 +19,7 @@
 </template>
 
 <script>
-import footInfo from '@/layout/index/footInfo.vue';
+import footInfo from '@/layout/common/footInfo.vue';
 import achieveList from '@/layout/class/achieveList.vue';
 
 export default {

+ 1 - 1
src/views/class/group.vue

@@ -36,7 +36,7 @@
 </template>
 
 <script>
-import footInfo from '@/layout/index/footInfo.vue';
+import footInfo from '@/layout/common/footInfo.vue';
 import groupList from '@/layout/class/groupList.vue';
 import { createNamespacedHelpers, mapGetters } from 'vuex';
 const { mapActions: mapGroup } = createNamespacedHelpers('group');

+ 17 - 87
src/views/class/index.vue

@@ -1,27 +1,12 @@
 <template>
   <div id="index">
     <el-row>
-      <el-col :span="24" class="info">
+      <el-col :span="24" class="style">
         <el-col :span="24" class="top">
-          <el-col :span="10" class="title">
-            班级学生名单
-          </el-col>
-          <el-col :span="7" class="btn">
-            <el-button type="primary" @click="$router.push({ path: '/class/group' })">分组</el-button>
-          </el-col>
-          <span v-if="role === '4'">
-            <el-col :span="7" class="btn">
-              <el-button type="primary" @click="$router.push({ path: '/class/achieve' })">上成绩</el-button>
-            </el-col>
-          </span>
+          <topInfo></topInfo>
         </el-col>
         <el-col :span="24" class="main">
-          <span v-if="role === '4'">
-            <studentList :studentList="studentList"></studentList>
-          </span>
-          <span v-if="role === '1'">
-            <teaStudentList :studentList="studentList" :show="show" :form="form" @clickUpdate="clickDialog" @submit="submitUpdate"></teaStudentList>
-          </span>
+          <classList></classList>
         </el-col>
         <el-col :span="24" class="foot">
           <footInfo></footInfo>
@@ -32,96 +17,41 @@
 </template>
 
 <script>
-import footInfo from '@/layout/index/footInfo.vue';
-import studentList from '@/layout/class/studentList.vue';
-import teaStudentList from '@/layout/class/teaStudentList.vue';
+import topInfo from '@/layout/common/topInfo.vue';
+import footInfo from '@/layout/common/footInfo.vue';
+import classList from '@/layout/class/classList.vue';
 
 export default {
   name: 'index',
   props: {},
   components: {
-    studentList, //学生列表
-    teaStudentList, //班主任学生列表
-    footInfo, //底部信息
+    topInfo, //头部导航
+    footInfo, //底部导航
+    classList, //班级名单
   },
-  data: () => ({
-    studentList: [
-      {
-        name: '刘裕',
-        gender: '男',
-        faculty: '计算机学院',
-        major: '应用软件技术专业',
-        job: '班長',
-      },
-      {
-        name: '刘裕',
-        gender: '男',
-        faculty: '计算机学院',
-        major: '应用软件技术专业',
-        job: '學委',
-      },
-      {
-        name: '刘裕',
-        gender: '男',
-        faculty: '计算机学院',
-        major: '应用软件技术专业',
-      },
-    ],
-    role: '4',
-    show: false,
-    form: {
-      name: '流域',
-      job: '',
-    },
-  }),
+  data: () => ({}),
   created() {},
   computed: {},
-  methods: {
-    clickDialog() {
-      this.show = true;
-    },
-    submitUpdate(form) {
-      console.log(form);
-      this.show = false;
-    },
-  },
+  methods: {},
 };
 </script>
 
 <style lang="less" scoped>
-.info {
+.style {
   width: 100%;
   min-height: 667px;
   position: relative;
-  background-color: #edeae8;
+  background-color: #f9fafc;
 }
 .top {
-  height: 50px;
-  line-height: 50px;
-  margin: 0 0 10px 0;
-  background: #fff;
-}
-.top .title {
-  padding: 0 15px;
-  font-size: 20px;
-}
-.top .btn {
-  text-align: center;
+  height: 46px;
+  overflow: hidden;
 }
 .main {
-  margin: 0 0 50px 0;
-}
-.list {
-  height: 100px;
-  background-color: #fff;
-  margin: 0 0 5px 0;
+  min-height: 570px;
 }
 .foot {
-  width: 100%;
   height: 50px;
-  position: absolute;
-  bottom: 0;
-  border-top: 1px solid #ccc;
-  background-color: #fff;
+  overflow: hidden;
 }
 </style>

+ 1 - 1
src/views/class/joinGroup.vue

@@ -22,7 +22,7 @@
 </template>
 
 <script>
-import footInfo from '@/layout/index/footInfo.vue';
+import footInfo from '@/layout/common/footInfo.vue';
 import groupStuList from '@/layout/class/groupStuList.vue';
 
 import { createNamespacedHelpers, mapGetters } from 'vuex';

+ 24 - 59
src/views/index.vue

@@ -1,64 +1,35 @@
 <template>
   <div id="index">
-    <el-row class="info">
-      <el-col :span="24" class="top">
-        <topInfo></topInfo>
-      </el-col>
-      <el-col :span="24" class="main">
-        <tableData :timeTable="timeTable"></tableData>
-      </el-col>
-      <el-col :span="24" class="foot">
-        <footInfo></footInfo>
+    <el-row>
+      <el-col :span="24" class="style">
+        <el-col :span="24" class="top">
+          <topInfo></topInfo>
+        </el-col>
+        <el-col :span="24" class="main">
+          <mainData></mainData>
+        </el-col>
+        <el-col :span="24" class="foot">
+          <footInfo></footInfo>
+        </el-col>
       </el-col>
     </el-row>
   </div>
 </template>
 
 <script>
-import topInfo from '@/layout/index/topInfo.vue';
-import tableData from '@/layout/index/tableData.vue';
-import footInfo from '@/layout/index/footInfo.vue';
+import topInfo from '@/layout/common/topInfo.vue';
+import footInfo from '@/layout/common/footInfo.vue';
+import mainData from '@/layout/index/mainData.vue';
+
 export default {
   name: 'index',
   props: {},
   components: {
-    topInfo, //头部信息
-    tableData, //课程表
-    footInfo, //底部信息
+    topInfo, //头部导航
+    footInfo, //底部导航
+    mainData, //课程安排主体
   },
-  data: () => ({
-    timeTable: {
-      term: '1',
-      class: '一班',
-      lessons: [
-        {
-          name: '拓展训练',
-          teacherid: '拓展教练',
-          date: '02-18',
-        },
-        {
-          name: '职业探索',
-          teacherid: '李军凯',
-          date: '02-19',
-        },
-        {
-          name: '优势挖掘',
-          teacherid: '温暖',
-          date: '02-20',
-        },
-        {
-          name: '简历制作',
-          teacherid: '史永姣',
-          date: '02-21',
-        },
-        {
-          name: '模拟面试',
-          teacherid: '李新殿',
-          date: '02-22',
-        },
-      ],
-    },
-  }),
+  data: () => ({}),
   created() {},
   computed: {},
   methods: {},
@@ -66,27 +37,21 @@ export default {
 </script>
 
 <style lang="less" scoped>
-.info {
+.style {
   width: 100%;
-  height: 100vh;
+  min-height: 667px;
   position: relative;
-  overflow: hidden;
-  background-color: #eceae8;
+  background-color: #f9fafc;
 }
 .top {
-  width: 100%;
   height: 46px;
   overflow: hidden;
 }
 .main {
-  background-color: #fff;
+  min-height: 570px;
 }
 .foot {
-  width: 100%;
   height: 50px;
-  position: absolute;
-  bottom: 0;
-  border-top: 1px solid #ccc;
-  background-color: #fff;
+  overflow: hidden;
 }
 </style>

+ 34 - 59
src/views/question/index.vue

@@ -1,82 +1,57 @@
 <template>
   <div id="index">
-    <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-row>
+      <el-col :span="24" class="style">
+        <el-col :span="24" class="top">
+          <topInfo></topInfo>
         </el-col>
-        <el-col :span="24" class="text_center">456</el-col>
-      </el-row>
-    </el-form>
-    <footInfo></footInfo>
+        <el-col :span="24" class="main">
+          <questionInfo></questionInfo>
+        </el-col>
+        <el-col :span="24" class="foot">
+          <footInfo></footInfo>
+        </el-col>
+      </el-col>
+    </el-row>
   </div>
 </template>
 
 <script>
-import footInfo from '@/layout/index/footInfo.vue';
-import { createNamespacedHelpers, mapGetters } from 'vuex';
-const { mapActions: mapQuestion } = createNamespacedHelpers('questionnaire');
+import topInfo from '@/layout/common/topInfo.vue';
+import footInfo from '@/layout/common/footInfo.vue';
+import questionInfo from '@question/src/views/index.vue';
+
 export default {
   name: 'index',
   props: {},
   components: {
-    footInfo,
-  },
-  data: () => ({
-    info: {
-      name: '2020年疫情发展问卷调查',
-      num: '1',
-      question: [],
-    },
-  }),
-  created() {
-    this.searchInfo();
+    topInfo, //头部导航
+    footInfo, //底部导航
+    questionInfo, //问卷调查
   },
+  data: () => ({}),
+  created() {},
   computed: {},
-  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);
-    //   }
-    // }
-  },
+  methods: {},
 };
 </script>
 
 <style lang="less" scoped>
-.text_auto {
+.style {
   width: 100%;
-  // height: 50px;
-  line-height: 50px;
+  min-height: 667px;
   position: relative;
-  text-align: center;
-  border-bottom: 1px dashed #333;
+  background-color: #f9fafc;
 }
-
-.text_left {
-  width: 100%;
-  // height: 50px;
-  line-height: 50px;
-  position: relative;
-  padding-left: 25px;
-  color: blue;
+.top {
+  height: 46px;
+  overflow: hidden;
 }
-.text_center {
-  width: 100%;
-  line-height: 10px;
-  position: relative;
-  padding-left: 50px;
+.main {
+  min-height: 570px;
+}
+.foot {
+  height: 50px;
+  overflow: hidden;
 }
 </style>

+ 1 - 1
src/views/user/checkWork.vue

@@ -23,7 +23,7 @@
 
 <script>
 import checkList from '@/layout/user/checkList.vue';
-import footInfo from '@/layout/index/footInfo.vue';
+import footInfo from '@/layout/common/footInfo.vue';
 import { createNamespacedHelpers, mapGetters } from 'vuex';
 const { mapActions: mapCheck } = createNamespacedHelpers('attendance');
 export default {

+ 22 - 29
src/views/user/index.vue

@@ -1,15 +1,17 @@
 <template>
   <div id="index">
     <el-row>
-      <el-col :span="24" class="info">
-        <el-col :span="24" class="native">
-          <topNative></topNative>
-        </el-col>
+      <el-col :span="24" class="style">
         <el-col :span="24" class="top">
-          <topInfo :info="info"></topInfo>
+          <topInfo></topInfo>
         </el-col>
-        <el-col :span="24" class="click">
-          <clickBtn></clickBtn>
+        <el-col :span="24" class="main">
+          <el-col :span="24" class="message">
+            <messageInfo :info="info"></messageInfo>
+          </el-col>
+          <el-col :span="24" class="clickBtn">
+            <clickBtn></clickBtn>
+          </el-col>
         </el-col>
         <el-col :span="24" class="foot">
           <footInfo></footInfo>
@@ -20,18 +22,18 @@
 </template>
 
 <script>
-import topNative from '@/layout/index/topInfo.vue';
-import topInfo from '@/layout/user/topInfo.vue';
+import topInfo from '@/layout/common/topInfo.vue';
+import footInfo from '@/layout/common/footInfo.vue';
+import messageInfo from '@/layout/user/messageInfo.vue';
 import clickBtn from '@/layout/user/clickBtn.vue';
-import footInfo from '@/layout/index/footInfo.vue';
 export default {
   name: 'index',
   props: {},
   components: {
-    topNative, //头部导航
-    topInfo, //个人信息
+    topInfo, //头部导航
+    footInfo, //底部导航
+    messageInfo, //个人信息
     clickBtn, //功能按钮
-    footInfo, //底部信息
   },
   data: () => ({
     info: {
@@ -61,30 +63,21 @@ export default {
 </script>
 
 <style lang="less" scoped>
-.info {
+.style {
   width: 100%;
-  height: 100vh;
+  min-height: 667px;
   position: relative;
-  overflow: hidden;
   background-color: #f9fafc;
 }
-.native {
-  margin: 0 0 50px 0;
-}
 .top {
-  height: 100px;
-  background-color: #fff;
-  margin: 0 0 10px 0;
+  height: 46px;
+  overflow: hidden;
 }
-.click {
-  min-height: 50px;
+.main {
+  min-height: 570px;
 }
 .foot {
-  width: 100%;
   height: 50px;
-  position: absolute;
-  bottom: 0;
-  border-top: 1px solid #ccc;
-  background-color: #fff;
+  overflow: hidden;
 }
 </style>

+ 1 - 16
src/views/user/leave.vue

@@ -14,7 +14,7 @@
 </template>
 
 <script>
-import topNative from '@/layout/index/topInfos.vue';
+import topNative from '@/layout/common/topInfos.vue';
 import leaveList from '@/layout/user/leaveList.vue';
 import { createNamespacedHelpers, mapGetters } from 'vuex';
 const { mapActions: mapLeave } = createNamespacedHelpers('leave');
@@ -52,19 +52,4 @@ export default {
 .native {
   margin: 0 0 50px 0;
 }
-.top {
-  height: 50px;
-  line-height: 50px;
-  background-color: #fff;
-  margin: 0 0 10px 0;
-  border-bottom: 1px solid #ccc;
-}
-.top .title {
-  padding: 0 15px;
-  font-size: 20px;
-}
-.top .btn {
-  text-align: right;
-  padding: 0 30px;
-}
 </style>

+ 1 - 1
src/views/user/leaveDetail.vue

@@ -14,7 +14,7 @@
 </template>
 
 <script>
-import topNative from '@/layout/index/topInfo.vue';
+import topNative from '@/layout/common/footInfo.vue';
 import formLeave from '@/layout/user/formLeave.vue';
 
 import { createNamespacedHelpers, mapGetters } from 'vuex';

+ 1 - 1
src/views/user/personalDetail.vue

@@ -14,7 +14,7 @@
 </template>
 
 <script>
-import topNative from '@/layout/index/topInfo.vue';
+import topNative from '@/layout/common/footInfo.vue';
 import messageInfo from '@/layout/user/messageInfo.vue';
 
 export default {