zengyicheng 2 anos atrás
pai
commit
d3a3c90e65

+ 23 - 22
src/App.vue

@@ -1,8 +1,6 @@
 <template>
   <div id="app" :class="{}">
-    <div
-      class="app_head"
-    >
+    <div class="app_head">
       <div class="logo" @click="goTo('/course')"></div>
       <span
         style="margin-left: 10px; color: #fff; font-weight: 600"
@@ -46,31 +44,27 @@
       />
 
       <!-- 底部导航 -->
-      <!-- <footer-nav
-				v-if="isShowNav"
-				:luyou="this.$store.state.luyou"
-      ></footer-nav>-->
+      <footer-nav
+        v-if="isShowNav && $store.state.userInfo.type == 2"
+        :luyou="this.$store.state.luyou"
+      ></footer-nav>
     </div>
   </div>
 </template>
 
 <script>
-// import leftBar from "./components/tools/leftBar";
+import leftBar from "./components/tools/leftBar";
 import { Message } from "element-ui";
 export default {
   name: "App",
   data() {
     return {
       isShowNav: true, // 是否显示导航 Tab
-      navTabs: [], // 导航
+      navTabs: ["/anliList"], // 导航
     };
   },
-  // components: {
-  //   "footer-nav": leftBar,
-  // },
-  created: function () {
-    this.routerP();
-    // this.getnCount();
+  components: {
+    "footer-nav": leftBar,
   },
   methods: {
     isLogin() {
@@ -150,6 +144,9 @@ export default {
       }
     },
   },
+  created() {
+    this.routerP();
+  },
 };
 </script>
 
@@ -196,15 +193,19 @@ body {
   margin-left: 20px;
 }
 .pb_body {
-  /* padding: 20px; */
-  /* width: 98%; */
-  /* min-width: 745px;*/
-  /* display: inline-block; */
-  /* height: 95%; */
-  /* min-height: 750px; */
+  margin-left: 220px;
+  width: calc(100% - 240px) !important;
+  /* min-width: 1140px; */
+  min-width: 750px;
+  display: inline-block;
+  /* height: calc(100% - 100px); */
+  min-height: 750px;
   background: #fff;
+  margin-top: 20px;
   border-radius: 5px;
-  /* position: absolute; */
+  position: absolute;
+  height: calc(100% - 100px);
+  overflow: auto;
 }
 
 .ggheight {

+ 2 - 0
src/components/login.vue

@@ -309,6 +309,8 @@ export default {
               _this.$store.commit("update", ["userInfo", _this.userInfo]);
               if (isU == 1) {
                 this.$router.push("/eventCenter");
+              }else if(isU == 2){
+                this.$router.push("/anliList");
               }
               // console.log(_this.$store.state);
             } else {

+ 209 - 0
src/components/pages/munAdmin/anliList.vue

@@ -0,0 +1,209 @@
+<template>
+  <div style="width: 100%">
+    <el-main>
+      <div class="tou">案例管理</div>
+      <div class="touTop">
+        <div class="touLeft">
+          <div>
+            <div>案例分类</div>
+            <el-select v-model="anliType" clearable>
+              <el-option value="0" label="所有分类"></el-option>
+            </el-select>
+          </div>
+          <div>
+            <div>案例筛选</div>
+            <el-select v-model="anliBox" clearable>
+              <el-option value="0" label="全部"></el-option>
+            </el-select>
+          </div>
+        </div>
+        <div class="touRight">
+          <div></div>
+          <div><el-button>分配案例</el-button></div>
+        </div>
+      </div>
+      <div class="anliBox">
+        <div v-for="(a, aIndex) in tableData" :key="aIndex" class="anLi">
+          <div class="anliImg"><img :src="a.info.cover[0].url" alt="" /></div>
+          <div class="anliBot">
+            <div class="detailBox">
+              <div>{{ a.info.title }}</div>
+              <div>{{ a.time }}</div>
+            </div>
+            <div class="anliButton">
+              <div><el-button>查看</el-button></div>
+              <div><el-button>评分</el-button></div>
+              <div><el-button>推荐</el-button></div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </el-main>
+    <div class="student_page">
+      <el-pagination
+        background
+        layout="prev, pager, next"
+        :page-size="10"
+        :total="total"
+        v-if="page && tableData.length"
+        style="padding-bottom: 20px"
+        @current-change="handleCurrentChange"
+      ></el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      page: 1,
+      total: 0,
+      anliType: "",
+      anliBox: "",
+      tableData: [],
+    };
+  },
+  methods: {
+    handleCurrentChange(val) {
+      this.page = val;
+      this.getAnliList();
+    },
+    getAnliList() {
+      let params = {
+        page: this.page,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectAnliList", params)
+        .then((res) => {
+          this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+          this.tableData = res.data[0];
+          for (var i = 0; i < this.tableData.length; i++) {
+            this.tableData[i].info = JSON.parse(this.tableData[i].info);
+            this.tableData[i].overview = JSON.parse(this.tableData[i].overview);
+            this.tableData[i].process = JSON.parse(this.tableData[i].process);
+            this.tableData[i].proact = JSON.parse(this.tableData[i].proact);
+            this.tableData[i].proexc = JSON.parse(this.tableData[i].proexc);
+            this.tableData[i].results = JSON.parse(this.tableData[i].results);
+          }
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+  },
+  created() {
+    this.getAnliList();
+  },
+};
+</script>
+
+<style scoped>
+.el-popover {
+  min-width: 80px;
+  text-align: center;
+}
+</style>
+
+<style scoped>
+.disUoloadSty >>> .el-upload--picture-card {
+  display: none; /* 上传按钮隐藏 */
+}
+
+.tou {
+  border-bottom: 1px solid #c9c9c9;
+  height: 50px;
+  font-size: 30px;
+}
+.touTop {
+  margin-top: 15px;
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+  justify-content: space-between;
+}
+.touLeft {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+}
+.touLeft > div {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+}
+.touLeft > div > div {
+  margin-right: 10px;
+}
+.touRight > div:nth-child(2) > .el-button {
+  background: #2268bd;
+  color: #fff;
+}
+.student_page {
+  width: 95%;
+  margin: 0 auto;
+}
+.anliBox {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: wrap;
+  align-items: center;
+  margin-top: 25px;
+}
+.anLi {
+  width: 280px;
+  margin-right: 20px;
+  box-shadow: 3px 1px 15px 3px #f0f0f2;
+}
+.anliImg {
+  width: 100%;
+  height: 170px;
+}
+.anliImg > img {
+  width: 100%;
+  height: 100%;
+}
+.anliBot {
+  background: #fff;
+  border: 1px solid #f5f5f5;
+  padding: 5px 0 10px 0;
+  box-sizing: border-box;
+}
+.detailBox {
+  padding: 0 0 0 10px;
+  box-sizing: border-box;
+}
+.detailBox > div:nth-child(1) {
+  font-size: 20px;
+  width: 250px;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  word-break: break-word;
+}
+.detailBox > div:nth-child(2) {
+  color: #999;
+  margin-top: 5px;
+  font-size: 14px;
+}
+.anliButton {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+  justify-content: center;
+  padding: 10px 0 0 0;
+}
+.anliButton > div {
+  margin-right: 5px;
+}
+.anliButton > div > .el-button {
+  background: #409efe;
+  color: #fff;
+  width: 80px;
+  border-radius: 5px;
+}
+</style>

+ 3 - 169
src/components/tools/leftBar.vue

@@ -1,19 +1,5 @@
 <template>
   <div class="bottom">
-    <!-- <div
-      class="item"
-      @click="clickItem('/')"
-      :class="{ active: $route.path === '/' }"
-    >
-      <p>首页</p>
-    </div>
-    <div
-      class="item"
-      @click="clickItem('/b')"
-      :class="{ active: $route.path === '/b' }"
-    >
-      <p>学习中心</p>
-    </div> -->
     <el-row class="tac">
       <el-col :span="12">
         <el-menu
@@ -23,167 +9,15 @@
           active-text-color="#fff"
           router
         >
-          <el-menu-item index="/course">
-            <div class="img" v-if="path == '/course'">
+          <el-menu-item index="/anliList">
+            <div class="img" v-if="path == '/anliList'">
               <img src="../../assets/icon/course-active.svg" alt="" />
             </div>
             <div class="img" v-else>
               <img src="../../assets/icon/course.png" alt="" />
             </div>
-            <span>课程项目管理</span>
+            <span>案例管理</span>
           </el-menu-item>
-          <el-menu-item index="/student">
-            <div class="img" v-if="path == '/student'">
-              <img src="../../assets/icon/student-active.svg" alt="" />
-            </div>
-            <div class="img" v-else>
-              <img src="../../assets/icon/user.png" alt="" />
-            </div>
-            <span slot="title">学生管理</span>
-          </el-menu-item>
-          <el-menu-item index="/works">
-            <div class="img" v-if="path == '/works'">
-              <img src="../../assets/icon/work-active.svg" alt="" />
-            </div>
-            <div class="img" v-else>
-              <img src="../../assets/icon/works.png" alt="" />
-            </div>
-            <span slot="title">评价管理</span>
-          </el-menu-item>
-          <el-menu-item index="/class">
-            <div class="img" v-if="path == '/class'">
-              <img src="../../assets/icon/class-active.svg" alt="" />
-            </div>
-            <div class="img" v-else>
-              <img src="../../assets/icon/class.png" alt="" />
-            </div>
-            <span slot="title">班级管理</span>
-          </el-menu-item>
-          <el-menu-item index="/data">
-            <div class="img" v-if="path == '/data'">
-              <img src="../../assets/icon/data-active.svg" alt="" />
-            </div>
-            <div class="img" v-else>
-              <img src="../../assets/icon/data.png" alt="" />
-            </div>
-            <span slot="title">我的资料</span>
-          </el-menu-item>
-          <el-menu-item index="/notice">
-            <div class="img" v-if="path == '/notice'">
-              <img src="../../assets/icon/new-active.svg" alt="" />
-            </div>
-            <div class="img" v-else>
-              <img src="../../assets/icon/notice.png" alt="" />
-            </div>
-            <span slot="title">通知公告</span>
-          </el-menu-item>
-          <el-menu-item index="/library">
-            <div class="img" v-if="path == '/library'">
-              <img src="../../assets/icon/new-active.svg" alt="" />
-            </div>
-            <div class="img" v-else>
-              <img src="../../assets/icon/notice.png" alt="" />
-            </div>
-            <span slot="title">素材库</span>
-          </el-menu-item>
-          <el-menu-item index="/classRoom">
-            <div class="img" v-if="path == '/classRoom'">
-              <img src="../../assets/icon/new-active.svg" alt="" />
-            </div>
-            <div class="img" v-else>
-              <img src="../../assets/icon/notice.png" alt="" />
-            </div>
-            <span slot="title">课堂备课</span>
-          </el-menu-item>
-          <el-menu-item index="/liveRoom">
-            <div class="img" v-if="path == '/liveRoom'">
-              <img src="../../assets/icon/new-active.svg" alt="" />
-            </div>
-            <div class="img" v-else>
-              <img src="../../assets/icon/notice.png" alt="" />
-            </div>
-            <span slot="title">实时课堂</span>
-          </el-menu-item>
-          <el-menu-item index="/addPPt">
-            <div class="img" v-if="path == '/addPPt'">
-              <img src="../../assets/icon/new-active.svg" alt="" />
-            </div>
-            <div class="img" v-else>
-              <img src="../../assets/icon/notice.png" alt="" />
-            </div>
-            <span slot="title">添加备课</span>
-          </el-menu-item>
-          <el-menu-item index="/studyLibrary">
-            <div class="img" v-if="path == '/studyLibrary'">
-              <img src="../../assets/icon/new-active.svg" alt="" />
-            </div>
-            <div class="img" v-else>
-              <img src="../../assets/icon/notice.png" alt="" />
-            </div>
-            <span slot="title">学习资料</span>
-          </el-menu-item>
-          <el-menu-item index="/GridList">
-            <div class="img" v-if="path == '/GridList'">
-              <img src="../../assets/icon/new-active.svg" alt="" />
-            </div>
-            <div class="img" v-else>
-              <img src="../../assets/icon/notice.png" alt="" />
-            </div>
-            <span slot="title">思维网格列表</span>
-          </el-menu-item>
-          <el-menu-item index="/wordList">
-            <div class="img" v-if="path == '/wordList'">
-              <img src="../../assets/icon/new-active.svg" alt="" />
-            </div>
-            <div class="img" v-else>
-              <img src="../../assets/icon/notice.png" alt="" />
-            </div>
-            <span slot="title">思维网格列表</span>
-          </el-menu-item>
-          <el-menu-item index="/Ttype">
-            <div class="img" v-if="path == '/Ttype'">
-              <img src="../../assets/icon/new-active.svg" alt="" />
-            </div>
-            <div class="img" v-else>
-              <img src="../../assets/icon/notice.png" alt="" />
-            </div>
-            <span slot="title">分组管理</span>
-          </el-menu-item>
-          <el-menu-item index="/banner">
-            <div class="img" v-if="path == '/banner'">
-              <img src="../../assets/icon/new-active.svg" alt="" />
-            </div>
-            <div class="img" v-else>
-              <img src="../../assets/icon/notice.png" alt="" />
-            </div>
-            <span slot="title">Banner管理</span>
-          </el-menu-item>
-          <el-menu-item index="/eventCenter">
-            <div class="img" v-if="path == '/eventCenter'">
-              <img src="../../assets/icon/new-active.svg" alt="" />
-            </div>
-            <div class="img" v-else>
-              <img src="../../assets/icon/notice.png" alt="" />
-            </div>
-            <span slot="title">赛事中心管理</span>
-          </el-menu-item>
-          <!-- <el-menu-item index="/ask">
-            <div class="img" v-if="path == '/ask'">
-              <img
-                src="../../assets/icon/ask-active.png"
-                style="width: 110%; height: 110%; margin-left: -3px"
-                alt=""
-              />
-            </div>
-            <div class="img" v-else>
-              <img
-                src="../../assets/icon/ask.png"
-                style="width: 110%; height: 110%; margin-left: -3px"
-                alt=""
-              />
-            </div>
-            <span slot="title">问卷调查</span>
-          </el-menu-item> -->
         </el-menu>
       </el-col>
     </el-row>

+ 10 - 2
src/router/index.js

@@ -8,6 +8,8 @@ import eventCenter from '@/components/pages/race/eventCenter'
 import addRace from '@/components/pages/race/addRace'
 import anliDetail from '@/components/pages/race/eventCenter/anliDetail'
 import demo from '@/components/pages/demo'
+import anliList from '@/components/pages/munAdmin/anliList'
+
 
 Vue.use(Router).use(ElementUI)
 
@@ -54,8 +56,14 @@ const router = new Router({
         meta: {
             requireAuth: false // 不需要鉴权
         }
-    },
-    ]
+    }, {
+        path: '/anliList',
+        name: 'anliList',
+        component: anliList,
+        meta: {
+            requireAuth: false // 不需要鉴权
+        }
+    }, ]
 })
 
 router.beforeEach((to, from, next) => {