Преглед изворни кода

gkmc和班主任分班信息调整

shilipojs пре 2 година
родитељ
комит
5ea8592b97

+ 79 - 85
src/views/career/zhiyuan/gkmcDetail.vue

@@ -1,85 +1,79 @@
-<template>
-  <div
-    style="
-      padding: 24px 12%;
-      background-color: #f7f7f7;
-      min-height: calc(100vh - 155px);
-    "
-  >
-    <div style="margin-bottom: 20px">
-      <el-card ref="navBar">
-        <el-breadcrumb separator-class="el-icon-arrow-right">
-          <el-breadcrumb-item :to="{ path: '/index' }">首页</el-breadcrumb-item>
-          <el-breadcrumb-item :to="{ path: '/career/gkmc/index' }"
-            >高考名词</el-breadcrumb-item
-          >
-        </el-breadcrumb>
-      </el-card>
-    </div>
-    <div class="content">
-      <el-card>
-        <p class="tit">{{ info.name }}</p>
-        <div v-html="info.content"></div>
-        <div class="prev" v-if="info.prev" @click="toDetail(info.prev.id)">
-          {{ "<<" + info.prev.name }}
-        </div>
-        <div class="next" v-if="info.next" @click="toDetail(info.next.id)">
-          {{ info.next.name }}>>
-        </div>
-      </el-card>
-    </div>
-  </div>
-</template>
-
-<script>
-import { detail } from "@/api/webApi/career-other";
-export default {
-  data() {
-    return {
-      info: {},
-    };
-  },
-  created() {
-    let { id } = this.$route.query;
-
-    detail({ id: id }).then((res) => {
-      this.info = res.data;
-      console.log(res);
-    });
-  },
-  methods: {
-    toDetail(id) {
-      detail({ id: id }).then((res) => {
-        this.info = res.data;
-        console.log(res);
-      });
-    },
-  },
-};
-</script>
-
-<style lang="scss">
-.tit {
-  text-align: center;
-  padding: 10px 0;
-  font-size: 32px;
-  margin-bottom: 24px;
-}
-.prev {
-  float: left;
-  padding: 10px;
-  cursor: pointer;
-}
-.next {
-  float: right;
-  padding: 10px;
-  cursor: pointer;
-}
-.prev:hover{
-    color:#47c6a2;
-}
-.next:hover{
-    color:#47c6a2;
-}
-</style>
-
+<template>
+  <div
+    class="app-container"
+  >
+    <evaluation-title
+      navBackButton
+      title="名词详情"
+      :navAction="closeDetail"
+    ></evaluation-title>
+    <div class="content">
+      <el-card>
+        <p class="tit">{{ info.name }}</p>
+        <div v-html="info.content"></div>
+        <div class="prev" v-if="info.prev" @click="toDetail(info.prev.id)">
+          {{ "<<" + info.prev.name }}
+        </div>
+        <div class="next" v-if="info.next" @click="toDetail(info.next.id)">
+          {{ info.next.name }}>>
+        </div>
+      </el-card>
+    </div>
+  </div>
+</template>
+
+<script>
+import { detail } from "@/api/webApi/career-other";
+export default {
+  data() {
+    return {
+      info: {},
+    };
+  },
+  created() {
+    let { id } = this.$route.query;
+
+    detail({ id: id }).then((res) => {
+      this.info = res.data;
+      console.log(res);
+    });
+  },
+  methods: {
+    closeDetail() {
+      this.$router.go(-1)
+    },
+    toDetail(id) {
+      detail({ id: id }).then((res) => {
+        this.info = res.data;
+        console.log(res);
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.tit {
+  text-align: center;
+  padding: 10px 0;
+  font-size: 32px;
+  margin-bottom: 24px;
+}
+.prev {
+  float: left;
+  padding: 10px;
+  cursor: pointer;
+}
+.next {
+  float: right;
+  padding: 10px;
+  cursor: pointer;
+}
+.prev:hover{
+    color:#47c6a2;
+}
+.next:hover{
+    color:#47c6a2;
+}
+</style>
+

+ 7 - 2
src/views/elective/dispatch/master/info/self.vue

@@ -6,7 +6,7 @@
       ></mx-condition>
     </el-card>
     <!--   班主任查看  -->
-    <el-card class="box-card" v-if="queryParams.roundId">
+    <el-card class="box-card" v-if="round.dispatchCompleted">
       <div slot="header" class="clearfix">
         <p class="f20 text-center">{{ title }}</p>
       </div>
@@ -21,7 +21,7 @@
         </mx-table>
       </div>
     </el-card>
-    <evaluation-empty v-else-if="!queryParams.roundId" shadow title="当前学年没有分班数据"></evaluation-empty>
+    <evaluation-empty v-if="!round.dispatchCompleted" shadow :title="emptyTitle"></evaluation-empty>
   </div>
 </template>
 <script>
@@ -65,6 +65,11 @@ export default {
     }
   },
   computed: {
+    emptyTitle() {
+      if(!Object.keys(this.round).length) return ''
+      if(!this.round.dispatchCompleted) return '当前选科分班未结束'
+      if(!this.queryParams.roundId) return '当前学年没有分班数据'
+    },
     title() {
       if(!Object.keys(this.round).length) return ''
       return `${this.$store.getters.school.schoolName}${this.queryParams.year}学年${this.round.name}分班信息`