licailing пре 4 година
родитељ
комит
aa62b81e13

+ 0 - 3
src/main/java/com/izouma/wenlvju/domain/ExamRoom.java

@@ -31,7 +31,4 @@ public class ExamRoom extends BaseEntity {
 
     private String address;
 
-    @Transient
-    private String organizer;
-
 }

+ 15 - 16
src/main/java/com/izouma/wenlvju/service/ExamRoomService.java

@@ -169,31 +169,30 @@ public class ExamRoomService {
     /*
     展示今天备案中的所有考场信息
      */
-    public List<ExamRoom> byToday(Long recordId, String district) {
+    public List<ExamRoom> byToday(PageQuery pageQuery, boolean status) {
         List<Long> ids = new ArrayList<>();
-        if (ObjectUtil.isNotEmpty(recordId)) {
-            ids.addAll(recordExamRoomRepo.findExamRoomIdByRecordId(recordId));
-        } else {
-            List<Record> all = recordService.byToday(district);
-            List<Long> rids = all.stream().map(Record::getId).collect(Collectors.toList());
-            if (CollUtil.isEmpty(rids)) {
-                return null;
-            }
-
-            ids.addAll(recordExamRoomRepo.findExamRoomIdByRecordIdIn(rids));
+
+        List<Record> all = recordService.all2(pageQuery).getContent();
+
+        List<Long> rids = all.stream().map(Record::getId).collect(Collectors.toList());
+        if (CollUtil.isEmpty(rids)) {
+            return null;
         }
 
+        ids.addAll(recordExamRoomRepo.findExamRoomIdByRecordIdIn(rids));
+
 
         if (CollUtil.isEmpty(ids)) {
             return null;
         }
         List<ExamRoom> rooms = examRoomRepo.findAllById(ids);
-        Set<Long> organizationIds = rooms.stream().map(ExamRoom::getOrganizationId).collect(Collectors.toSet());
-        Map<Long, String> organizationMap = organizationRepo.findAllById(organizationIds)
-                .stream()
-                .collect(Collectors.toMap(Organization::getId, Organization::getName));
+//        Set<Long> organizationIds = rooms.stream().map(ExamRoom::getOrganizationId).collect(Collectors.toSet());
+//        Map<Long, String> organizationMap = organizationRepo.findAllById(organizationIds)
+//                .stream()
+//                .collect(Collectors.toMap(Organization::getId, Organization::getName));
+
 
-        rooms.forEach(room -> room.setOrganizer(organizationMap.get(room.getOrganizationId())));
+//        rooms.forEach(room -> room.setRecord(null));
         return rooms;
     }
 }

+ 2 - 2
src/main/java/com/izouma/wenlvju/web/ExamRoomController.java

@@ -87,8 +87,8 @@ public class ExamRoomController extends BaseController {
 
     @PostMapping("/byToday")
     @ApiOperation("今日所有备案的考场信息")
-    public List<ExamRoom> byToday(Long recordId, String district) {
-        return examRoomService.byToday(recordId, district);
+    public List<ExamRoom> byToday(PageQuery pageQuery, boolean status) {
+        return examRoomService.byToday(pageQuery, status);
     }
 }
 

+ 11 - 1
src/main/vue/src/components/VideoGrid.vue

@@ -1,7 +1,11 @@
 <template>
     <el-card>
         <div slot="header">
-            <span>{{ organizer }}-{{ orgname }}</span>
+            <span class="span-size">承办单位:{{ organizer }}<br/></span>
+            <span class="span-size">考级详细地址:{{ examinationAddress }}<br/></span>
+            <span class="span-size">联系人:<br/></span>
+            <span class="span-size">联系电话:<br/></span>
+            <span class="span-size">检查记录:<br/></span>
         </div>
         <div class="video" :id="name" style="width:100%;height:400px">
             <!-- <div class="bottom"></div> -->
@@ -117,4 +121,10 @@ export default {
     height: 30px;
     z-index: 3;
 }
+
+.span-size {
+    font-size: 14px;
+    color: #565b66;
+    line-height: 15px;
+}
 </style>

+ 1 - 1
src/main/vue/src/plugins/http.js

@@ -6,7 +6,7 @@ let baseUrl = 'http://localhost:8080';
 switch (process.env.NODE_ENV) {
     case 'development':
         baseUrl = 'http://localhost:8080';
-        // baseUrl = 'http://wlj.izouma.com';
+        // baseUrl = 'http://wljtest.izouma.com';
         // baseUrl = 'http://192.168.31.202:8080';
         break;
     case 'test':

+ 2 - 2
src/main/vue/src/views/Echarts.vue

@@ -92,7 +92,7 @@ export default {
             this.myChart.resize();
         },
         initScatter() {
-            this.title = this.selectName + '考级活动分布图';
+            this.title = this.selectName + '艺术考级活动分布图';
             let _datas = this.produceDataSeries(this.mapInfos.length, this.valList[1]);
             this.myChart.setOption({
                 geo: {
@@ -197,7 +197,7 @@ export default {
             return list[0];
         },
         init3D() {
-            this.title = this.selectName + '本月各考级数量柱状图';
+            this.title = this.selectName + '本月各区艺术考级数量柱状图';
             this.myChart.clear();
             setTimeout(() => {
                 this.allInfo = {

+ 7 - 7
src/main/vue/src/views/record/RecordList.vue

@@ -1,15 +1,15 @@
 <template>
     <div class="list-view">
         <div class="filters-container">
-            <el-col :span="7">
+            <el-col :span="8">
                 <span class="span-size">考级活动名称</span>
                 <el-input placeholder="输入考级活动名称" v-model="search" clearable class="filter-item"></el-input>
             </el-col>
-            <el-col :span="7">
+            <el-col :span="8">
                 <span class="span-size">考级机构名称</span>
                 <el-input placeholder="输入考级机构名称" v-model="agency" clearable class="filter-item"></el-input>
             </el-col>
-            <el-col :span="7">
+            <el-col :span="8">
                 <label class="span-size">考级地点</label>
                 <el-select class="filter-item" v-model="districtId" clearable placeholder="请选择区县">
                     <el-option
@@ -20,7 +20,7 @@
                     ></el-option>
                 </el-select>
             </el-col>
-            <el-col :span="7">
+            <el-col :span="8">
                 <span class="span-size">承办单位名称</span>
                 <el-input placeholder="输入承办单位名称" v-model="organizer" clearable class="filter-item"></el-input>
             </el-col>
@@ -39,8 +39,8 @@
                 </el-date-picker>
             </el-col>
         </div>
-        <div style="padding-left: 20px">
-            <el-button @click="getData" type="primary" icon="el-icon-search" class="filter-item">查询 </el-button>
+        <div style="padding: 0 0 10px 20px">
+            <el-button @click="getData" type="primary" icon="el-icon-search" class="filter-item">查询</el-button>
             <el-upload
                 :action="uploadUrl"
                 :before-upload="beforeUpload"
@@ -51,7 +51,7 @@
                 class="uploader"
                 :on-error="onfail"
             >
-                <el-button slot="trigger" size="small" type="primary">批量上传</el-button>
+                <el-button slot="trigger" size="small" type="primary" class="filter-item">批量上传</el-button>
             </el-upload>
 
             <!-- <el-button @click="upload" type="primary" icon="el-icon-plus" class="filter-item">批量上传 </el-button> -->

+ 36 - 7
src/main/vue/src/views/record/RecordOrganizationList.vue

@@ -32,9 +32,37 @@
                 </template>
             </el-table-column>
             <el-table-column prop="examinationAgency" label="考级机构名称" min-width="150"></el-table-column>
-            <el-table-column prop="organizer" label="承办单位名称" min-width="150"></el-table-column>
             <el-table-column prop="district" label="考级地点" min-width="70"></el-table-column>
-            <el-table-column prop="recordTime" label="备案时间" min-width="90"></el-table-column>
+            <el-table-column prop="examinationAddress" label="考级详细地址" min-width="70"></el-table-column>
+            <el-table-column label="考级状态" min-width="70">
+                <template slot-scope="{ row }">
+                    <el-link
+                        style="font-size: 13px"
+                        :underline="false"
+                        type="info"
+                        v-if="currentTime < row.examinationStartTime"
+                    >未开考
+                    </el-link
+                    >
+                    <el-link
+                        style="font-size: 13px"
+                        :underline="false"
+                        type="warning"
+                        v-else-if="currentTime > row.examinationEndTime"
+                    >已开考
+                    </el-link
+                    >
+                    <el-link
+                        style="font-size: 13px"
+                        :underline="false"
+                        type="success"
+                        v-else-if="currentTime > row.examinationStartTime && currentTime < row.examinationEndTime"
+                    >考级中
+                    </el-link
+                    >
+                </template>
+            </el-table-column>
+            <!-- <el-table-column prop="recordTime" label="备案时间" min-width="90"></el-table-column> -->
             <el-table-column label="操作" align="center" fixed="right" min-width="75">
                 <template slot-scope="{ row }">
                     <el-button @click="editRow(row)" type="primary" size="mini" plain>查看</el-button>
@@ -67,7 +95,8 @@
 </template>
 <script>
 import pageableTable from '@/mixins/pageableTable';
-import { mapState } from 'vuex';
+import {mapState} from 'vuex';
+import {format} from 'date-fns';
 
 export default {
     name: 'RecordOrganizationList',
@@ -82,6 +111,7 @@ export default {
                 console.log(e);
                 this.$message.error(e.error);
             });
+        this.currentTime = format(new Date(), 'yyyy-MM-dd');
     },
     data() {
         return {
@@ -89,17 +119,16 @@ export default {
             search: '',
             url: '/record/byOrganization',
             downloading: false,
-            categoryOptions: [{ label: '承办单位', value: 'ORGANIZER' }],
+            categoryOptions: [{label: '承办单位', value: 'ORGANIZER'}],
             district: [],
             districtId: '',
-            province: '江苏省',
-            city: '南京市',
             status: '',
             recordDateRange: '',
             agency: '',
             organizer: '',
             dateRange: '',
-            dialogVisible: false
+            dialogVisible: false,
+            currentTime: ''
         };
     },
     computed: {

+ 4 - 4
src/main/vue/src/views/record/RecordRegulationList.vue

@@ -1,15 +1,15 @@
 <template>
     <div class="list-view">
         <div class="filters-container">
-            <el-col :span="7">
+            <el-col :span="8">
                 <span class="span-size">考级活动名称</span>
                 <el-input placeholder="输入考级活动名称" v-model="search" clearable class="filter-item"></el-input>
             </el-col>
-            <el-col :span="7">
+            <el-col :span="8">
                 <span class="span-size">考级机构名称</span>
                 <el-input placeholder="输入考级机构名称" v-model="agency" clearable class="filter-item"></el-input>
             </el-col>
-            <el-col :span="7">
+            <el-col :span="8">
                 <label class="span-size">考级地点</label>
                 <el-select class="filter-item" v-model="district" clearable placeholder="请选择区县">
                     <el-option
@@ -20,7 +20,7 @@
                     ></el-option>
                 </el-select>
             </el-col>
-            <el-col :span="7">
+            <el-col :span="8">
                 <span class="span-size">承办单位名称</span>
                 <el-input placeholder="输入承办单位名称" v-model="organizer" clearable class="filter-item"></el-input>
             </el-col>

+ 78 - 75
src/main/vue/src/views/record/VideoList.vue

@@ -1,52 +1,68 @@
 <template>
     <div class="edit-view">
-        <el-form :model="form" inline size="mini">
-            <el-form-item label="考级地址">
-                <!-- <el-select style="margin-right: 10px" v-model="city" placeholder="请选择市">
-                    <el-option value="南京市" label="南京市"></el-option>
-                </el-select> -->
-                <el-select v-model="district" clearable placeholder="请选择区县" @change="districtSelect">
-                    <el-option
-                        v-for="item in districts"
-                        :key="item.id"
-                        :value="item.name"
-                        :label="item.name"
-                    ></el-option>
-                </el-select>
-            </el-form-item>
-            <el-form-item label="备案筛选">
-                <el-select
-                    v-model="recordId"
-                    clearable
-                    placeholder="请选择备案信息"
-                    style="width: 300px"
-                    @change="getRecord"
-                >
-                    <el-option
-                        v-for="item in records"
-                        :key="item.value"
-                        :value="item.value"
-                        :label="item.label"
-                    ></el-option>
-                </el-select>
-            </el-form-item>
-            <el-form-item label="" style="margin-left:20px">
-                <span>{{ time }}</span>
-            </el-form-item>
+        <el-form :model="form" inline size="small">
+            <el-col :span="8">
+                <el-form-item label="考级活动名称">
+                    <el-input placeholder="输入考级活动名称" v-model="search" clearable class="filter-item"></el-input>
+                </el-form-item>
+            </el-col>
+            <el-col :span="8">
+                <el-form-item label="考级机构名称">
+                    <el-input placeholder="输入考级机构名称" v-model="agency" clearable class="filter-item"></el-input>
+                </el-form-item>
+            </el-col>
+            <el-col :span="8">
+                <el-form-item label="考级地址">
+                    <el-select v-model="district" clearable placeholder="请选择区县" @change="getRecord">
+                        <el-option
+                            v-for="item in districts"
+                            :key="item.id"
+                            :value="item.name"
+                            :label="item.name"
+                        ></el-option>
+                    </el-select>
+                </el-form-item>
+            </el-col>
+            <el-col :span="8">
+                <el-form-item label="承办单位名称">
+                    <el-input
+                        placeholder="输入承办单位名称"
+                        v-model="organizer"
+                        clearable
+                        class="filter-item"
+                    ></el-input>
+                </el-form-item>
+            </el-col>
+            <el-col :span="14">
+                <el-form-item label="考级活动时间">
+                    <el-date-picker
+                        v-model="dateRange"
+                        type="daterange"
+                        value-format="yyyy-MM-dd"
+                        start-placeholder="请选择开始时间"
+                        end-placeholder="请选择结束时间"
+                        range-separator="至"
+                        class="filter-item"
+                    >
+                    </el-date-picker>
+                </el-form-item>
+            </el-col>
         </el-form>
 
-        <div class="video-list">
-            <video-grid
-                v-for="item in list"
-                ref="video"
-                :token="token"
-                :device="item.deviceSerial"
-                :key="item.id"
-                :organizer="item.organizer"
-                :orgname="item.name"
-                :name="`video_${item.id}`"
-            ></video-grid>
-        </div>
+        <el-col :span="24">
+            <div class="video-list">
+                <video-grid
+                    v-for="item in list"
+                    ref="video"
+                    :token="token"
+                    :device="item.deviceSerial"
+                    :key="item.id"
+                    :organizer="item.organizer"
+                    :orgname="item.name"
+                    :name="`video_${item.id}`"
+                ></video-grid>
+            </div>
+        </el-col>
     </div>
 </template>
 
@@ -61,11 +77,13 @@ export default {
             form: {},
             list: [],
             time: '',
-            recordId: '',
             records: [],
             districts: [],
             district: '',
-            city: ''
+            search: '',
+            agency: '',
+            organizer: '',
+            dateRange: ''
         };
     },
     created() {
@@ -81,32 +99,6 @@ export default {
     },
     mounted() {
         this.getTime();
-        // this.$http
-        //     .get('ezvizToken/getToken')
-        //     .then(res => {
-        //         this.token = res;
-        //         return this.$http.post('/examRoom/byToday', { recordId: this.recordId, district: this.district });
-        //     })
-        //     .then(res => {
-        //         this.list = res;
-        //         this.$nextTick(() => {
-        //             if (res.length > 0) {
-        //                 res.forEach((item, index) => {
-        //                     if (index == 0) {
-        //                         this.$refs.video[index].init();
-        //                     } else {
-        //                         let _index = this.randomNum(0, 4);
-        //                         console.log(_index);
-        //                         this.$refs.video[index].initVideo(index);
-        //                     }
-        //                 });
-        //             }
-        //         });
-        //     })
-        //     .catch(e => {
-        //         console.log(e);
-        //         this.$message.error(e.error);
-        //     });
         this.getVideo();
         this.getRecord();
     },
@@ -154,7 +146,7 @@ export default {
                 .get('ezvizToken/getToken')
                 .then(res => {
                     this.token = res;
-                    return this.$http.post('/examRoom/byToday', { recordId: this.recordId, district: this.district });
+                    return this.$http.post('/examRoom/byToday', {district: this.district});
                 })
                 .then(res => {
                     this.list = res;
@@ -179,15 +171,26 @@ export default {
         },
         districtSelect() {
             this.getVideo();
-            this.getRecord();
+            // this.getRecord();
         }
     }
 };
 </script>
 
 <style lang="less" scoped>
+.edit-view {
+    height: 798px;
+}
+
 .video-list {
     display: flex;
     flex-wrap: wrap;
 }
+
+.span-size {
+    font-size: 14px;
+    color: #565b66;
+    line-height: 15px;
+    padding: 0 10px 0 10px;
+}
 </style>

+ 2 - 2
src/test/java/com/izouma/wenlvju/service/ExamRoomServiceTest.java

@@ -42,8 +42,8 @@ public class ExamRoomServiceTest extends ApplicationTests {
 
     @Test
     public void showVideo() {
-        List<ExamRoom> show = examRoomService.byToday(8L, null);
-        show.forEach(System.out::println);
+//        List<ExamRoom> show = examRoomService.byToday(8L, null);
+//        show.forEach(System.out::println);
     }
 
 }