lex 2 éve
szülő
commit
2840aa160f

BIN
src/common/images/icon_jiaofu.png


BIN
src/common/images/icon_zibei.png


+ 3 - 0
src/school/mass-message/component/class-list/index.tsx

@@ -119,6 +119,7 @@ export default defineComponent({
     }
 
     const onSelect = (type: string) => {
+      console.log(type, '2121')
       forms.checkboxRefs[type].toggle()
 
       const list: any = []
@@ -214,7 +215,9 @@ export default defineComponent({
                           name={item.id}
                           ref={(el: any) => (forms.checkboxRefs[item.id] = el)}
                           onClick={(e: any) => {
+                            e.preventDefault()
                             e.stopPropagation()
+                            onSelect(item.id)
                           }}
                         ></Checkbox>
                       )

+ 2 - 0
src/school/mass-message/component/manage-list/index.tsx

@@ -183,7 +183,9 @@ export default defineComponent({
                           name={item.id}
                           ref={(el: any) => (forms.checkboxRefs[item.id] = el)}
                           onClick={(e: any) => {
+                            e.preventDefault()
                             e.stopPropagation()
+                            onSelect(item.id)
                           }}
                         ></Checkbox>
                       )

+ 2 - 0
src/school/mass-message/component/student-list/index.tsx

@@ -179,7 +179,9 @@ export default defineComponent({
                           name={item.id}
                           ref={(el: any) => (forms.checkboxRefs[item.id] = el)}
                           onClick={(e: any) => {
+                            e.preventDefault()
                             e.stopPropagation()
+                            onSelect(item.id)
                           }}
                         ></Checkbox>
                       )

+ 2 - 0
src/school/mass-message/component/teacher-list/teacher-list.tsx

@@ -184,7 +184,9 @@ export default defineComponent({
                           name={item.id}
                           ref={(el: any) => (forms.checkboxRefs[item.id] = el)}
                           onClick={(e: any) => {
+                            e.preventDefault()
                             e.stopPropagation()
+                            onSelect(item.id)
                           }}
                         ></Checkbox>
                       )

+ 3 - 2
src/school/mass-message/create-message.tsx

@@ -21,11 +21,12 @@ import {
   TimePicker,
   Uploader
 } from 'vant'
-import { computed, defineComponent, getCurrentInstance, onMounted, reactive, watch } from 'vue'
+import { computed, defineComponent, onMounted, reactive } from 'vue'
 import styles from './index.module.less'
 import SelectSned from './select-sned'
 import iconStudent from '@common/images/icon_student.png'
 import iconTeacher from '@common/images/icon_teacher.png'
+import iconJiaoFu from '@common/images/icon_jiaofu.png'
 import ODialog from '@/components/o-dialog'
 import OSticky from '@/components/o-sticky'
 import { useRoute, useRouter } from 'vue-router'
@@ -379,7 +380,7 @@ export default defineComponent({
           {forms.receives.map((item: any) => {
             let img: any = iconStudent
             if (item.receiveType === 'CLASS') {
-              img = ''
+              img = iconJiaoFu
             } else if (item.receiveType === 'STUDENT') {
               img = iconStudent
             } else if (item.receiveType === 'TEACHER' || item.receiveType === 'SCHOOL') {

+ 8 - 0
src/school/mass-message/index.module.less

@@ -19,6 +19,14 @@
       }
     }
   }
+  .messageSend {
+    color: #aaaaaa;
+    :global {
+      .van-cell__value {
+        color: #aaaaaa;
+      }
+    }
+  }
 
   .send {
     color: #aaa;

+ 8 - 4
src/school/mass-message/index.tsx

@@ -132,13 +132,17 @@ export default defineComponent({
           >
             {state.list.map((item: any) => (
               <CellGroup inset onClick={() => onDetail(item)} style={{ marginBottom: '12px' }}>
-                <Cell class={styles.waitSend} titleStyle={{ flex: '1 auto' }}>
+                <Cell
+                  class={[styles.waitSend, item.sendStatus === 'SEND' && styles.messageSend]}
+                  titleStyle={{ flex: '1 auto' }}
+                >
                   {{
                     title: () => (
                       <div class={styles.time}>
-                        <Icon name="clock-o" class={styles.clockO} />
-                        {/* {item.sendStatus === 'WAIT' ? item.createTime : ''} */}
-                        {/* {item.sendStatus === 'SEND' ? item.sendTime : ''} */}
+                        {item.sendStatus === 'WAIT' && (
+                          <Icon name="clock-o" class={styles.clockO} />
+                        )}
+
                         {item.sendTime}
                       </div>
                     ),

+ 23 - 12
src/school/orchestra/compontent/information.tsx

@@ -53,7 +53,7 @@ export default defineComponent({
         page: 1,
         rows: 20
       },
-
+      statistics: {} as any,
       orchestraInfo: {} as any // 乐团详情
     })
 
@@ -107,6 +107,15 @@ export default defineComponent({
 
     const getDetails = async () => {
       try {
+        const { data } = await request.get('/api-school/orchestra/detail/' + route.query.id)
+        state.orchestraInfo = data || {}
+      } catch {
+        //
+      }
+    }
+
+    const getStatistics = async () => {
+      try {
         const { data } = await request.post('/api-school/classGroup/statistics', {
           data: {
             orchestraId: route.query.id,
@@ -114,7 +123,7 @@ export default defineComponent({
             endTime: state.params.endTime
           }
         })
-        state.orchestraInfo = data || {}
+        state.statistics = data || {}
 
         initNumCountUp()
       } catch {
@@ -164,16 +173,17 @@ export default defineComponent({
     const initNumCountUp = () => {
       nextTick(() => {
         // 在读学生
-        const orchestraInfo = state.orchestraInfo
-        new CountUp('currentStudentNum', orchestraInfo.studentNum || 0).start()
-        new CountUp('time1', orchestraInfo.attendanceRate || 0).start()
-        new CountUp('time2', orchestraInfo.homeworkRate || 0).start()
-        new CountUp('time3', orchestraInfo.homeworkQualifiedRate || 0).start()
+        const statistics = state.statistics
+        new CountUp('currentStudentNum', statistics.studentNum || 0).start()
+        new CountUp('time1', statistics.attendanceRate || 0).start()
+        new CountUp('time2', statistics.homeworkRate || 0).start()
+        new CountUp('time3', statistics.homeworkQualifiedRate || 0).start()
       })
     }
 
     onMounted(() => {
       getDetails()
+      getStatistics()
       getList()
     })
 
@@ -205,26 +215,26 @@ export default defineComponent({
         <Grid border={false} class={styles.gridContainer}>
           <GridItem>
             <p class={[styles.title, styles.red]}>
-              <span id="currentStudentNum">{state.orchestraInfo.studentNum || 0}</span>
+              <span id="currentStudentNum">{state.statistics.studentNum || 0}</span>
               <i>名</i>
             </p>
             <p class={styles.name}>在读学生</p>
           </GridItem>
           <GridItem>
             <p class={[styles.title, styles.red]}>
-              <span id="time1">{state.orchestraInfo.attendanceRate || 0}</span>%
+              <span id="time1">{state.statistics.attendanceRate || 0}</span>%
             </p>
             <p class={styles.name}>到课率</p>
           </GridItem>
           <GridItem>
             <p class={[styles.title, styles.red]}>
-              <span id="time2">{state.orchestraInfo.homeworkRate || 0}</span>%
+              <span id="time2">{state.statistics.homeworkRate || 0}</span>%
             </p>
             <p class={styles.name}>作业提交率</p>
           </GridItem>
           <GridItem>
             <p class={[styles.title, styles.red]}>
-              <span id="time3">{state.orchestraInfo.homeworkQualifiedRate || 0}</span>%
+              <span id="time3">{state.statistics.homeworkQualifiedRate || 0}</span>%
             </p>
             <p class={styles.name}>练习合格率</p>
           </GridItem>
@@ -271,7 +281,8 @@ export default defineComponent({
         )}
 
         {/*  */}
-        {state.orchestraInfo.type === 'DELIVERY' &&
+        {(state.orchestraInfo.deliveryType === 'SINGLE_DELIVERY' ||
+          state.orchestraInfo.deliveryType === 'MULTIPLE_DELIVERY') &&
           ['REGISTER', 'DOING', 'DONE'].includes(state.orchestraInfo.status) && (
             <OSticky position="bottom">
               <div class={'btnGroup'}>

+ 26 - 0
src/student/music-group/layout/index.module.less

@@ -73,4 +73,30 @@
       color: #000 !important;
     }
   }
+
+  .popupContainer {
+    .dialogTitle {
+      i {
+        display: inline-block;
+        width: 4px;
+        height: 14px;
+        background: #ff8057;
+        border-radius: 2px;
+        margin-right: 6px;
+      }
+
+      text-align: left;
+      font-size: 18px;
+      font-weight: 500;
+      color: #333333;
+      line-height: 25px;
+      padding: 20px 0 20px 25px;
+    }
+
+    .popupTips {
+      text-align: center;
+      padding: 15px 0 45px;
+      font-size: 16px;
+    }
+  }
 }

+ 36 - 4
src/student/music-group/layout/login.tsx

@@ -1,11 +1,12 @@
 import { defineComponent } from 'vue'
-import { CellGroup, Field, Button, CountDown, Row, Col, showToast } from 'vant'
+import { CellGroup, Field, Button, CountDown, Row, Col, showToast, Popup } from 'vant'
 import ImgCode from '@/components/o-img-code'
 import { checkPhone } from '@/helpers/validate'
 import { setLogin, state } from '@/state'
 import { removeAuth, setAuth } from './utils'
 import styles from './index.module.less'
 import request from '@/helpers/request'
+import { browser } from '@/helpers/utils'
 
 type loginType = 'PWD' | 'SMS'
 export default defineComponent({
@@ -19,7 +20,8 @@ export default defineComponent({
       countDownStatus: true, // 是否发送验证码
       countDownTime: 1000 * 120, // 倒计时时间
       // countDownRef: null as any, // 倒计时实例
-      imgCodeStatus: false
+      imgCodeStatus: false,
+      showPopup: false
     }
   },
   computed: {
@@ -32,8 +34,23 @@ export default defineComponent({
   mounted() {
     removeAuth()
     this.directNext()
+
+    // 判断是否是微信,只能微信中打开
+    // if (!browser().weixin) {
+    //   this.showPopup = true
+    // } else {
+    //   this.getAppId()
+    // }
   },
   methods: {
+    async getAppId() {
+      try {
+        const { data } = await request.get('/api-student/open/paramConfig/wechatAppId')
+        console.log(data)
+      } catch {
+        //
+      }
+    },
     directNext() {
       if (state.user.status === 'login' || state.user.status === 'error') {
         const { returnUrl, isRegister, ...rest } = this.$route.query
@@ -136,8 +153,7 @@ export default defineComponent({
                 placeholder="请输入验证码"
                 type="tel"
                 maxlength={6}
-                // @ts-ignore
-                vSlots={{
+                v-slots={{
                   button: () =>
                     this.countDownStatus ? (
                       <span class={styles.codeText} onClick={this.onSendCode}>
@@ -173,6 +189,22 @@ export default defineComponent({
             onSendCode={this.onCodeSend}
           />
         ) : null}
+
+        <Popup
+          v-model:show={this.showPopup}
+          round
+          style={{ width: '92%' }}
+          closeOnClickOverlay={false}
+        >
+          <div class={styles.popupContainer}>
+            <div class={styles.dialogTitle}>
+              <i></i>
+              提示
+            </div>
+
+            <p class={styles.popupTips}>请使用微信打开</p>
+          </div>
+        </Popup>
       </div>
     )
   }