Browse Source

no message

seamwang 1 year ago
parent
commit
59aec80101

+ 1 - 1
src/common/urlMap.js

@@ -27,5 +27,5 @@ urlMap.set('order', '/pages/order/index')
27 27
 urlMap.set('agreement', '/pages/agreement/index')
28 28
 urlMap.set('courseFiles', '/pages/mine/courseFiles')
29 29
 urlMap.set('fileDetail', '/pages/mine/fileDetail')
30
-
30
+urlMap.set('teachAims', '/pages/studentcenter/teachAims')
31 31
 export default urlMap

+ 4 - 0
src/pages.json

@@ -103,6 +103,10 @@
103 103
     {
104 104
       "path": "pages/mine/fileDetail",
105 105
       "style": {}
106
+    },
107
+    {
108
+      "path": "pages/studentcenter/teachAims",
109
+      "style": {}
106 110
     }
107 111
   ],
108 112
   "globalStyle": {

+ 25 - 13
src/pages/class/gift.vue

@@ -2,12 +2,6 @@
2 2
   <view class="page" style="background-color: #fff;">
3 3
     <cu-custom :isBack="true" title="智能报课"></cu-custom>
4 4
     <view class="steps solid-bottom flex justify-between">
5
-      <!-- <view class="text-center"><text class="text-red">点击切换下一步</text></view>
6
-      <view class="cu-steps">
7
-        <view class="cu-item" :class="index > cur ? '' : 'text-student'" v-for="(item, index) in numList" :key="index" @tap="changeStep(index)">
8
-          <text class="num" :data-index="index + 1"></text> {{ item.name }}
9
-        </view>
10
-      </view> -->
11 5
       <view v-for="(item, index) in stepList" :key="index" class="step flex-sub text-center" :class="{ cur: cur === index }" @tap="changeStep(index)">{{ item.name }}</view>
12 6
     </view>
13 7
     <view class="main" :style="[{ height: 'calc(100vh - 40px - ' + topHeader + 'px)' }]">
@@ -87,21 +81,26 @@
87 81
                 scroll-with-animation
88 82
                 :style="'height:calc(100vh - 70px - 40px - ' + topHeader + 'px)'"
89 83
                 :scroll-into-view="'main-' + mainCur"
90
-                @scroll="VerticalMain"
91 84
               >
92 85
                 <checkbox-group style="width: 100%;" v-model="checked">
93 86
                   <view class="cu-item bg-white padding margin-bottom-sm" v-for="(item, i) in attends" :key="i">
94 87
                     <view>{{ item.week }}</view>
95
-                    <view v-for="(course, c) in item.list" :key="c">
88
+                    <view v-for="(course, c) in item.list" :key="c" :class="course.status == 0 ? 'disabled-course' : ''">
96 89
                       <view class="cu-bar solid-bottom">
97 90
                         <view>
98
-                          <label @tap="classChange(course.class_attend_id, i)">
91
+                          <label @tap="classChange(course, i)">
99 92
                             <view class="flex justify-between align-center">
100 93
                               <view
101 94
                                 ><text>{{ course.attend_name }}</text></view
102 95
                               >
103 96
                               <view>
104
-                                <checkbox :value="course.class_attend_id" :checked="checked.includes(course.class_attend_id)" class="round cyan" style="transform: scale(0.7);" />
97
+                                <checkbox
98
+                                  :disabled="course.status == 0"
99
+                                  :value="course.class_attend_id"
100
+                                  :checked="checked.includes(course.class_attend_id)"
101
+                                  class="round cyan"
102
+                                  style="transform: scale(0.7);"
103
+                                />
105 104
                               </view>
106 105
                             </view>
107 106
                           </label>
@@ -112,6 +111,7 @@
112 111
                           <label v-for="prop in course.prop" :key="prop.id">
113 112
                             <view>
114 113
                               <checkbox
114
+                                :disabled="course.status == 0"
115 115
                                 :value="prop.id"
116 116
                                 class="cyan"
117 117
                                 style="transform: scale(0.7);"
@@ -257,8 +257,10 @@ export default {
257 257
         this.checked = [] //初始化选项
258 258
         if (this.attends.length > 0) {
259 259
           this.attends.map((course, index) => {
260
-            const item = course.list[0]
261
-            const class_attend_id = item.class_attend_id
260
+            //过滤不能报课的
261
+            const list = course.list
262
+            const item = list[0]
263
+            const class_attend_id = item.status > 0 ? item.class_attend_id : null
262 264
             this.$set(this.checked, index, class_attend_id)
263 265
             const prop = item.prop.length > 0 ? [item.prop[0].id] : []
264 266
             this.$set(this.checked_props, index, { class_attend_id: class_attend_id, prop: prop })
@@ -318,7 +320,11 @@ export default {
318 320
     changeDisableBtn() {
319 321
       this.disableBtn = true
320 322
     },
321
-    classChange(class_attend_id, i) {
323
+    classChange(course, i) {
324
+      if (course.status == 0) {
325
+        return false
326
+      }
327
+      const class_attend_id = course.class_attend_id
322 328
       if (this.checked.includes(class_attend_id)) {
323 329
         this.$set(this.checked, i, null)
324 330
         this.$set(this.checked_props, i, { class_attend_id: null, prop: [] })
@@ -430,6 +436,12 @@ export default {
430 436
   position: fixed;
431 437
   bottom: 60px;
432 438
 }
439
+.disabled-course {
440
+  color: #c3c3c3;
441
+  checkbox::before {
442
+    color: #e8e0e0 !important;
443
+  }
444
+}
433 445
 .btn-check-group {
434 446
   checkbox {
435 447
     display: none;

+ 0 - 1
src/pages/index/components/card.vue

@@ -37,7 +37,6 @@ export default {
37 37
   },
38 38
   methods: {
39 39
     goDetail(item) {
40
-      console.log(111)
41 40
       if (!item.enable) {
42 41
         uni.showToast({ title: '课程已停止!', icon: 'none' })
43 42
         return false

+ 0 - 14
src/pages/index/index.vue

@@ -67,13 +67,6 @@
67 67
       <view class="cu-dialog basis-lg" @tap.stop="" :style="[{ top: topHeader + 'px', height: 'calc(100vh - ' + topHeader + 'px)' }]">
68 68
         <view class="filter-title">机构筛选</view>
69 69
         <view class="btn-check-group padding-lr">
70
-          <!-- <checkbox-group @change="checkboxChange" class="flex" style="flex-wrap: wrap;" id="agency">
71
-							<label class="btn-check-label margin-top-sm padding-lr-xs text-sm text-ellipsis" :class="{'bg-cyan':params.agency.includes(item.id+'')}"
72
-								v-for="item in filters.agency" :key="item.id">
73
-								<checkbox :value="item.id"/>
74
-								{{item.name}}
75
-							</label>
76
-						</checkbox-group> -->
77 70
           <radio-group class="flex" style="flex-wrap: wrap;" id="agency">
78 71
             <label
79 72
               class="btn-check-label margin-top-sm padding-lr-xs text-sm text-ellipsis"
@@ -104,13 +97,6 @@
104 97
         </view>
105 98
         <view class="filter-title">周期筛选</view>
106 99
         <view class="btn-check-group padding-lr">
107
-          <!-- <checkbox-group @change="checkboxChange" class="flex" style="flex-wrap: wrap;" id="day">
108
-							<label class="btn-check-label margin-top-sm padding-lr-xs text-sm" :class="{'bg-cyan':params.day.includes(index+'')}"
109
-								v-for="(item,index) in filters.week" :key="index">
110
-								<checkbox :value="index"/>
111
-								{{item}}
112
-							</label>
113
-						</checkbox-group> -->
114 100
           <radio-group class="flex" style="flex-wrap: wrap;" id="day">
115 101
             <label
116 102
               class="btn-check-label margin-top-sm padding-lr-xs text-sm"

+ 42 - 25
src/pages/studentcenter/operation.vue

@@ -1,12 +1,11 @@
1 1
 <template>
2 2
   <view class="page">
3 3
     <cu-custom :isBack="true" title="课堂操作"></cu-custom>
4
-    <scroll-view scroll-y="true" :style="[{height:'calc(100vh - '+ topHeader+'px)'}]">
4
+    <scroll-view scroll-y="true" :style="[{ height: 'calc(100vh - ' + topHeader + 'px)' }]">
5 5
       <view class="content">
6 6
         <view class="course-img">
7
-          <swiper class="swiper" :indicator-dots="swiper.indicatorDots" :autoplay="swiper.autoplay"
8
-            :interval="swiper.interval" :duration="swiper.duration">
9
-            <swiper-item v-for="(item,index) in detail.course_data.image" :key="index">
7
+          <swiper class="swiper" :indicator-dots="swiper.indicatorDots" :autoplay="swiper.autoplay" :interval="swiper.interval" :duration="swiper.duration">
8
+            <swiper-item v-for="(item, index) in detail.course_data.image" :key="index">
10 9
               <view class="swiper-item">
11 10
                 <image :src="item" mode="widthFix"></image>
12 11
               </view>
@@ -14,30 +13,30 @@
14 13
           </swiper>
15 14
         </view>
16 15
         <view class="detail bg-white padding">
17
-          <view class="detail-title">{{detail.course_data.attend_name}}</view>
16
+          <view class="detail-title">{{ detail.course_data.attend_name }}</view>
18 17
           <view class="detail-item">
19 18
             <text class="cuIcon-title text-student"></text>
20 19
             <text class="text-gray">周期</text>
21
-            <text class="text-black margin-left-xs">{{detail.course_data.start_at}}</text>
20
+            <text class="text-black margin-left-xs">{{ detail.course_data.start_at }}</text>
22 21
           </view>
23 22
           <view class="detail-item flex">
24
-            <text class="text-gray" style="width:40px;"></text>
25
-            <text class="text-black margin-left-xs">{{detail.course_data.end_at}}</text>
23
+            <text class="text-gray" style="width: 40px;"></text>
24
+            <text class="text-black margin-left-xs">{{ detail.course_data.end_at }}</text>
26 25
           </view>
27 26
           <view class="detail-item margin-top-xs">
28 27
             <text class="cuIcon-title text-student"></text>
29 28
             <text class="text-gray">年级</text>
30
-            <text class="text-black margin-left-xs">{{detail.course_data.grade}}</text>
29
+            <text class="text-black margin-left-xs">{{ detail.course_data.grade }}</text>
31 30
           </view>
32 31
         </view>
33 32
         <view class="teacher flex bg-white padding margin-tb-sm">
34 33
           <image mode="scaleToFill" :src="teacher_avatar" class="avatar lg"></image>
35 34
           <view class="flex-sub margin-left">
36
-            <view class="teacher-title">{{detail.teacher.username||''}}老师授课</view>
37
-            <view class="teacher-item">所属机构:{{detail.teacher.agency_name||''}}</view>
35
+            <view class="teacher-title">{{ detail.teacher.username || '' }}老师授课</view>
36
+            <view class="teacher-item">所属机构:{{ detail.teacher.agency_name || '' }}</view>
38 37
             <view class="teacher-exp flex">
39
-              <view class="exp-item">{{detail.teacher.honor||''}}</view>
40
-              <view class="exp-item">{{detail.teacher.introduce||''}}</view>
38
+              <view class="exp-item">{{ detail.teacher.honor || '' }}</view>
39
+              <view class="exp-item">{{ detail.teacher.introduce || '' }}</view>
41 40
             </view>
42 41
           </view>
43 42
         </view>
@@ -46,23 +45,40 @@
46 45
           <view class="cu-item">
47 46
             <view class="cu-content time-item flex justify-between">
48 47
               <view class="time-left text-black flex-sub">评价</view>
49
-              <view class="time-right text-student" v-if="detail.teacher&&detail.teacher.username"
50
-                @tap="check('studentEvaluate')">
48
+              <view class="time-right text-student" v-if="detail.teacher && detail.teacher.username" @tap="check('studentEvaluate')">
51 49
                 查看
52 50
               </view>
53 51
             </view>
54 52
           </view>
55 53
           <view class="cu-item">
56 54
             <view class="cu-content time-item flex justify-between">
57
-              <view class="time-left text-black flex-sub">上课时间
58
-                <view>{{detail.course_data.start_at}}</view>
55
+              <view class="time-left text-black flex-sub"
56
+                >上课时间
57
+                <view>{{ detail.course_data.start_at }}</view>
59 58
               </view>
60 59
             </view>
61 60
           </view>
62 61
           <view class="cu-item">
63 62
             <view class="cu-content time-item flex justify-between">
64
-              <view class="time-left text-black flex-sub">课堂签到
65
-                <view>{{detail.call_status.title}}</view>
63
+              <view class="time-left text-black flex-sub"
64
+                >课堂签到
65
+                <view>{{ detail.call_status.title }}</view>
66
+              </view>
67
+            </view>
68
+          </view>
69
+          <view class="cu-item">
70
+            <view class="cu-content time-item flex justify-between">
71
+              <view class="time-left text-black flex-sub">教学目标</view>
72
+              <view class="time-right text-student" @tap="globalNavigateTo('teachAims', { type: 'aims' })" v-show="detail.teach_aims.data">
73
+                查看
74
+              </view>
75
+            </view>
76
+          </view>
77
+          <view class="cu-item">
78
+            <view class="cu-content time-item flex justify-between">
79
+              <view class="time-left text-black flex-sub">教学任务</view>
80
+              <view class="time-right text-student" @tap="globalNavigateTo('teachAims', { type: 'task' })" v-show="detail.teach_task.data">
81
+                查看
66 82
               </view>
67 83
             </view>
68 84
           </view>
@@ -84,8 +100,9 @@
84 100
           </view>
85 101
           <view class="cu-item">
86 102
             <view class="cu-content time-item flex justify-between">
87
-              <view class="time-left text-black flex-sub">下课时间
88
-                <view>{{detail.course_data.end_at}}</view>
103
+              <view class="time-left text-black flex-sub"
104
+                >下课时间
105
+                <view>{{ detail.course_data.end_at }}</view>
89 106
               </view>
90 107
             </view>
91 108
           </view>
@@ -106,7 +123,7 @@
106 123
 <script>
107 124
 import { _dailiClass } from '@/api/course'
108 125
 export default {
109
-  data () {
126
+  data() {
110 127
     return {
111 128
       topHeader: this.globalCustomBarHeight,
112 129
       plan_id: 0,
@@ -120,17 +137,17 @@ export default {
120 137
       teacher_avatar: '/static/imgs/class/logo0.png'
121 138
     }
122 139
   },
123
-  onLoad (options) {
140
+  onLoad(options) {
124 141
     const id = decodeURIComponent(options.id)
125 142
     if (!id) uni.navigateBack()
126 143
     this.plan_id = id
127 144
     this.init()
128 145
   },
129 146
   methods: {
130
-    check (page) {
147
+    check(page) {
131 148
       this.globalNavigateTo(page, { plan_id: this.plan_id })
132 149
     },
133
-    init () {
150
+    init() {
134 151
       _dailiClass({ plan_id: this.plan_id }).then(res => {
135 152
         this.detail = res.data
136 153
         uni.setStorage({

+ 40 - 0
src/pages/studentcenter/teachAims.vue

@@ -0,0 +1,40 @@
1
+<template>
2
+  <view class="page">
3
+    <cu-custom :isBack="true" :title="title"></cu-custom>
4
+    <scroll-view scroll-y="true" :style="[{ height: 'calc(100vh - ' + topHeader + 'px)' }]">
5
+      <view class="content padding">
6
+        {{ content.data }}
7
+      </view>
8
+    </scroll-view>
9
+  </view>
10
+</template>
11
+
12
+<script>
13
+import { checkTypes } from '@/common/utils/index'
14
+export default {
15
+  data() {
16
+    return {
17
+      topHeader: this.globalCustomBarHeight,
18
+      title: '',
19
+      content: {}
20
+    }
21
+  },
22
+  onLoad(options) {
23
+    this.title = options.type === 'task' ? '教学任务' : '教学目标'
24
+    this.init(options.type)
25
+  },
26
+  methods: {
27
+    checkTypes,
28
+    init(type) {
29
+      const detail = JSON.parse(uni.getStorageSync('daily_class'))
30
+      this.content = type === 'task' ? detail.teach_task : detail.teach_aims
31
+    }
32
+  }
33
+}
34
+</script>
35
+
36
+<style lang="scss" scoped>
37
+.page {
38
+  height: 100vh;
39
+}
40
+</style>