licailing 4 years ago
parent
commit
3137f32d33

+ 2 - 2
src/main/h5/src/plugins/http.js

@@ -4,8 +4,8 @@ import qs from "qs";
 let baseUrl = "http://localhost:8080";
 switch (process.env.NODE_ENV) {
   case "development":
-    // baseUrl = "https://wljtest.izouma.com";
-    baseUrl = 'http://localhost:8080';
+    baseUrl = "http://yskj.njlyw.cn:8081";
+    // baseUrl = 'http://localhost:8080';
     break;
   case "test":
     baseUrl = "http://localhost:8080";

+ 29 - 2
src/main/h5/src/views/Home.vue

@@ -19,6 +19,13 @@
     <div style="margin-top:20px" v-if="info.video">
       <video-upload v-model="info2" class="width"></video-upload>
     </div>
+    <div style="margin-top:20px" v-else-if="info.annex">
+      <img
+        style="width:100px;height:100px;margin-left:17px"
+        :src="info.annex"
+        alt=""
+      />
+    </div>
     <div class="base">
       <div class="base-info">
         <div class="base-info-item">
@@ -29,9 +36,29 @@
           <div class="text1">专业</div>
           <div class="text2">{{ info.specialty }}</div>
         </div>
+        <div class="base-info-item">
+          <div class="text1">节目状态</div>
+          <div class="text2" v-if="info.programmeStatus == 'SUBMIT'">
+            审核中
+          </div>
+          <div class="text2" v-else-if="info.programmeStatus == 'AUDIT_FAILED'">
+            考级机构审核未通过
+          </div>
+          <div
+            class="text2"
+            v-else-if="info.programmeStatus == 'REVIEW_FAILED'"
+          >
+            审核未通过
+          </div>
+          <div class="text2" v-else>未提交</div>
+        </div>
+      </div>
+      <div class="base-info">
+        <img class="left-icon icon" src="../assets/icon_lianjie.png" alt="" />
+        <img class="right-icon icon" src="../assets/icon_lianjie.png" alt="" />
         <div v-for="(time, index) in info.participants" :key="index">
           <div class="base-info-item">
-            <div class="text1">参演时间</div>
+            <div class="text1">出生日期</div>
             <div class="text2">
               {{ time.birthday }}
             </div>
@@ -89,7 +116,7 @@
           </div>
         </div>
       </div> -->
-      <div class="base-info">
+      <div class="base-info" v-if="info.score">
         <img class="left-icon icon" src="../assets/icon_lianjie.png" alt="" />
         <img class="right-icon icon" src="../assets/icon_lianjie.png" alt="" />
         <div class="score">

+ 3 - 11
src/main/java/com/izouma/wenlvju/dto/ProgrammeShowDTO.java

@@ -1,24 +1,14 @@
 package com.izouma.wenlvju.dto;
 
 import cn.hutool.core.bean.BeanUtil;
-import com.alibaba.excel.annotation.ExcelIgnore;
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.izouma.wenlvju.annotations.EnumFormat;
-import com.izouma.wenlvju.domain.performance.Participant;
 import com.izouma.wenlvju.domain.performance.Programme;
 import com.izouma.wenlvju.enums.CompetitionGroup;
-import com.izouma.wenlvju.utils.excel.EnumExcelConverter;
-import com.izouma.wenlvju.utils.excel.LocalDateConverter;
-import io.swagger.annotations.ApiModel;
+import com.izouma.wenlvju.enums.ProgrammeStatus;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.AllArgsConstructor;
-import lombok.Builder;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import java.time.LocalDate;
 import java.util.List;
 
 @Data
@@ -70,6 +60,8 @@ public class ProgrammeShowDTO {
 
     private String annex;
 
+    private ProgrammeStatus programmeStatus;
+
     private List<ParticipantDTO> participants;
 
     public ProgrammeShowDTO(Programme programme) {

+ 59 - 29
src/main/vue/src/views/performance/ProgrammeList.vue

@@ -236,9 +236,9 @@
                 :formatter="programmeStatusFormatter"
             ></el-table-column>
             <el-table-column label="操作" align="left" fixed="right" min-width="260">
-                <template slot-scope="{ row }">
+                <template slot-scope="{ row, $index }">
                     <el-button @click="showRow(row)" size="mini" plain>查看</el-button>
-                    <el-button
+                    <!-- <el-button
                         type="warning"
                         @click="playImg(row)"
                         v-if="
@@ -271,8 +271,8 @@
                         size="mini"
                         plain
                         >浏览图片</el-button
-                    >
-                    <el-button type="warning" @click="playVideo(row)" v-else size="mini" plain>浏览视频</el-button>
+                    > -->
+                    <el-button type="warning" @click="playVideo(row, $index)" size="mini" plain>查看作品</el-button>
                     <el-button
                         @click="audit(row, 'AUDIT_FAILED')"
                         type="danger"
@@ -290,7 +290,6 @@
                         >撤回</el-button
                     >
                     <!-- <el-button @click="showCode(row)" type="primary" size="mini" plain>查看二维码</el-button> -->
-                    <!-- <el-button @click="deleteRow(row)" type="danger" size="mini" plain>删除</el-button> -->
                 </template>
             </el-table-column>
         </el-table>
@@ -322,23 +321,47 @@
             </div>
         </el-dialog>
 
+        <!-- <el-dialog class="videoDialog" destroy-on-close center append-to-body :visible.sync="showViedo" width="70%">
+            <video
+                :src="programme.video"
+                controls
+                style="height: 600px; width: 85%; margin: 0 auto"
+                v-if="programme.video"
+            >
+                您的浏览器不支持 video 标签。
+            </video>
+            <div style="width: 85%; height:600px;margin: 0 auto" v-if="programme.annex">
+                <img style="max-height:100%; max-width: 100%; " :src="programme.annex" alt="" />
+            </div>
+            <div style="margin: 10px 10px">
+                <el-button size="mini" @click="move(-1)" :disabled="index == 0">上一个</el-button>
+                <el-button size="mini" @click="move(1)" :disabled="(page - 1) * pageSize + index == totalElements - 1"
+                    >下一个</el-button
+                >
+                <el-button @click="showViedo = false" size="mini">关闭</el-button>
+            </div>
+        </el-dialog> -->
         <el-dialog class="videoDialog" destroy-on-close center append-to-body :visible.sync="showViedo" width="70%">
             <video
-                :src="videoUrl"
-                controlsList="nodownload noremote footbar"
+                :src="programme.video"
                 controls
-                style="height: 600px; width: 100%"
-                oncontextmenu="return false;"
-                ref="video"
-                v-if="showViedo"
+                style="max-height: 600px; max-width: 100%; margin: 0 auto"
+                v-if="programme.video"
             >
                 您的浏览器不支持 video 标签。
             </video>
+            <!-- <div style="width: 85%; height:600px;margin: 0 auto" v-if="programme.annex"> -->
+            <img style="max-height:600px; max-width: 100%; " :src="programme.annex" alt="" v-if="programme.annex" />
+            <!-- </div> -->
+            <div style="margin: 10px">
+                <el-button size="mini" @click="move(-1)" :disabled="index == 0">上一个</el-button>
+                <el-button size="mini" @click="move(1)" :disabled="(page - 1) * pageSize + index == totalElements - 1"
+                    >下一个</el-button
+                >
+                <el-button @click="showViedo = false" size="mini">关闭</el-button>
+            </div>
         </el-dialog>
         <programme-log :dialogVisible="isShow" @close="isShow = false" ref="public"></programme-log>
-        <el-dialog class="videoDialog" destroy-on-close center append-to-body :visible.sync="showImg" width="35%">
-            <img style="height: 100%; width: 100%;" :src="annex" alt="" />
-        </el-dialog>
     </div>
 </template>
 <script>
@@ -392,7 +415,9 @@ export default {
                 { label: '初选未通过', value: 'AUDIT_FAILED' },
                 { label: '审核未通过', value: 'REVIEW_FAILED' }
             ],
-            showMore: false
+            showMore: false,
+            programme: {},
+            index: 0
         };
     },
     created() {
@@ -661,14 +686,9 @@ export default {
         showCode(row) {
             this.dialogCode = true;
             this.dialogUrl =
-                'http://wljtest.izouma.com/h5/home?performanceId=' + row.performanceId + '&programmeId=' + row.id;
+                'http://yskj.njlyw.cn:8081/h5/home?performanceId=' + row.performanceId + '&programmeId=' + row.id;
         },
         clearSearch() {
-            // this.competitionGroup = '';
-            // this.levelSettingId = '';
-            // this.gradingOrganizationId = '';
-            // this.organizationId = '';
-            // this.specialtyId = '';
             this.form = {};
             this.getData();
         },
@@ -697,14 +717,14 @@ export default {
         // closeEvent() {
         //     document.exitPictureInPicture();
         // },
-        playVideo(row) {
-            if (row.video) {
-                this.showViedo = true;
-                this.videoUrl = row.video;
-            } else {
-                this.$message.success('暂无视频');
-            }
-        },
+        // playVideo(row) {
+        //     if (row.video) {
+        //         this.showViedo = true;
+        //         this.videoUrl = row.video;
+        //     } else {
+        //         this.$message.success('暂无视频');
+        //     }
+        // },
         playImg(row) {
             if (row.annex) {
                 this.showImg = true;
@@ -751,6 +771,16 @@ export default {
                     });
                     this.$set(row, 'loading', false);
                 });
+        },
+        playVideo(row, index) {
+            this.index = index;
+            this.showViedo = true;
+            this.programme = row;
+        },
+        move(direction) {
+            const end = direction + this.index;
+            this.programme = { ...this.tableData[end] };
+            this.index = end;
         }
     }
 };

+ 2 - 6
src/main/vue/src/views/performance/ProgrammeScoreList.vue

@@ -464,12 +464,8 @@ export default {
         },
         playVideo(row, index) {
             this.index = index;
-            if (row.video) {
-                this.showViedo = true;
-                this.programme = row;
-            } else {
-                this.$message.success('暂无视频');
-            }
+            this.showViedo = true;
+            this.programme = row;
         },
         move(direction) {
             const end = direction + this.index;

+ 0 - 38
src/test/java/com/izouma/wenlvju/service/storage/AliStorageServiceTest.java

@@ -1,38 +0,0 @@
-package com.izouma.wenlvju.service.storage;
-
-import com.izouma.wenlvju.ApplicationTests;
-import com.izouma.wenlvju.domain.Rate;
-import com.izouma.wenlvju.exception.BusinessException;
-import com.izouma.wenlvju.repo.RateRepo;
-import org.junit.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-
-
-public class AliStorageServiceTest extends ApplicationTests {
-
-    @Autowired
-    private AliStorageService aliStorageService;
-    @Autowired
-    private RateRepo          rateRepo;
-
-    @Test
-    public void rename() {
-//        String url = "https://wenlvju.oss-cn-hangzhou.aliyuncs.com/application/2021-08-30-17-24-14bssUaKnl.jpg";
-//        int i = url.indexOf("com/");
-//        System.out.println(url.substring(i + 4));
-//
-//        int j = url.indexOf("jpg");
-//        System.out.println(url.substring(i + 4, j));
-        Rate wu = rateRepo.findById(12696L).orElseThrow(new BusinessException("wu"));
-        wu.getPrivacyPolicy().forEach(img -> {
-            int start = img.indexOf("com/") + 4;
-            String oldUrl = img.substring(start);
-            System.out.println("之前:" + oldUrl);
-//            int end = img.indexOf("jpg");
-            String newUrl = img + "jpg";
-            System.out.println("之后:" + newUrl);
-            aliStorageService.rename(oldUrl, newUrl);
-
-        });
-    }
-}