WINDOWS-7IFQK7E\EDY 2 years ago
parent
commit
1b96e719c0
3 changed files with 172 additions and 74 deletions
  1. 0 22
      src/components.d.ts
  2. 171 51
      src/pages/stxkjsd/index.vue
  3. 1 1
      src/store/user.js

+ 0 - 22
src/components.d.ts

@@ -13,16 +13,9 @@ declare module '@vue/runtime-core' {
     RouterView: typeof import('vue-router')['RouterView']
     VanButton: typeof import('vant/es')['Button']
     VanCard: typeof import('vant/es')['Card']
-    VanCascader: typeof import('vant/es')['Cascader']
-    VanCellGroup: typeof import('vant/es')['CellGroup']
     VanCheckbox: typeof import('vant/es')['Checkbox']
     VanCheckboxGroup: typeof import('vant/es')['CheckboxGroup']
-    VanCollapse: typeof import('vant/es')['Collapse']
-    VanCollapseItem: typeof import('vant/es')['CollapseItem']
     VanConfigProvider: typeof import('vant/es')['ConfigProvider']
-    VanCountDown: typeof import('vant/es')['CountDown']
-    VanDialog: typeof import('vant/es')['Dialog']
-    VanDivider: typeof import('vant/es')['Divider']
     VanDropdownItem: typeof import('vant/es')['DropdownItem']
     VanDropdownMenu: typeof import('vant/es')['DropdownMenu']
     VanField: typeof import('vant/es')['Field']
@@ -30,26 +23,12 @@ declare module '@vue/runtime-core' {
     VanGrid: typeof import('vant/es')['Grid']
     VanGridItem: typeof import('vant/es')['GridItem']
     VanIcon: typeof import('vant/es')['Icon']
-    VanImage: typeof import('vant/es')['Image']
     VanList: typeof import('vant/es')['List']
-<<<<<<< HEAD
-    VanNavBar: typeof import('vant/es')['NavBar']
-=======
-    VanLoading: typeof import('vant/es')['Loading']
     VanNavBar: typeof import('vant/es')['NavBar']
     VanOverlay: typeof import('vant/es')['Overlay']
-    VanPicker: typeof import('vant/es')['Picker']
-    VanPopup: typeof import('vant/es')['Popup']
->>>>>>> master
     VanPullRefresh: typeof import('vant/es')['PullRefresh']
     VanRadio: typeof import('vant/es')['Radio']
     VanRadioGroup: typeof import('vant/es')['RadioGroup']
-    VanRate: typeof import('vant/es')['Rate']
-    VanSkeleton: typeof import('vant/es')['Skeleton']
-    VanStep: typeof import('vant/es')['Step']
-    VanSteps: typeof import('vant/es')['Steps']
-    VanSticky: typeof import('vant/es')['Sticky']
-    VanSubmitBar: typeof import('vant/es')['SubmitBar']
     VanSwipe: typeof import('vant/es')['Swipe']
     VanSwipeItem: typeof import('vant/es')['SwipeItem']
     VanTab: typeof import('vant/es')['Tab']
@@ -57,6 +36,5 @@ declare module '@vue/runtime-core' {
     VanTabbarItem: typeof import('vant/es')['TabbarItem']
     VanTabs: typeof import('vant/es')['Tabs']
     VanTag: typeof import('vant/es')['Tag']
-    VanUploader: typeof import('vant/es')['Uploader']
   }
 }

+ 171 - 51
src/pages/stxkjsd/index.vue

@@ -3,31 +3,53 @@
     <van-nav-bar title="社团选课" left-arrow @click-left="onClickLeft" />
     <div class="week">
       <ul class="weekday">
-        <li @click="changeWeek(week,index)" :class="[state.week == week.name ? 'dayblue' : '']" v-for="(week, index) in classWeek" :key="week">
+        <li
+          @click="changeWeek(week, index)"
+          :class="[state.week == week.name ? 'dayblue' : '']"
+          v-for="(week, index) in classWeek"
+          :key="week"
+        >
           <p class="day">{{ week.name }}</p>
           <div class="dot">
-            <div v-show="index < 3" v-for="(dot, index) in week.course" :key="dot" :class="[
-               index == 0 ? 'dot-blue' : '',
+            <div
+              v-show="index < 3"
+              v-for="(dot, index) in week.course"
+              :key="dot"
+              :class="[
+                index == 0 ? 'dot-blue' : '',
                 index == 1 ? 'dot-orange' : '',
                 index == 2 ? 'dot-purple' : '',
                 index == 3 ? 'dot-green' : '',
-              ]"></div>
-
+              ]"
+            ></div>
           </div>
         </li>
       </ul>
       <div class="slide"></div>
     </div>
     <van-tabs v-model:active="activeName" shrink>
-      <van-tab :title="'课程数量('+courseNum+')'" name="a">
-        <div class="class-number" v-show="state.showIndex === index" v-for="(week, index) in classWeek" :key="week">
+      <van-tab :title="'课程数量(' + courseNum + ')'" name="a">
+        <div
+          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" v-for="(c, i) in week.course" :key="i">
             <div class="class-left"></div>
             <div class="class-right">
               <h1>{{ c.khfw_kcbgl.kk_name }}</h1>
-              <img v-if="c.is_qd.kkq_zt == 3" src="@/assets/icon/icon-success.png" alt="" />
-              <img v-if="c.is_qd.kkq_zt == -1" src="@/assets/icon/icon-warning.png" alt="" />
+              <img
+                v-if="c.is_qd.kkq_zt == 3"
+                src="@/assets/icon/icon-success.png"
+                alt=""
+              />
+              <img
+                v-if="c.is_qd.kkq_zt == -1"
+                src="@/assets/icon/icon-warning.png"
+                alt=""
+              />
               <p class="c-detail mt-27px">
                 <span> 主讲:{{ c.khfw_kcbgl.kkb_zjjs_xm }}</span>
                 <span class="mx-3px">地点:{{ c.khfw_kcbgl.kj_name }}</span>
@@ -40,16 +62,31 @@
                   {{ c.kkbk_endtime }}
                 </span>
                 <span class="join-number">
-                  <span type="text" style="color: #6f6f6f" v-if="c.is_qd.kkq_zt == 0">通过课程申请
-                  </span>
-                  <span type="text" v-if="c.is_qd.kkq_zt == 2" @click="changeStatus(c, index, i)">通过课程申请
+                  <span
+                    type="text"
+                    style="color: #6f6f6f"
+                    v-if="c.is_qd.kkq_zt == 0"
+                    >通过课程申请
                   </span>
-                  <span type="text" style="color: #6f6f6f" v-if="c.is_qd.kkq_zt == 3">已课程申请
+                  <span
+                    type="text"
+                    v-if="c.is_qd.kkq_zt == 2"
+                    @click="changeStatus(c, index, i)"
+                    >通过课程申请
                   </span>
-                  <span type="text" v-if="c.is_qd.kkq_zt == -1" @click="assignData(c.kkbk_id), (assignTeacher = true)">分配教师
+                  <span
+                    type="text"
+                    style="color: #6f6f6f"
+                    v-if="c.is_qd.kkq_zt == 3"
+                    >课程申请已通过
                   </span>
-                  <span type="text" v-if="c.is_qd.kkq_zt == 4">已签到
+                  <span
+                    type="text"
+                    v-if="c.is_qd.kkq_zt == -1"
+                    @click="assignData(c.kkbk_id), (assignTeacher = true)"
+                    >分配教师
                   </span>
+                  <span type="text" v-if="c.is_qd.kkq_zt == 4">已签到 </span>
 
                   <!-- <span type="text" v-if="c.is_qd.kkq_zt == 4">已签到 </span> -->
 
@@ -58,21 +95,41 @@
                   </span>
                 </span>
 
-                <span class="findmore" @click="toDatail(c.kkbk_id)">查看详情</span>
+                <span class="findmore" @click="toDatail(c.kkbk_id)"
+                  >查看详情</span
+                >
               </p>
             </div>
           </div>
         </div>
       </van-tab>
-      <van-tab :title="'已正常开课课程('+zcNum+')'" name="b">
-        <div class="class-number" v-show="state.showIndex === index" v-for="(week, index) in classWeek" :key="week">
+      <van-tab :title="'已正常开课课程(' + zcNum + ')'" name="b">
+        <div
+          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" v-for="(c, i) in week.course" :key="i" v-show="c.kkyc=='0'">
+          <div
+            class="class-list"
+            v-for="(c, i) in week.course"
+            :key="i"
+            v-show="c.kkyc == '0'"
+          >
             <div class="class-left"></div>
             <div class="class-right">
               <h1>{{ c.khfw_kcbgl.kk_name }}</h1>
-              <img v-if="c.is_qd.kkq_zt == 3" src="@/assets/icon/icon-success.png" alt="" />
-              <img v-if="c.is_qd.kkq_zt == -1" src="@/assets/icon/icon-warning.png" alt="" />
+              <img
+                v-if="c.is_qd.kkq_zt == 3"
+                src="@/assets/icon/icon-success.png"
+                alt=""
+              />
+              <img
+                v-if="c.is_qd.kkq_zt == -1"
+                src="@/assets/icon/icon-warning.png"
+                alt=""
+              />
               <p class="c-detail mt-27px">
                 <span> 主讲:{{ c.khfw_kcbgl.kkb_zjjs_xm }}</span>
                 <span class="mx-3px">地点:{{ c.khfw_kcbgl.kj_name }}</span>
@@ -85,16 +142,31 @@
                   {{ c.kkbk_endtime }}
                 </span>
                 <span class="join-number">
-                  <span type="text" style="color: #6f6f6f" v-if="c.is_qd.kkq_zt == 0">通过课程申请
+                  <span
+                    type="text"
+                    style="color: #6f6f6f"
+                    v-if="c.is_qd.kkq_zt == 0"
+                    >通过课程申请
                   </span>
-                  <span type="text" v-if="c.is_qd.kkq_zt == 2" @click="changeStatus(c, index, i)">通过课程申请
+                  <span
+                    type="text"
+                    v-if="c.is_qd.kkq_zt == 2"
+                    @click="changeStatus(c, index, i)"
+                    >通过课程申请
                   </span>
-                  <span type="text" style="color: #6f6f6f" v-if="c.is_qd.kkq_zt == 3">已课程申请
+                  <span
+                    type="text"
+                    style="color: #6f6f6f"
+                    v-if="c.is_qd.kkq_zt == 3"
+                    >已课程申请
                   </span>
-                  <span type="text" v-if="c.is_qd.kkq_zt == -1" @click="assignData(c.kkbk_id), (assignTeacher = true)">分配教师
-                  </span>
-                  <span type="text" v-if="c.is_qd.kkq_zt == 4">已签到
+                  <span
+                    type="text"
+                    v-if="c.is_qd.kkq_zt == -1"
+                    @click="assignData(c.kkbk_id), (assignTeacher = true)"
+                    >分配教师
                   </span>
+                  <span type="text" v-if="c.is_qd.kkq_zt == 4">已签到 </span>
 
                   <!-- <span type="text" v-if="c.is_qd.kkq_zt == 4">已签到 </span> -->
 
@@ -103,21 +175,41 @@
                   </span>
                 </span>
 
-                <span class="findmore" @click="toDatail(c.kkbk_id)">查看详情</span>
+                <span class="findmore" @click="toDatail(c.kkbk_id)"
+                  >查看详情</span
+                >
               </p>
             </div>
           </div>
         </div>
       </van-tab>
-      <van-tab :title="'非正常开课课程('+ycNum+')'" name="c">
-        <div class="class-number" v-show="state.showIndex === index" v-for="(week, index) in classWeek" :key="week">
+      <van-tab :title="'非正常开课课程(' + ycNum + ')'" name="c">
+        <div
+          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" v-for="(c, i) in week.course" v-show="c.kkyc=='1'" :key="i">
+          <div
+            class="class-list"
+            v-for="(c, i) in week.course"
+            v-show="c.kkyc == '1'"
+            :key="i"
+          >
             <div class="class-left"></div>
             <div class="class-right">
               <h1>{{ c.khfw_kcbgl.kk_name }}</h1>
-              <img v-if="c.is_qd.kkq_zt == 3" src="@/assets/icon/icon-success.png" alt="" />
-              <img v-if="c.is_qd.kkq_zt == -1" src="@/assets/icon/icon-warning.png" alt="" />
+              <img
+                v-if="c.is_qd.kkq_zt == 3"
+                src="@/assets/icon/icon-success.png"
+                alt=""
+              />
+              <img
+                v-if="c.is_qd.kkq_zt == -1"
+                src="@/assets/icon/icon-warning.png"
+                alt=""
+              />
               <p class="c-detail mt-27px">
                 <span> 主讲:{{ c.khfw_kcbgl.kkb_zjjs_xm }}</span>
                 <span class="mx-3px">地点:{{ c.khfw_kcbgl.kj_name }}</span>
@@ -130,16 +222,31 @@
                   {{ c.kkbk_endtime }}
                 </span>
                 <span class="join-number">
-                  <span type="text" style="color: #6f6f6f" v-if="c.is_qd.kkq_zt == 0">通过课程申请
-                  </span>
-                  <span type="text" v-if="c.is_qd.kkq_zt == 2" @click="changeStatus(c, index, i)">通过课程申请
+                  <span
+                    type="text"
+                    style="color: #6f6f6f"
+                    v-if="c.is_qd.kkq_zt == 0"
+                    >通过课程申请
                   </span>
-                  <span type="text" style="color: #6f6f6f" v-if="c.is_qd.kkq_zt == 3">已课程申请
+                  <span
+                    type="text"
+                    v-if="c.is_qd.kkq_zt == 2"
+                    @click="changeStatus(c, index, i)"
+                    >通过课程申请
                   </span>
-                  <span type="text" v-if="c.is_qd.kkq_zt == -1" @click="assignData(c.kkbk_id), (assignTeacher = true)">分配教师
+                  <span
+                    type="text"
+                    style="color: #6f6f6f"
+                    v-if="c.is_qd.kkq_zt == 3"
+                    >已课程申请
                   </span>
-                  <span type="text" v-if="c.is_qd.kkq_zt == 4">已签到
+                  <span
+                    type="text"
+                    v-if="c.is_qd.kkq_zt == -1"
+                    @click="assignData(c.kkbk_id), (assignTeacher = true)"
+                    >分配教师
                   </span>
+                  <span type="text" v-if="c.is_qd.kkq_zt == 4">已签到 </span>
                   <!-- <span type="text" v-if="c.is_qd.kkq_zt == 4">已签到 </span> -->
 
                   <span v-for="(item, index) in c.is_qd" :key="index">
@@ -147,7 +254,9 @@
                   </span>
                 </span>
 
-                <span class="findmore" @click="toDatail(c.kkbk_id)">查看详情</span>
+                <span class="findmore" @click="toDatail(c.kkbk_id)"
+                  >查看详情</span
+                >
               </p>
             </div>
           </div>
@@ -159,10 +268,24 @@
 
     <!-- 分配教师 -->
     <div v-show="assignTeacher" class="cover"></div>
-    <div class="assign-teacher" v-show="assignTeacher && state.showIndex === index" v-for="(week, index) in classWeek" :key="index">
-      <van-icon name="cross" size="0.4*13.3vw" @click="(assignTeacher = false), (show = false)" />
+    <div
+      class="assign-teacher"
+      v-show="assignTeacher && state.showIndex === index"
+      v-for="(week, index) in classWeek"
+      :key="index"
+    >
+      <van-icon
+        name="cross"
+        size="0.4*13.3vw"
+        @click="(assignTeacher = false), (show = false)"
+      />
       <h3>分配教师</h3>
-      <div v-show="kkbk_id === c.kkbk_id" class="class-right" v-for="(c, i) in week.course" :key="i">
+      <div
+        v-show="kkbk_id === c.kkbk_id"
+        class="class-right"
+        v-for="(c, i) in week.course"
+        :key="i"
+      >
         <h1>{{ c.khfw_kcbgl.kk_name }}</h1>
         <p class="fp-detail">
           <span class="ml-15px"> 主讲:{{ c.khfw_kcbgl.kkb_zjjs_xm }}</span>
@@ -225,7 +348,7 @@ export default {
       kkbk_id: "",
       courseNum: "",
       ycNum: "0",
-      zcNum: "0"
+      zcNum: "0",
     };
   },
   beforeCreate() {
@@ -233,7 +356,6 @@ export default {
   },
   methods: {
     onClickLeft() {
-
       history.back();
     },
     toDatail(id) {
@@ -261,7 +383,7 @@ export default {
     },
     changeWeek(week, index) {
       this.ycNum = 0;
-      this.zcNum = 0
+      this.zcNum = 0;
       this.state.week = week.name;
       this.state.showIndex = index;
       this.courseNum = week.course.length;
@@ -269,21 +391,19 @@ export default {
         if (item.kkyc == 1) {
           this.ycNum++;
         } else {
-          this.zcNum++
+          this.zcNum++;
         }
-      })
+      });
 
       console.log(this.ycNum, this.zcNum, 88);
-
     },
     getWeek() {
       var day = new Date().getDay();
       var weeks = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
-      let index = this.classWeek.findIndex(item => item.name == weeks[day]);
+      let index = this.classWeek.findIndex((item) => item.name == weeks[day]);
       this.changeWeek(this.classWeek[index], index);
       // this.state.week = weeks[day];
       // this.state.showIndex = weeks.indexOf(this.state.week);
-
     },
     changeStatus(c, index, i) {
       let data = {

+ 1 - 1
src/store/user.js

@@ -1,5 +1,5 @@
 
-export const user = JSON.parse(localStorage.getItem('userInfo'))
+export const user =// JSON.parse(localStorage.getItem('userInfo'))
 
 // {
 //   "user_id": "248627",