Browse Source

乐团事迹功能

lex 2 years ago
parent
commit
fd65094be0

+ 13 - 2
src/components/o-upload-all/index.module.less

@@ -1,6 +1,7 @@
 .uploader-section {
   display: flex;
   align-items: center;
+  flex-wrap: wrap;
   box-sizing: border-box;
   position: relative;
   .img-close {
@@ -19,19 +20,29 @@
     align-items: center;
     border-radius: 50%;
   }
+  .singleImgClose {
+    right: 5px;
+  }
 
   .uploader {
     position: relative;
     &.default {
       :global {
         .van-uploader__upload {
-          width: 102px;
+          width: 98px;
           height: 94px;
           background-color: #fff;
         }
       }
       .previewImg {
-        width: 102px;
+        width: 98px;
+        height: 94px;
+        border-radius: 10px;
+        overflow: hidden;
+      }
+
+      .uploadImg {
+        width: 98px;
         height: 94px;
         border-radius: 10px;
         overflow: hidden;

+ 98 - 18
src/components/o-upload-all/index.tsx

@@ -1,5 +1,5 @@
 import { closeToast, Icon, Image, showLoadingToast, showToast, Uploader } from 'vant'
-import { defineComponent, ref } from 'vue'
+import { defineComponent, PropType, ref } from 'vue'
 import styles from './index.module.less'
 import { useCustomFieldValue } from '@vant/use'
 import { postMessage } from '@/helpers/native-message'
@@ -34,6 +34,10 @@ export default defineComponent({
       type: Number,
       default: 5
     },
+    uploadType: {
+      type: String as PropType<'IMAGE' | 'VIDEO'>,
+      default: 'IMAGE'
+    },
     accept: {
       type: String,
       default: 'image/*'
@@ -53,10 +57,17 @@ export default defineComponent({
     size: {
       type: String,
       default: 'default'
+    },
+    disabled: {
+      type: Boolean,
+      default: false
     }
   },
   methods: {
     nativeUpload() {
+      if (this.disabled) {
+        return
+      }
       postMessage(
         {
           api: 'chooseFile',
@@ -90,9 +101,15 @@ export default defineComponent({
         closeToast()
       }
     },
-    onClose(e: any) {
-      this.$emit('update:modelValue', null)
-      this.onUploadChange()
+    onClose(e: any, item: any) {
+      const models = this.modelValue
+      const index = models.findIndex((model) => model == item)
+      if (index > -1) {
+        models.splice(index, 1)
+        this.$emit('update:modelValue', models)
+        this.onUploadChange()
+      }
+
       e.stopPropagation()
     },
     async getFile(file: any) {
@@ -171,14 +188,28 @@ export default defineComponent({
     return (
       <div class={styles['uploader-section']}>
         {this.modelValue.length > 0 &&
+          this.maxCount > 1 &&
           this.modelValue.map((item: any) => (
             <div class={[styles.uploader, styles[this.size]]}>
               {/* 删除按钮 */}
-              {this.deletable && (
-                <Icon name="cross" onClick={this.onClose} class={styles['img-close']} />
+              {this.deletable && !this.disabled && (
+                <Icon
+                  name="cross"
+                  onClick={(e: any) => this.onClose(e, item)}
+                  class={styles['img-close']}
+                />
               )}
               <div class={['van-uploader__upload']}>
-                <Image src={item} class={styles.previewImg} fit="cover" />
+                {this.uploadType === 'IMAGE' ? (
+                  <Image src={item} class={styles.previewImg} fit="cover" />
+                ) : (
+                  <video
+                    ref="videoUpload"
+                    style={{ backgroundColor: '#F8F8F8' }}
+                    class={styles.previewImg}
+                    src={item + '#t=1,4'}
+                  />
+                )}
               </div>
             </div>
           ))}
@@ -186,19 +217,39 @@ export default defineComponent({
         {this.native ? (
           this.maxCount > 1 ? (
             <div class={[styles.uploader, styles[this.size]]} onClick={this.nativeUpload}>
-              {this.modelValue ? (
-                <Image
-                  fit="cover"
-                  position="center"
-                  class={styles.uploadImg}
-                  src={this.modelValue as any}
-                />
+              {this.modelValue.length > 0 ? (
+                <div class={['van-uploader__upload']}>
+                  {this.modelValue.map((item: any) => (
+                    <>
+                      {/* 删除按钮 */}
+                      {this.deletable && !this.disabled && (
+                        <Icon
+                          name="cross"
+                          onClick={(e: any) => this.onClose(e, item)}
+                          class={[styles['img-close'], styles.singleImgClose]}
+                        />
+                      )}
+                      {this.uploadType === 'IMAGE' ? (
+                        <Image fit="cover" position="center" class={styles.uploadImg} src={item} />
+                      ) : (
+                        <video
+                          ref="videoUpload"
+                          class={styles.uploadImg}
+                          style={{ backgroundColor: '#F8F8F8' }}
+                          src={item + '#t=1,4'}
+                        />
+                      )}
+                    </>
+                  ))}
+                </div>
               ) : (
-                <Icon name={this.uploadIcon} size="32" />
+                <Icon name={this.uploadIcon} class={['van-uploader__upload']} size="32" />
               )}
             </div>
           ) : (
-            ''
+            <div class={[styles.uploader, styles[this.size]]} onClick={this.nativeUpload}>
+              <Icon name={this.uploadIcon} class={['van-uploader__upload']} size="32" />
+            </div>
           )
         ) : this.maxCount > 1 ? (
           <Uploader
@@ -207,7 +258,7 @@ export default defineComponent({
             beforeRead={this.beforeRead}
             beforeDelete={this.beforeDelete}
             uploadIcon={this.uploadIcon}
-            disabled={this.modelValue.length === this.maxCount}
+            disabled={this.modelValue.length === this.maxCount || this.disabled}
             accept={this.accept}
           />
         ) : (
@@ -218,8 +269,37 @@ export default defineComponent({
             beforeDelete={this.beforeDelete}
             uploadIcon={this.uploadIcon}
             accept={this.accept}
+            disabled={this.disabled}
           >
-            <Icon name={this.uploadIcon} class={['van-uploader__upload']} size="32" />
+            {this.modelValue.length > 0 ? (
+              <div class={['van-uploader__upload']}>
+                {this.modelValue.map((item: any) => (
+                  <>
+                    {/* 删除按钮 */}
+                    {this.deletable && !this.disabled && (
+                      <Icon
+                        name="cross"
+                        onClick={(e: any) => this.onClose(e, item)}
+                        class={[styles['img-close'], styles.singleImgClose]}
+                      />
+                    )}
+
+                    {this.uploadType === 'IMAGE' ? (
+                      <Image fit="cover" position="center" class={styles.uploadImg} src={item} />
+                    ) : (
+                      <video
+                        ref="videoUpload"
+                        class={styles.uploadImg}
+                        style={{ backgroundColor: '#F8F8F8' }}
+                        src={item + '#t=1,4'}
+                      />
+                    )}
+                  </>
+                ))}
+              </div>
+            ) : (
+              <Icon name={this.uploadIcon} class={['van-uploader__upload']} size="32" />
+            )}
           </Uploader>
         )}
       </div>

+ 88 - 0
src/components/o-video/index.module.less

@@ -0,0 +1,88 @@
+.video-container {
+  position: relative;
+  width: 100%;
+  --plyr-color-main: #01c1b5;
+
+  video {
+    width: 100%;
+    // object-fit: cover;
+  }
+
+  :global {
+    .video-back {
+      position: absolute;
+      left: 20px;
+      top: 20px;
+      color: #fff;
+      z-index: 99;
+      font-size: 24px;
+      width: 30px;
+      height: 30px;
+      background-color: rgba(0, 0, 0, 0.5);
+      border-radius: 50%;
+      padding: 4px 5px 4px 3px;
+    }
+
+    .plyr__poster {
+      background-size: cover;
+    }
+
+    .plyr__control--overlaid {
+      border: 1px solid #fff;
+      background-color: rgba(0, 0, 0, 0.2) !important;
+    }
+    .plyr--video .plyr__control:hover {
+      background-color: transparent !important;
+    }
+  }
+
+  .video {
+    position: relative;
+  }
+}
+
+.loadingVideo {
+  position: absolute;
+  top: 0;
+  left: 0;
+  bottom: 0;
+  right: 0;
+  background: rgba(0, 0, 0, 0.9);
+  z-index: 10;
+}
+
+.playOver {
+  background: rgba(0, 0, 0, 0.5);
+  color: #fff;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+
+  .tips {
+    font-size: 15px;
+    color: #ffffff;
+  }
+
+  .btn {
+    margin: 10px 0;
+    min-width: 94px;
+    font-size: 14px;
+    height: 28px;
+    line-height: 28px;
+  }
+
+  .replay {
+    padding-top: 12px;
+  }
+}
+
+.freeTxt {
+  font-size: 15px;
+  color: #ffffff;
+  line-height: 21px;
+  padding-top: 10px;
+}
+.freeRate {
+  color: #32ffd8;
+}

+ 193 - 0
src/components/o-video/index.tsx

@@ -0,0 +1,193 @@
+import { defineComponent, PropType } from 'vue'
+import styles from './index.module.less'
+import Plyr from 'plyr'
+import 'plyr/dist/plyr.css'
+import { Button, Icon, Loading, Toast } from 'vant'
+
+import iconVideoPlay from '@/common/images/icon_video_play.png'
+import { browser } from '@/helpers/utils'
+export default defineComponent({
+  name: 'o-video',
+  props: {
+    setting: {
+      type: Object,
+      default: () => {}
+    },
+    controls: Boolean,
+    height: String,
+    src: {
+      type: String,
+      default: ''
+    },
+    poster: {
+      type: String,
+      default: ''
+    },
+    styleValue: {
+      type: Object,
+      default: () => ({})
+    },
+    preload: {
+      type: String as PropType<'auto' | 'metadata' | 'none'>,
+      default: 'auto'
+    },
+    currentTime: {
+      type: Boolean,
+      default: true
+    },
+    playsinline: {
+      type: Boolean,
+      default: true
+    },
+    onPlay: {
+      type: Function,
+      default: () => {}
+    }
+  },
+  data() {
+    return {
+      player: null as any,
+      loading: true // 首次进入加载中
+    }
+  },
+  mounted() {
+    this._init()
+  },
+  methods: {
+    _init() {
+      // controls: [
+      //   'play-large' ,  // 中间的大播放按钮
+      //   'restart' ,  // 重新开始播放
+      //   'rewind' ,  // 按寻道时间倒带(默认 10 秒)
+      //   'play' ,  // 播放/暂停播放
+      //   'fast-forward' ,  // 快进查找时间(默认 10 秒)
+      //   'progress' ,  // 播放和缓冲的进度条和滑动条
+      //   'current-time' ,  // 播放的当前时间
+      //   ' duration' ,  // 媒体的完整持续时间
+      //   'mute' ,  // 切换静音
+      //   'volume', // 音量控制
+      //   'captions' ,  // 切换字幕
+      //   'settings' ,  // 设置菜单
+      //   'pip' ,  // 画中画(当前仅 Safari)
+      //   'airplay' ,  // Airplay(当前仅 Safari)
+      //   'download ' ,  // 显示一个下载按钮,其中包含指向当前源或您在选项中指定的自定义 URL 的链接
+      //   'fullscreen' ,  // 切换全屏
+      // ] ;
+      const controls = ['play-large', 'play', 'progress', 'captions', 'fullscreen']
+      if (this.currentTime) {
+        controls.push('current-time')
+      }
+      const params: any = {
+        controls: controls,
+        ...this.setting,
+        invertTime: false
+      }
+
+      if (browser().iPhone) {
+        params.fullscreen = {
+          enabled: true,
+          fallback: 'force',
+          iosNative: true
+        }
+      }
+
+      this.player = new Plyr((this as any).$refs.video, params)
+
+      // fullscreen: {
+      //     enabled: true,
+      //     fallback: 'force',
+      //     iosNative: true
+      //   }
+      this.player.elements.container
+        ? (this.player.elements.container.style.height = this.height || '210px')
+        : null
+
+      if (this.preload === 'none') {
+        this.loading = false
+      }
+      this.player.on('loadedmetadata', () => {
+        this.loading = false
+        this.domPlayVisibility(false)
+      })
+
+      this.player.on('play', () => {
+        this.onPlay && this.onPlay()
+      })
+
+      this.player.on('enterfullscreen', () => {
+        console.log('fullscreen')
+        const i = document.createElement('i')
+        i.id = 'fullscreen-back'
+        i.className = 'van-icon van-icon-arrow-left video-back'
+        i.addEventListener('click', () => {
+          this.player.fullscreen.exit()
+        })
+        console.log(document.getElementsByClassName('plyr'))
+        document.getElementsByClassName('plyr')[0].appendChild(i)
+      })
+
+      this.player.on('exitfullscreen', () => {
+        console.log('exitfullscreen')
+        const i = document.getElementById('fullscreen-back')
+        i && i.remove()
+      })
+    },
+    // 操作功能
+    domPlayVisibility(hide = true) {
+      const controls = document.querySelector('.plyr__controls')
+      const controls2 = document.querySelector('.plyr__control--overlaid')
+      if (hide) {
+        controls?.setAttribute('style', 'display:none')
+        controls2?.setAttribute('style', 'display:none')
+      } else {
+        controls?.removeAttribute('style')
+        setTimeout(() => {
+          controls2?.removeAttribute('style')
+        }, 200)
+      }
+    },
+
+    onReplay() {
+      this.player.restart()
+      this.player.play()
+      this.domPlayVisibility(false)
+    }
+  },
+  unmounted() {
+    this.player?.destroy()
+  },
+  render() {
+    return (
+      <div class={styles['video-container']}>
+        <video
+          ref="video"
+          class={styles['video']}
+          src={this.src}
+          playsinline={this.playsinline}
+          poster={this.poster}
+          preload={this.preload}
+          style={{ ...this.styleValue }}
+        ></video>
+        {/* </div> */}
+        {/* 加载视频使用 */}
+        {this.loading && (
+          <div
+            class={styles.loadingVideo}
+            style={{
+              height: this.height || '210px'
+            }}
+          >
+            <Loading
+              size={36}
+              color="#FF8057"
+              vertical
+              style={{ height: '100%', justifyContent: 'center' }}
+            >
+              加载中...
+            </Loading>
+          </div>
+        )}
+      </div>
+    )
+  }
+})

+ 4 - 0
src/school/orchestra-story/index.module.less

@@ -33,6 +33,10 @@
     font-weight: bold;
     color: #333333;
 
+    .stepTime {
+      font-family: 'DINA';
+    }
+
     .stepEdit {
       font-size: 14px;
       font-weight: 400;

+ 63 - 46
src/school/orchestra-story/index.tsx

@@ -22,6 +22,8 @@ import request from '@/helpers/request'
 import { state as baseState } from '@/state'
 import OFullRefresh from '@/components/o-full-refresh'
 import OEmpty from '@/components/o-empty'
+import dayjs from 'dayjs'
+import OVideo from '@/components/o-video'
 
 export default defineComponent({
   name: 'orchestra-story',
@@ -117,6 +119,15 @@ export default defineComponent({
       getList()
     }
 
+    const onEdit = async (item: any) => {
+      router.push({
+        path: '/story-operation',
+        query: {
+          id: item.id
+        }
+      })
+    }
+
     onMounted(async () => {
       getOrchestras()
     })
@@ -149,55 +160,61 @@ export default defineComponent({
         )}
 
         {state.listState.dataShow ? (
-          <OFullRefresh
-            v-model:modelValue={state.listState.refreshing}
-            onRefresh={onRefresh}
-            style={{
-              minHeight: `calc(100vh - ${state.listState.height}px)`
-            }}
+          // <OFullRefresh
+          //   v-model:modelValue={state.listState.refreshing}
+          //   onRefresh={onRefresh}
+          //   style={{
+          //     minHeight: `calc(100vh - ${state.listState.height}px)`
+          //   }}
+          // >
+          <List
+            v-model:loading={state.listState.loading}
+            finished={state.listState.finished}
+            finishedText=" "
+            class={[styles.liveList]}
+            onLoad={getList}
+            immediateCheck={false}
           >
-            <List
-              v-model:loading={state.listState.loading}
-              finished={state.listState.finished}
-              finishedText=" "
-              class={[styles.liveList]}
-              onLoad={getList}
-              immediateCheck={false}
-            >
-              <Steps direction="vertical" class={styles.storySteps}>
-                {state.list.map((item: any) => (
-                  <Step
-                    v-slots={{
-                      'inactive-icon': () => <Image src={iconStep} class={styles.iconInactive} />,
-                      'active-icon': () => (
-                        <Image src={iconStepCalendar} class={styles.iconActive} />
-                      )
-                    }}
-                  >
-                    <div class={styles.stepTimes}>
-                      <div class={styles.stepTime}>11:07:06</div>
-                      <span class={styles.stepEdit}>
-                        <Icon name={iconEdit} />
-                        编辑
-                      </span>
+            <Steps direction="vertical" class={styles.storySteps}>
+              {state.list.map((item: any) => (
+                <Step
+                  v-slots={{
+                    'inactive-icon': () => <Image src={iconStep} class={styles.iconInactive} />,
+                    'active-icon': () => <Image src={iconStepCalendar} class={styles.iconActive} />
+                  }}
+                >
+                  <div class={styles.stepTimes}>
+                    <div class={styles.stepTime}>
+                      {dayjs(item.createTime).format('YYYY年MM月DD日')}
                     </div>
-                    <p class={styles.content}>乐团正式交付</p>
+                    <span class={styles.stepEdit} onClick={() => onEdit(item)}>
+                      <Icon name={iconEdit} />
+                      编辑
+                    </span>
+                  </div>
+                  <p class={[styles.content, 'van-multi-ellipsis--l2']}>{item.content}</p>
 
-                    <Swipe class={styles.storySwipe}>
-                      <SwipeItem>
-                        <Image
-                          src={
-                            'https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/756ce648617644ef90bf4556417c5fa7_mergeImage.png'
-                          }
-                          class={styles.swipeImg}
-                        />
-                      </SwipeItem>
-                    </Swipe>
-                  </Step>
-                ))}
-              </Steps>
-            </List>
-          </OFullRefresh>
+                  <Swipe class={styles.storySwipe}>
+                    {item.attachments &&
+                      item.attachments.map((child: any) => (
+                        <SwipeItem>
+                          {item.type === 'IMAGE' && (
+                            <Image src={child.url} class={styles.swipeImg} fit="cover" />
+                          )}
+                          {item.type === 'VIDEO' && (
+                            <OVideo
+                              src={child.url}
+                              poster={child.coverImage}
+                              class={styles.swipeImg}
+                            />
+                          )}
+                        </SwipeItem>
+                      ))}
+                  </Swipe>
+                </Step>
+              ))}
+            </Steps>
+          </List>
         ) : (
           <OEmpty btnStatus={false} tips="暂无事迹" />
         )}

+ 194 - 18
src/school/orchestra-story/story-operation/index.tsx

@@ -5,32 +5,32 @@ import {
   Button,
   Cell,
   CellGroup,
-  closeToast,
   DatePicker,
   Field,
   Picker,
   Popup,
   Radio,
   RadioGroup,
-  showLoadingToast,
-  showToast,
-  Tag,
-  Uploader
+  showSuccessToast,
+  showToast
 } from 'vant'
-import { getOssUploadUrl } from '@/state'
-import umiRequest from 'umi-request'
 import { defineComponent, onMounted, reactive } from 'vue'
 import styles from './index.module.less'
 import iconUpload from '../images/icon-upload.png'
 import iconUploadVideo from '../images/icon-upload-video.png'
 import iconUploadVideoCover from '../images/icon-upload-video-cover.png'
 import OUploadAll from '@/components/o-upload-all'
+import OHeader from '@/components/o-header'
+import ODialog from '@/components/o-dialog'
+import { useRoute, useRouter } from 'vue-router'
 
 export default defineComponent({
   name: 'story-operation',
   setup() {
+    const router = useRouter()
+    const route = useRoute()
     const forms = reactive({
-      bucket: 'daya',
+      id: route.query.id || null,
       content: '',
       orchestraStatus: false,
       orchestraList: [] as any,
@@ -40,9 +40,9 @@ export default defineComponent({
       currentDate: [dayjs().format('YYYY'), dayjs().format('MM'), dayjs().format('DD')],
       storyType: 'IMAGE',
       attachments: [] as any, //群发消息附件
-
       video: [] as any,
-      videoCover: [] as any
+      videoCover: [] as any,
+      delStatus: false
     })
 
     // 获取乐团列表
@@ -73,11 +73,176 @@ export default defineComponent({
       }
     }
 
-    onMounted(() => {
-      getOrchestras()
+    const getDetails = async () => {
+      try {
+        if (!forms.id) {
+          return
+        }
+        const { data } = await request.get('/api-school/orchestraStory/detail/' + forms.id)
+        console.log(data)
+        forms.content = data.content
+        forms.createTime = data.createTime
+        forms.storyType = data.type
+
+        forms.orchestraList.forEach((item: any) => {
+          if (item.value === item.orchestraId) {
+            forms.selectOrchestra = item
+          }
+        })
+
+        if (data.type === 'IMAGE') {
+          data.attachments &&
+            data.attachments.forEach((item: any) => {
+              forms.attachments.push(item.url)
+            })
+        } else {
+          const temp = data.attachments ? data.attachments[0] : []
+          forms.video.push(temp.url)
+          forms.videoCover.push(temp.coverImage)
+        }
+      } catch {
+        //
+      }
+    }
+
+    const onSumbit = async () => {
+      try {
+        if (!forms.selectOrchestra.value) {
+          showToast('请选择乐团')
+          return
+        }
+        if (!forms.createTime) {
+          showToast('请选择事迹日期')
+          return
+        }
+        if (!forms.content) {
+          showToast('请输入事迹内容')
+          return
+        }
+
+        if (forms.storyType === 'IMAGE' && forms.attachments.length <= 0) {
+          showToast('请上传照片')
+          return
+        }
+        if (forms.storyType === 'VIDEO') {
+          if (forms.video.length <= 0) {
+            showToast('请上传视频')
+            return
+          }
+          if (forms.videoCover.length <= 0) {
+            showToast('请上传视频封面')
+            return
+          }
+        }
+
+        const attachments: any = []
+        if (forms.storyType === 'IMAGE') {
+          forms.attachments.forEach((item: any) => {
+            const temp = {
+              attachmentType: forms.storyType,
+              url: item
+            }
+
+            attachments.push(temp)
+          })
+        } else {
+          attachments.push({
+            attachmentType: forms.storyType,
+            url: forms.video[0],
+            coverImage: forms.videoCover[0]
+          })
+        }
+
+        console.log({
+          createTime: dayjs(forms.createTime).format('YYYY-MM-DD HH:mm:ss'),
+          orchestraId: forms.selectOrchestra.value,
+          content: forms.content,
+          type: forms.storyType,
+          attachments
+        })
+        const params = {
+          createTime: dayjs(forms.createTime).format('YYYY-MM-DD HH:mm:ss'),
+          orchestraId: forms.selectOrchestra.value,
+          content: forms.content,
+          type: forms.storyType,
+          attachments
+        }
+
+        if (forms.id) {
+          await request.post('/api-school/orchestraStory/update', {
+            data: {
+              ...params,
+              id: forms.id
+            }
+          })
+
+          setTimeout(() => {
+            showSuccessToast('修改成功')
+          }, 100)
+        } else {
+          await request.post('/api-school/orchestraStory/save', {
+            data: params
+          })
+
+          setTimeout(() => {
+            showSuccessToast('添加成功')
+          }, 100)
+        }
+
+        setTimeout(() => {
+          router.back()
+        }, 1100)
+      } catch {
+        //
+      }
+    }
+
+    //
+    const onConfirm = async () => {
+      try {
+        await request.post('/api-school/orchestraStory/remove', {
+          requestType: 'form',
+          data: {
+            id: forms.id
+          }
+        })
+
+        setTimeout(() => {
+          showSuccessToast('删除成功')
+        }, 100)
+        setTimeout(() => {
+          router.back()
+        }, 1100)
+      } catch {
+        //
+      }
+    }
+
+    onMounted(async () => {
+      if (forms.id) {
+        document.title = '修改事迹'
+      }
+      await getOrchestras()
+      await getDetails()
     })
     return () => (
       <div class={styles.storyOperation}>
+        <OHeader title={forms.id ? '修改事迹' : '添加事迹'}>
+          {{
+            right: () =>
+              forms.id && (
+                <span
+                  style={{ color: '#777777' }}
+                  onClick={() => {
+                    forms.delStatus = true
+                  }}
+                >
+                  删除
+                </span>
+              )
+          }}
+        </OHeader>
+
         <CellGroup inset class={styles.cellGroup}>
           <Field
             inputAlign="right"
@@ -92,9 +257,9 @@ export default defineComponent({
           />
           <Field
             inputAlign="right"
-            label="发送时间"
+            label="事迹日期"
             modelValue={forms.createTime ? dayjs(forms.createTime).format('YYYY-MM-DD') : ''}
-            placeholder="请选择发送时间"
+            placeholder="请选择事迹日期"
             onClick={() => {
               forms.createTimeStatus = true
             }}
@@ -109,7 +274,7 @@ export default defineComponent({
             {{
               title: () => (
                 <div class={styles.title}>
-                  <div class={styles.name}>退团原因</div>
+                  <div class={styles.name}>事迹内容</div>
                   <div class={styles.nums}>{forms.content.length || 0}/200</div>
                 </div>
               ),
@@ -153,7 +318,7 @@ export default defineComponent({
                   <OUploadAll
                     style={{ marginBottom: '12px' }}
                     v-model:modelValue={forms.attachments}
-                    // maxCount={9}
+                    maxCount={9}
                     uploadIcon={iconUpload}
                   />
                 )
@@ -167,13 +332,15 @@ export default defineComponent({
                   <>
                     <OUploadAll
                       style={{ marginBottom: '12px' }}
-                      v-model:modelValue={forms.videoCover}
+                      v-model:modelValue={forms.video}
                       accept="video/*"
+                      uploadType="VIDEO"
                       uploadIcon={iconUploadVideo}
                       deletable={false}
                     />
 
                     <OUploadAll
+                      deletable={false}
                       style={{ marginBottom: '12px' }}
                       v-model:modelValue={forms.videoCover}
                       uploadIcon={iconUploadVideoCover}
@@ -187,7 +354,7 @@ export default defineComponent({
 
         <OSticky position="bottom">
           <div class={'btnGroup'}>
-            <Button round block type="primary">
+            <Button round block type="primary" onClick={onSumbit}>
               保存
             </Button>
           </div>
@@ -215,6 +382,15 @@ export default defineComponent({
             }}
           />
         </Popup>
+
+        <ODialog
+          v-model:show={forms.delStatus}
+          title="删除事迹"
+          messageAlign="left"
+          message="删除后学生将无法再看到本条事迹确认要删除吗?"
+          showCancelButton
+          onConfirm={onConfirm}
+        ></ODialog>
       </div>
     )
   }

+ 1 - 1
src/school/orchestra/compontent/information.tsx

@@ -439,7 +439,7 @@ export default defineComponent({
                 <div style={{ textAlign: 'center' }}>
                   <span class={styles.codeBtnText}>扫描上方二维码完成资料填写</span>
                 </div>
-                <div class={styles.codeTips}>二维码将在两小时后失效,请及时登记</div>
+                {/* <div class={styles.codeTips}>二维码将在两小时后失效,请及时登记</div> */}
               </div>
             </div>
             <div class={styles.codeBottom}>

+ 3 - 3
src/student/music-group/pre-apply/component/payment.tsx

@@ -295,7 +295,7 @@ export default defineComponent({
           {/* 判断是否已经购买乐器 */}
           {!state.paymentOrderDetails.includes('INSTRUMENTS') && (
             <>
-              <div class={styles.applyTitle}>乐器</div>
+              {/* <div class={styles.applyTitle}>乐器</div> */}
               <CellGroup
                 inset
                 class={[styles.mlr13, styles.sectionCell]}
@@ -387,7 +387,7 @@ export default defineComponent({
           {/* 判断是否已经购买教材 */}
           {!state.paymentOrderDetails.includes('TEXTBOOK') && (
             <>
-              <div class={styles.applyTitle}>教材</div>
+              {/* <div class={styles.applyTitle}>教材</div> */}
               <CellGroup
                 inset
                 class={[styles.mlr13, styles.sectionCell]}
@@ -482,7 +482,7 @@ export default defineComponent({
 
           {!state.paymentOrderDetails.includes('VIP') && (
             <>
-              <div class={styles.applyTitle}>乐团学习系统</div>
+              {/* <div class={styles.applyTitle}>乐团学习系统</div> */}
               <CellGroup
                 inset
                 class={[styles.mlr13, styles.sectionCell]}

+ 1 - 0
src/student/music-group/pre-apply/index.module.less

@@ -153,6 +153,7 @@
 }
 
 .sectionCell {
+  margin-bottom: 12px;
   padding: 15px 12px;
   border-radius: 10px;
   overflow: hidden;