licailing 4 jaren geleden
bovenliggende
commit
e44136a43d

+ 4 - 0
src/main/java/com/izouma/wenlvju/repo/performance/ProgrammeRepo.java

@@ -51,8 +51,12 @@ public interface ProgrammeRepo extends JpaRepository<Programme, Long>, JpaSpecif
 
 
     List<Programme> findAllByPerformanceIdAndArrangeIdIsNull(Long performanceId);
     List<Programme> findAllByPerformanceIdAndArrangeIdIsNull(Long performanceId);
 
 
+    List<Programme> findAllByPerformanceIdAndProgrammeStatusAndArrangeIdIsNull(Long performanceId, ProgrammeStatus programmeStatus);
+
     List<Programme> findAllByPerformanceIdAndReviewArrangeIdIsNull(Long performanceId);
     List<Programme> findAllByPerformanceIdAndReviewArrangeIdIsNull(Long performanceId);
 
 
+    List<Programme> findAllByPerformanceIdAndProgrammeStatusAndReviewArrangeIdIsNull(Long performanceId, ProgrammeStatus programmeStatus);
+
     List<Programme> findAllByArrangeId(Long arrangeId);
     List<Programme> findAllByArrangeId(Long arrangeId);
 
 
     List<Programme> findAllByReviewArrangeId(Long arrangeId);
     List<Programme> findAllByReviewArrangeId(Long arrangeId);

+ 5 - 2
src/main/java/com/izouma/wenlvju/service/performance/ArrangeService.java

@@ -101,10 +101,13 @@ public class ArrangeService {
         }
         }
         PerformanceStatus status = performance.getStatus();
         PerformanceStatus status = performance.getStatus();
         // 第一次分组
         // 第一次分组
-        if (performance.getAuditTimes() == 0 && PerformanceStatus.UNDER_REVIEW.equals(status)) {
+        if (PerformanceStatus.UNDER_REVIEW.equals(status)) {
             performance.setStatus(PerformanceStatus.ARRANGE);
             performance.setStatus(PerformanceStatus.ARRANGE);
             status = PerformanceStatus.ARRANGE;
             status = PerformanceStatus.ARRANGE;
-            performance.setAuditTimes(1);
+            if (performance.getAuditTimes() == 0) {
+                performance.setAuditTimes(1);
+            }
+
             performanceRepo.save(performance);
             performanceRepo.save(performance);
         }
         }
 
 

+ 2 - 2
src/main/java/com/izouma/wenlvju/service/performance/ProgrammeService.java

@@ -545,14 +545,14 @@ public class ProgrammeService {
     public List<ProgrammeShowDTO> ungrouped(Long performanceId) {
     public List<ProgrammeShowDTO> ungrouped(Long performanceId) {
         Performance performance = performanceRepo.findById(performanceId).orElseThrow(new BusinessException("无展演"));
         Performance performance = performanceRepo.findById(performanceId).orElseThrow(new BusinessException("无展演"));
         if (performance.getAuditTimes() > 1) {
         if (performance.getAuditTimes() > 1) {
-            List<Programme> programmes = programmeRepo.findAllByPerformanceIdAndReviewArrangeIdIsNull(performanceId);
+            List<Programme> programmes = programmeRepo.findAllByPerformanceIdAndProgrammeStatusAndReviewArrangeIdIsNull(performanceId, ProgrammeStatus.SUBMIT);
             if (CollUtil.isNotEmpty(programmes)) {
             if (CollUtil.isNotEmpty(programmes)) {
                 this.sort(programmes);
                 this.sort(programmes);
                 return this.toShowDTOList(programmes, performance.getName());
                 return this.toShowDTOList(programmes, performance.getName());
             }
             }
             return null;
             return null;
         }
         }
-        List<Programme> programmes = programmeRepo.findAllByPerformanceIdAndArrangeIdIsNull(performanceId);
+        List<Programme> programmes = programmeRepo.findAllByPerformanceIdAndProgrammeStatusAndArrangeIdIsNull(performanceId, ProgrammeStatus.SUBMIT);
         if (CollUtil.isNotEmpty(programmes)) {
         if (CollUtil.isNotEmpty(programmes)) {
             this.sort(programmes);
             this.sort(programmes);
             return this.toShowDTOList(programmes, performance.getName());
             return this.toShowDTOList(programmes, performance.getName());

+ 4 - 1
src/main/vue/src/mixins/formatters.js

@@ -15,7 +15,10 @@ export default {
             }
             }
         },
         },
         getTime(value, format1 = 'HH:mm:ss', format2 = 'HH:mm') {
         getTime(value, format1 = 'HH:mm:ss', format2 = 'HH:mm') {
-            return format(parse(value, format1, new Date()), format2);
+            // return format(parse(value, format1, new Date()), format2);
+            if (value) {
+                return format(parse(value, format1, new Date()), format2);
+            }
         }
         }
     }
     }
 };
 };

+ 11 - 0
src/main/vue/src/router.js

@@ -804,6 +804,17 @@ const router = new Router({
                     meta: {
                     meta: {
                         title: '节目编排'
                         title: '节目编排'
                     }
                     }
+                },
+                {
+                    path: '/judgeReviewList',
+                    name: 'ArrangeJudgeList',
+                    component: () =>
+                        import(
+                            /* webpackChunkName: "arrangeJudgeList" */ '@/views/performance/review/ArrangeJudgeList.vue'
+                        ),
+                    meta: {
+                        title: '分配评委'
+                    }
                 }
                 }
                 /**INSERT_LOCATION**/
                 /**INSERT_LOCATION**/
             ]
             ]

+ 5 - 1
src/main/vue/src/views/performance/ArrangeJudgeList.vue

@@ -179,6 +179,7 @@ import delChild from '@/mixins/delChild';
 export default {
 export default {
     name: 'ArrangeJudgeList',
     name: 'ArrangeJudgeList',
     mixins: [pageableTable, delChild],
     mixins: [pageableTable, delChild],
+    props: ['review'],
     components: { OrganLog },
     components: { OrganLog },
     data() {
     data() {
         return {
         return {
@@ -325,7 +326,7 @@ export default {
             let data = {
             let data = {
                 search: this.search,
                 search: this.search,
                 sort: 'date,asc;startTime,asc',
                 sort: 'date,asc;startTime,asc',
-                query: { performanceId: this.form.performanceId }
+                query: { performanceId: this.form.performanceId, auditTimes: 1 }
             };
             };
             if (this.form.address) {
             if (this.form.address) {
                 data.query.address = this.form.address;
                 data.query.address = this.form.address;
@@ -338,6 +339,9 @@ export default {
             } else if (this.form.afternoon && !this.form.morning) {
             } else if (this.form.afternoon && !this.form.morning) {
                 data.query.morning = false;
                 data.query.morning = false;
             }
             }
+            if (this.review) {
+                data.query.auditTimes = 2;
+            }
             return data;
             return data;
         },
         },
         toggleMultipleMode(multipleMode) {
         toggleMultipleMode(multipleMode) {

+ 40 - 21
src/main/vue/src/views/performance/ArrangeList.vue

@@ -52,7 +52,8 @@
                                             <el-checkbox v-model="form.morning" disabled>上午</el-checkbox>
                                             <el-checkbox v-model="form.morning" disabled>上午</el-checkbox>
                                             <el-time-select
                                             <el-time-select
                                                 placeholder="起始时间"
                                                 placeholder="起始时间"
-                                                format="HH:mm"
+                                                format="HH:mm:ss"
+                                                value-format="HH:mm:ss"
                                                 v-model="timeRange[0]"
                                                 v-model="timeRange[0]"
                                                 :picker-options="{
                                                 :picker-options="{
                                                     start: '08:30',
                                                     start: '08:30',
@@ -64,7 +65,7 @@
                                             </el-time-select>
                                             </el-time-select>
                                             <el-time-select
                                             <el-time-select
                                                 placeholder="结束时间"
                                                 placeholder="结束时间"
-                                                format="HH:mm"
+                                                format="HH:mm:ss"
                                                 v-model="timeRange[1]"
                                                 v-model="timeRange[1]"
                                                 :picker-options="{
                                                 :picker-options="{
                                                     start: '08:30',
                                                     start: '08:30',
@@ -96,7 +97,7 @@
 
 
                                             <el-time-select
                                             <el-time-select
                                                 placeholder="起始时间"
                                                 placeholder="起始时间"
-                                                format="HH:mm"
+                                                format="HH:mm:ss"
                                                 value-format="HH:mm:ss"
                                                 value-format="HH:mm:ss"
                                                 v-model="afterTimeRange[0]"
                                                 v-model="afterTimeRange[0]"
                                                 :picker-options="{
                                                 :picker-options="{
@@ -109,6 +110,7 @@
                                             </el-time-select>
                                             </el-time-select>
                                             <el-time-select
                                             <el-time-select
                                                 placeholder="结束时间"
                                                 placeholder="结束时间"
+                                                format="HH:mm:ss"
                                                 v-model="afterTimeRange[1]"
                                                 v-model="afterTimeRange[1]"
                                                 :picker-options="{
                                                 :picker-options="{
                                                     start: '13:00',
                                                     start: '13:00',
@@ -295,7 +297,6 @@ import pageableTable from '@/mixins/pageableTable';
 import ArrangeLog from '../../components/ArrangeLog';
 import ArrangeLog from '../../components/ArrangeLog';
 import { time } from 'echarts';
 import { time } from 'echarts';
 import delChild from '@/mixins/delChild';
 import delChild from '@/mixins/delChild';
-import { format, parse } from 'date-fns';
 
 
 export default {
 export default {
     name: 'ArrangeList',
     name: 'ArrangeList',
@@ -333,7 +334,7 @@ export default {
     watch: {
     watch: {
         timeRange(value) {
         timeRange(value) {
             let checked = value.includes(null);
             let checked = value.includes(null);
-            console.log(value[0]);
+            // console.log(value[0] + ':00');
             this.form.morning = !checked;
             this.form.morning = !checked;
             this.$refs.form.validateField('afternoon');
             this.$refs.form.validateField('afternoon');
         },
         },
@@ -491,19 +492,37 @@ export default {
         },
         },
         programme(row) {
         programme(row) {
             if (this.online) {
             if (this.online) {
-                this.$router.push({
-                    path: '/progGroupOnlineList',
-                    query: {
-                        aid: row.id
-                    }
-                });
+                if (this.review) {
+                    this.$router.push({
+                        path: '/progGroupOnlineList',
+                        query: {
+                            arid: row.id
+                        }
+                    });
+                } else {
+                    this.$router.push({
+                        path: '/progGroupOnlineList',
+                        query: {
+                            aid: row.id
+                        }
+                    });
+                }
             } else {
             } else {
-                this.$router.push({
-                    path: '/programmeGroupList',
-                    query: {
-                        aid: row.id
-                    }
-                });
+                if (this.review) {
+                    this.$router.push({
+                        path: '/programmeGroupList',
+                        query: {
+                            arid: row.id
+                        }
+                    });
+                } else {
+                    this.$router.push({
+                        path: '/programmeGroupList',
+                        query: {
+                            aid: row.id
+                        }
+                    });
+                }
             }
             }
         },
         },
         download() {
         download() {
@@ -567,10 +586,10 @@ export default {
             let data = { ...this.form };
             let data = { ...this.form };
             data.startDate = this.dateRange[0];
             data.startDate = this.dateRange[0];
             data.endDate = this.dateRange[1];
             data.endDate = this.dateRange[1];
-            data.morningStartTime = this.timeRange[0];
-            data.morningEndTime = this.timeRange[1];
-            data.afternoonStartTime = this.afterTimeRange[0];
-            data.afternoonEndTime = this.afterTimeRange[1];
+            data.morningStartTime = this.timeRange[0] + ':00';
+            data.morningEndTime = this.timeRange[1] + ':00';
+            data.afternoonStartTime = this.afterTimeRange[0] + ':00';
+            data.afternoonEndTime = this.afterTimeRange[1] + ':00';
 
 
             this.saving = true;
             this.saving = true;
             this.$http
             this.$http

+ 23 - 11
src/main/vue/src/views/performance/ProgrammeGroupList.vue

@@ -175,13 +175,17 @@ export default {
             arrange: [],
             arrange: [],
             showProgramme: false,
             showProgramme: false,
             unGrouped: [],
             unGrouped: [],
-            performanceId: ''
+            performanceId: '',
+            arrangeId: ''
         };
         };
     },
     },
     created() {
     created() {
         if (this.$route.query.aid) {
         if (this.$route.query.aid) {
-            this.getArrange(this.$route.query.aid);
+            this.arrangeId = this.$route.query.aid;
+        } else if (this.$route.query.arid) {
+            this.arrangeId = this.$route.query.arid;
         }
         }
+        this.getArrange(this.arrangeId);
     },
     },
     computed: {
     computed: {
         selection() {
         selection() {
@@ -199,10 +203,14 @@ export default {
         beforeGetData() {
         beforeGetData() {
             let data = {
             let data = {
                 sort: 'gradingOrganizationId,asc;organizationId,asc;',
                 sort: 'gradingOrganizationId,asc;organizationId,asc;',
-                query: {
-                    arrangeId: Number(this.$route.query.aid)
-                }
+                query: {}
             };
             };
+            if (this.$route.query.aid) {
+                data.query.arrangeId = Number(this.$route.query.aid);
+            }
+            if (this.$route.query.arid) {
+                data.query.reviewArrangeId = Number(this.$route.query.arid);
+            }
             return data;
             return data;
         },
         },
         toggleMultipleMode(multipleMode) {
         toggleMultipleMode(multipleMode) {
@@ -224,10 +232,14 @@ export default {
 
 
             let data = {
             let data = {
                 sort: 'gradingOrganizationId,asc;organizationId,asc;',
                 sort: 'gradingOrganizationId,asc;organizationId,asc;',
-                query: {
-                    arrangeId: Number(this.$route.query.aid)
-                }
+                query: {}
             };
             };
+            if (this.$route.query.aid) {
+                data.query.arrangeId = Number(this.$route.query.aid);
+            }
+            if (this.$route.query.arid) {
+                data.query.reviewArrangeId = Number(this.$route.query.arid);
+            }
 
 
             this.$axios
             this.$axios
                 .get('/programme/excel', {
                 .get('/programme/excel', {
@@ -267,7 +279,7 @@ export default {
                 })
                 })
                 .then(() => {
                 .then(() => {
                     this.$message.success('移除成功');
                     this.$message.success('移除成功');
-                    this.getArrange(this.$route.query.aid);
+                    this.getArrange(this.arrangeId);
                     this.getData();
                     this.getData();
                 })
                 })
                 .catch(e => {
                 .catch(e => {
@@ -328,11 +340,11 @@ export default {
         },
         },
         choose(row) {
         choose(row) {
             this.$http
             this.$http
-                .post('/programme/intoGroup', { id: row.id, arrangeId: this.$route.query.aid })
+                .post('/programme/intoGroup', { id: row.id, arrangeId: this.arrangeId })
                 .then(res => {
                 .then(res => {
                     this.showProgramme = false;
                     this.showProgramme = false;
                     this.$message.success('添加成功');
                     this.$message.success('添加成功');
-                    this.getArrange(this.$route.query.aid);
+                    this.getArrange(this.arrangeId);
                     this.getData();
                     this.getData();
                 })
                 })
                 .catch(e => {
                 .catch(e => {

+ 12 - 0
src/main/vue/src/views/performance/review/ArrangeJudgeList.vue

@@ -0,0 +1,12 @@
+<template>
+    <arrange-judge-list :review="true"></arrange-judge-list>
+</template>
+<script>
+import ArrangeJudgeList from '@/views/performance/ArrangeJudgeList';
+export default {
+    components: {
+        ArrangeJudgeList
+    }
+};
+</script>
+<style lang="less" scoped></style>