Browse Source

11.6新需求

houxq 1 year ago
parent
commit
bc2e82c322

+ 240 - 0
src/pages/_user/bjdmqk.vue

@@ -0,0 +1,240 @@
+<template>
+  <div class="content">
+    <van-nav-bar title="班级点名情况" left-arrow @click-left="onClickLeft" />
+    <van-cell title="选择单个日期" is-link :value="currentTime" @click="showCalendar" />
+    <van-calendar
+      :show="show"
+      @confirm="onConfirm"
+      :min-date="new Date('1970/01/01')"
+      :max-date="new Date('2099/01/31')"
+      @close="show = false"
+    />
+    <van-list>
+      <van-cell
+        v-for="item in list"
+        :key="item"
+        @click="detailData(item.cm_id), (toDetail = true)"
+      >
+        <template #title>
+          <div
+            style="display: flex; justify-content: space-between; color: black"
+          >
+            <span>{{ item.cm_name }}</span>
+            <span>{{ item.ydmqk_desc }}</span>
+          </div>
+        </template>
+
+        <template #label>
+          <div style="color: black">
+            <span>{{ item.ydmqk_alyz_desc }}</span>
+          </div>
+        </template>
+      </van-cell>
+    </van-list>
+    <div v-show="toDetail" class="cover"></div>
+    <div class="detail-list" v-if="toDetail">
+      <van-icon @click="toDetail = false" name="cross" size="0.4*13.3vw" />
+      <div class="listStyle">
+        <table
+          v-if="member.length > 0"
+          cellpadding="0"
+          cellspacing="0"
+          align="center"
+          valign="middle"
+        >
+          <tr v-for="(item, index) in member" :key="index">
+            <td colspan="2">{{ item.realname }}</td>
+            <td colspan="3">{{ item.ydmzt_desc }}</td>
+          </tr>
+        </table>
+        <div v-else>暂无数据</div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { team_list } from "./api";
+
+export default {
+  data() {
+    return {
+      currentTime: "",
+      show: false,
+      loading: false,
+      kxq_code: "",
+      teamData: [],
+      list: [],
+      toDetail: false,
+      member: [],
+    };
+  },
+  methods: {
+    showCalendar() {
+      this.show = true;
+    },
+    formatDate(date) {
+      return `${date.getFullYear()}-${
+        date.getMonth() + 1 >= 1 && date.getMonth() + 1 <= 9
+          ? "0" + (date.getMonth() + 1)
+          : date.getMonth() + 1
+      }-${
+        date.getDate() >= 0 && date.getDate() <= 9
+          ? "0" + date.getDate()
+          : date.getDate()
+      }`;
+    },
+    onConfirm(date) {
+      this.currentTime = this.formatDate(date);
+      this.onLoad();
+      this.show = false;
+    },
+
+    getTeamData() {
+      team_list().then((res) => {
+        this.teamData = res.data.page_data;
+        this.teamData.map((item) => {
+          if (item.kxq_sfdqxq_option_k == "1") {
+            this.kxq_code = item.kxq_code;
+            this.onLoad();
+          }
+        });
+      });
+    },
+    getTimeFormat() {
+      var date = new Date();
+      var month = date.getMonth() + 1;
+      var strDate = date.getDate();
+      if (month >= 1 && month <= 9) {
+        month = "0" + month;
+      }
+      if (strDate >= 0 && strDate <= 9) {
+        strDate = "0" + strDate;
+      }
+      this.currentTime = date.getFullYear() + "-" + month + "-" + strDate;
+    },
+
+    onLoad() {
+      this.loading = true;
+      request({
+        url: "/khfw/kccq/class_ydmqk",
+        data: {
+          kxq_code: this.kxq_code,
+          date: this.currentTime,
+        },
+      }).then((res) => {
+        this.list = res.data;
+        this.loading = false;
+      });
+    },
+    detailData(id) {
+      this.list.map((item) => {
+        if (item.cm_id == id) {
+          this.member = item.member;
+        }
+      });
+    },
+    onClickLeft() {
+      this.$router.push({ name: "user" });
+    },
+  },
+  mounted() {
+    this.getTeamData();
+    this.getTimeFormat();
+  },
+};
+</script>
+
+<style  lang="scss" scoped>
+.van-tabs__nav {
+  background: #fff;
+  .van-tab {
+    margin-right: 0.5 * 13.3vw;
+  }
+  .van-tab {
+    border-bottom: 0.1 * 13.3vw solid rgba(0, 0, 0, 0);
+  }
+  .van-tab--active {
+    font-weight: 400;
+    box-sizing: border-box;
+    border-bottom: 0.05 * 13.3vw solid #003eee;
+  }
+}
+.van-tabs__line {
+  background: unset;
+}
+.van-tabs__content {
+  //   margin-top: 0.1 * 13.3vw;
+  line-height: 0;
+  padding: 0;
+}
+
+::v-deep .van-nav-bar {
+  width: 100%;
+  height: 1 * 13.3vw;
+  line-height: 1 * 13.3vw;
+  background-color: #003eee;
+  .van-nav-bar__title {
+    color: #fff !important;
+    font-size: 0.36 * 13.3vw;
+    font-weight: 350;
+  }
+  .van-nav-bar__text {
+    color: #fff !important;
+    font-size: 0.32 * 13.3vw;
+    font-weight: 350;
+  }
+}
+.cover {
+  position: fixed;
+  top: 0;
+  width: 100vw;
+  height: 100vh;
+  background-color: #000000;
+  opacity: 0.3;
+}
+.detail-list {
+  width: 6.8 * 13.3vw;
+  // height: 8.24 * 13.3vw;
+  color: #333333;
+  background-color: #fff;
+  position: fixed;
+  top: 1.5 * 13.3vw;
+  left: 0.32 * 13.3vw;
+  border-radius: 0.1 * 13.3vw;
+  z-index: 5;
+  padding: 0.2 * 13.3vw 0.1 * 13.3vw;
+  box-sizing: border-box;
+  i {
+    position: absolute;
+    right: 0.2 * 13.3vw;
+    top: 0.23 * 13.3vw;
+  }
+  .listStyle {
+    height: 8 * 13.3vw;
+    margin: 0.5 * 13.3vw 0.3 * 13.3vw;
+    overflow: scroll;
+  }
+}
+
+table {
+  table-layout: fixed;
+  width: 100%;
+  padding: auto;
+  border-top: 1px solid #000;
+  border-left: 1px solid #000;
+}
+
+tr {
+  height: 30px;
+  line-height: 30px;
+  text-align: left;
+}
+
+td {
+  border-bottom: 1px solid #000;
+  border-right: 1px solid #000;
+  box-sizing: border-box;
+  padding-left: 1%;
+}
+</style>

+ 11 - 1
src/pages/_user/index.vue

@@ -136,6 +136,13 @@
       </div>
       <van-icon name="arrow" size="16" color="#E0E0E0" />
     </li>
+    <li @click="toOther(12)" v-if="userInfo.user_role_id == '72' && !isManage">
+      <div>
+        <span class="order-icon o-5"></span>
+        <h4 class="order-title">班级点名情况</h4>
+      </div>
+      <van-icon name="arrow" size="16" color="#E0E0E0" />
+    </li>
   </ul>
   <van-tabbar route>
     <van-tabbar-item replace icon="home-o" to="/home">首页</van-tabbar-item>
@@ -240,6 +247,9 @@ export default {
         case 10:
           this.$router.push({ name: "stxk_teacher" });
           break;
+        case 12:
+          this.$router.push({ name: "bjdmqk" });
+          break;
         case 11:
           showToast("该模块正在开发中~");
           break;
@@ -278,7 +288,7 @@ export default {
               this.childId = userXx.user_role_id;
               this.childName = userXx.user_realname;
               //  console.log(this.childData[0].user_id, 2222);
-              setChild(this.childData[0])
+              setChild(this.childData[0]);
             }
           }
         }

+ 52 - 5
src/pages/_user/stkzqk.vue

@@ -36,12 +36,12 @@
     </van-cell-group>
     <div class="detail">
       <h3>课程情况</h3>
-      <div class="course-num flex">
-        <div class="img-1 w-180px mr-10px">
+      <div class="course-num flex justify-between">
+        <div class="img-1 w-190px mr-10px">
           <div class="title">社团正常开班数</div>
           <div class="num">{{ kcqkData.zc }}</div>
         </div>
-        <div class="img-2 w-180px">
+        <div class="img-2 w-190px" @click="toDetail = true">
           <div class="title">社团非正常开班数</div>
           <div class="num">{{ kcqkData.fzc }}</div>
         </div>
@@ -100,6 +100,20 @@
         </van-collapse>
       </div>
     </div>
+    <div v-show="toDetail" class="cover"></div>
+    <div class="detail-list" v-if="toDetail">
+      <van-icon @click="toDetail = false" name="cross" size="0.4*13.3vw" />
+      <div class="listStyle">
+        <div
+          class="px-10px my-5px flex justify-between"
+          v-for="(item, index) in kcqkData.fzc_kc"
+          :key="index"
+        >
+          <span>{{ item.kcmc }} </span>
+          <span>{{ item.kkyc_desc }}</span>
+        </div>
+      </div>
+    </div>
   </div>
 </template>
 
@@ -125,6 +139,7 @@ export default {
       curTeamCode: "",
       kxq_code: "",
       week: "",
+      toDetail: false,
     };
   },
   methods: {
@@ -299,12 +314,12 @@ select {
     .img-1 {
       padding: 0.32 * 13.3vw 0.23 * 13.3vw;
       background: url("@/assets/images/img-1.png") center no-repeat;
-      background-size: 180px 110px;
+      background-size: 190px 110px;
     }
     .img-2 {
       padding: 0.32 * 13.3vw 0.23 * 13.3vw;
       background: url("@/assets/images/img-2.png") center no-repeat;
-      background-size: 180px 110px;
+      background-size: 190px 110px;
     }
     .title {
       font-size: 0.3 * 13.3vw;
@@ -361,4 +376,36 @@ select {
     overflow: hidden;
   }
 }
+.cover {
+  position: fixed;
+  top: 0;
+  width: 100vw;
+  height: 100vh;
+  background-color: #000000;
+  opacity: 0.3;
+}
+
+.detail-list {
+  width: 6.8 * 13.3vw;
+  // height: 8.24 * 13.3vw;
+  color: #333333;
+  background-color: #fff;
+  position: fixed;
+  top: 1.5 * 13.3vw;
+  left: 0.32 * 13.3vw;
+  border-radius: 0.1 * 13.3vw;
+  z-index: 5;
+  padding: 0.2 * 13.3vw 0.1 * 13.3vw;
+  box-sizing: border-box;
+  i {
+    position: absolute;
+    right: 0.2 * 13.3vw;
+    top: 0.23 * 13.3vw;
+  }
+  .listStyle {
+    height: 10 * 13.3vw;
+    margin: 0.5 * 13.3vw 0;
+    overflow: scroll;
+  }
+}
 </style>

+ 9 - 6
src/pages/stxkjsd/index.vue

@@ -133,7 +133,7 @@
               <p class="c-detail mt-27px">
                 <span> 主讲:{{ c.khfw_kcbgl.kkb_zjjs_xm }}</span>
                 <span class="mx-3px">地点:{{ c.khfw_kcbgl.kj_name }}</span>
-                <span>课时:4</span>
+                <span>课时:{{c.khfw_kcgl.kk_kss}}</span>
               </p>
 
               <p class="c-date">
@@ -185,19 +185,19 @@
       </van-tab>
       <van-tab :title="'非正常开课课程(' + ycNum + ')'" name="c">
         <div
-          class="class-number"
+          class="class-number "
           v-show="state.showIndex === index"
           v-for="(week, index) in classWeek"
           :key="week"
         >
           <!-- <p>课程数量({{ week.course.length }})</p> -->
           <div
-            class="class-list"
+            class="class-list " style="height:120px"
             v-for="(c, i) in week.course"
             v-show="c.kkyc == '1'"
             :key="i"
           >
-            <div class="class-left"></div>
+            <div class="class-left" style="height:120px"></div>
             <div class="class-right">
               <h1>{{ c.khfw_kcbgl.kk_name }}</h1>
               <img
@@ -213,10 +213,10 @@
               <p class="c-detail mt-27px">
                 <span> 主讲:{{ c.khfw_kcbgl.kkb_zjjs_xm }}</span>
                 <span class="mx-3px">地点:{{ c.khfw_kcbgl.kj_name }}</span>
-                <span>课时:4</span>
+                <span>课时:{{c.khfw_kcgl.kk_kss}}</span>
               </p>
 
-              <p class="c-date">
+              <p class="c-date mb-20px" >
                 <span>
                   <van-icon name="clock-o" />{{ c.kkbk_starttime }} -
                   {{ c.kkbk_endtime }}
@@ -258,6 +258,9 @@
                   >查看详情</span
                 >
               </p>
+              <p style="color: red; font-size: 12px;height:20px;font-weight:600">
+                异常原因:{{ c.kkyc_desc }}
+              </p>
             </div>
           </div>
         </div>

+ 6 - 0
src/router/index.js

@@ -68,6 +68,12 @@ const router = createRouter({
       meta: { loginRequest: "true" },
       component: () => import("~/pages/_user/stkzqk.vue"),
     },
+     {
+      path: "/user/bjdmqk",
+      name: "bjdmqk",
+      meta: { loginRequest: "true" },
+      component: () => import("~/pages/_user/bjdmqk.vue"),
+    },
     {
       path: "/stxk",
       children: [

File diff suppressed because it is too large
+ 4 - 4
src/store/user.js