licailing il y a 4 ans
Parent
commit
258610d4ec

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

@@ -795,6 +795,15 @@ const router = new Router({
                     meta: {
                         title: '节目列表'
                     }
+                },
+                {
+                    path: '/arrangeReviewList',
+                    name: 'ArrangeList',
+                    component: () =>
+                        import(/* webpackChunkName: "arrangeList" */ '@/views/performance/review/ArrangeList.vue'),
+                    meta: {
+                        title: '节目编排'
+                    }
                 }
                 /**INSERT_LOCATION**/
             ]

+ 46 - 37
src/main/vue/src/views/performance/ArrangeList.vue

@@ -23,13 +23,13 @@
                     <el-button type="primary" @click="getData">查看活动分组情况</el-button>
                     <el-button type="primary" @click="intoGroup">查看未分组情况情况</el-button>
                 </el-form-item>
-                <div v-if="performance.status == 'UNDER_REVIEW' || performance.status == 'ARRANGE'">
+                <div v-if="canEdit()">
                     <el-collapse-transition>
                         <div v-show="showMore">
                             <el-card shadow="hover" :body-style="{ padding: '15px' }" style="margin-bottom: 15px">
                                 <el-row :gutter="15">
                                     <el-col :span="12" :offset="0">
-                                        <el-form-item label="活动日期" prop="dateRange" v-if="!performance.online">
+                                        <el-form-item label="活动日期" prop="dateRange" v-if="!online">
                                             <el-date-picker
                                                 v-model="dateRange"
                                                 value-format="yyyy-MM-dd"
@@ -45,23 +45,14 @@
                                     <el-col :span="6" :offset="0">
                                         <el-form-item class="flex" label="分组节目数量" prop="quantity">
                                             <el-input-number type="number" v-model="form.quantity"></el-input-number>
-                                            <!-- <el-select v-model="form.quantity" clearable>
-                                            <el-option
-                                                v-for="item in nums"
-                                                :key="item"
-                                                :label="item"
-                                                :value="item"
-                                            ></el-option>
-                                        </el-select> -->
                                         </el-form-item>
                                     </el-col>
                                     <el-col :span="12">
-                                        <el-form-item label="时间安排" prop="morning" v-if="!performance.online">
+                                        <el-form-item label="时间安排" prop="morning" v-if="!online">
                                             <el-checkbox v-model="form.morning" disabled>上午</el-checkbox>
                                             <el-time-select
                                                 placeholder="起始时间"
                                                 format="HH:mm"
-                                                value-format="HH:mm:ss"
                                                 v-model="timeRange[0]"
                                                 :picker-options="{
                                                     start: '08:30',
@@ -73,6 +64,7 @@
                                             </el-time-select>
                                             <el-time-select
                                                 placeholder="结束时间"
+                                                format="HH:mm"
                                                 v-model="timeRange[1]"
                                                 :picker-options="{
                                                     start: '08:30',
@@ -86,25 +78,20 @@
                                         </el-form-item>
                                     </el-col>
                                     <el-col :span="6" :offset="0">
-                                        <el-form-item
-                                            class="flex"
-                                            label="单个节目时长"
-                                            prop="duration"
-                                            v-if="!performance.online"
-                                        >
-                                            <!-- <el-input-number type="number" v-model="form.duration"></el-input-number> -->
-                                            <el-select v-model="form.duration" clearable>
+                                        <el-form-item class="flex" label="单个节目时长" prop="duration" v-if="!online">
+                                            <el-input-number type="number" v-model="form.duration"></el-input-number>
+                                            <!-- <el-select v-model="form.duration" clearable>
                                                 <el-option
                                                     v-for="item in times"
                                                     :key="item"
                                                     :label="item"
                                                     :value="item"
                                                 ></el-option>
-                                            </el-select>
+                                            </el-select> -->
                                         </el-form-item>
                                     </el-col>
                                     <el-col :span="12" :offset="0">
-                                        <el-form-item label=" " prop="afternoon" v-if="!performance.online">
+                                        <el-form-item label=" " prop="afternoon" v-if="!online">
                                             <el-checkbox v-model="form.afternoon" disabled>下午</el-checkbox>
 
                                             <el-time-select
@@ -152,16 +139,17 @@
                                             class="flex"
                                             label="活动地点"
                                             style="width: 467px"
-                                            v-if="!performance.online"
+                                            v-if="!online"
                                         >
-                                            <el-select v-model="form.address">
+                                            <!-- <el-select v-model="form.address">
                                                 <el-option
                                                     v-for="(item, index) in addresses"
                                                     :key="index"
                                                     :value="item.value"
                                                     :label="item.value"
                                                 ></el-option>
-                                            </el-select>
+                                            </el-select> -->
+                                            <el-input v-model="form.address"></el-input>
                                         </el-form-item>
                                     </el-col>
                                 </el-row>
@@ -193,7 +181,7 @@
             :data="tableData"
             row-key="id"
             ref="table"
-            empty-text="加载中..."
+            :empty-text="tableData.length > 0 ? '加载中...' : '暂无数据'"
             header-row-class-name="table-header-row"
             header-cell-class-name="table-header-cell"
             row-class-name="table-row"
@@ -202,9 +190,9 @@
         >
             <el-table-column v-if="multipleMode" align="center" type="selection" width="50"> </el-table-column>
             <!-- <el-table-column prop="id" label="ID" width="100"> </el-table-column> -->
-            <el-table-column prop="address" label="活动地点" v-if="!performance.online"> </el-table-column>
+            <el-table-column prop="address" label="活动地点" v-if="!online"> </el-table-column>
             <el-table-column prop="name" label="分组名称" min-width="130"> </el-table-column>
-            <el-table-column label="时间安排" min-width="100" v-if="!performance.online">
+            <el-table-column label="时间安排" min-width="100" v-if="!online">
                 <template slot-scope="{ row }"> {{ getTime(row.startTime) }}-{{ getTime(row.endTime) }} </template>
             </el-table-column>
             <el-table-column prop="quantity" label="节目数量"> </el-table-column>
@@ -216,7 +204,7 @@
             </el-table-column>
             <el-table-column prop="writerDirector" label="编导姓名"> </el-table-column>
             <el-table-column prop="phone" label="联系电话"> </el-table-column>
-            <el-table-column label="操作" align="center" fixed="right" :min-width="performance.online ? 100 : 320">
+            <el-table-column label="操作" align="center" fixed="right" :min-width="online ? 100 : 320">
                 <template slot-scope="{ row, $index }">
                     <el-button
                         @click="editRow(row)"
@@ -233,7 +221,7 @@
                         type="success"
                         size="mini"
                         plain
-                        v-if="!performance.online"
+                        v-if="!online"
                         >上移</el-button
                     >
                     <el-button
@@ -242,7 +230,7 @@
                         type="warning"
                         size="mini"
                         plain
-                        v-if="!performance.online"
+                        v-if="!online"
                         >下移</el-button
                     >
                 </template>
@@ -307,10 +295,12 @@ import pageableTable from '@/mixins/pageableTable';
 import ArrangeLog from '../../components/ArrangeLog';
 import { time } from 'echarts';
 import delChild from '@/mixins/delChild';
+import { format, parse } from 'date-fns';
 
 export default {
     name: 'ArrangeList',
     mixins: [pageableTable, delChild],
+    props: ['review'],
     components: { ArrangeLog },
     data() {
         return {
@@ -335,15 +325,15 @@ export default {
                 { label: '个人', value: 'SINGLE' },
                 { label: '集体', value: 'COLLECTIVE' }
             ],
-            nums: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
             times: [3, 5, 10, 15, 20],
-            activeNames: []
+            activeNames: [],
+            online: false
         };
     },
     watch: {
         timeRange(value) {
             let checked = value.includes(null);
-            console.log(checked);
+            console.log(value[0]);
             this.form.morning = !checked;
             this.$refs.form.validateField('afternoon');
         },
@@ -376,6 +366,10 @@ export default {
                     });
                     this.form.performanceId = res.content[0].id;
                     this.performance = res.content[0];
+                    this.online = this.performance.online;
+                    if (this.review) {
+                        this.online = this.performance.reviewOnline;
+                    }
                     this.getData();
                     this.$http
                         .post(
@@ -428,7 +422,7 @@ export default {
         rules() {
             return {
                 performanceId: [{ required: true, message: '请选择活动名称', trigger: 'blur' }],
-                address: [{ required: true, message: '请选择活动地点', trigger: 'blur' }],
+                address: [{ required: true, message: '请输入活动地点', trigger: 'blur' }],
                 quantity: [{ required: true, message: '请输入分组节目数量', trigger: 'blur' }],
                 duration: [{ required: true, message: '请输入单个节目时长', trigger: 'blur' }],
                 morning: [
@@ -463,13 +457,19 @@ export default {
             return '';
         },
         beforeGetData() {
-            return {
+            let data = {
                 search: this.search,
                 sort: 'date,asc;startTime,asc',
                 query: {
                     performanceId: this.form.performanceId
                 }
             };
+            if (this.review) {
+                data.query.auditTimes = this.performance.auditTimes;
+            } else {
+                data.query.auditTimes = 1;
+            }
+            return data;
         },
         toggleMultipleMode(multipleMode) {
             this.multipleMode = multipleMode;
@@ -490,7 +490,7 @@ export default {
             this.$refs.public.init(row.id);
         },
         programme(row) {
-            if (this.performance.online) {
+            if (this.online) {
                 this.$router.push({
                     path: '/progGroupOnlineList',
                     query: {
@@ -685,6 +685,15 @@ export default {
                         this.$message.error(e.error);
                     }
                 });
+        },
+        canEdit() {
+            let can = this.performance.status == 'UNDER_REVIEW' || this.performance.status == 'ARRANGE';
+            if (this.review) {
+                can &= this.performance.auditTimes > 1;
+            } else {
+                can &= this.performance.auditTimes == 1;
+            }
+            return can;
         }
     }
 };

+ 2 - 3
src/main/vue/src/views/performance/ProgrammeList.vue

@@ -302,6 +302,7 @@ import ProgrammeLog from '@/components/ProgrammeLog.vue';
 export default {
     name: 'ProgrammeList',
     mixins: [pageableTable, delChild],
+    props: ['review'],
     data() {
         return {
             multipleMode: false,
@@ -500,10 +501,8 @@ export default {
             if (this.performanceId) {
                 data.query.performanceId = this.performanceId;
             }
-            if (this.$route.query.review) {
+            if (this.review) {
                 data.query.programmeStatus = 'SUBMIT';
-            } else {
-                data.query.programmeStatus = '';
             }
             return data;
         },

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

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

+ 4 - 739
src/main/vue/src/views/performance/review/ProgrammeList.vue

@@ -1,747 +1,12 @@
 <template>
-    <div class="list-view">
-        <div class="filters-container">
-            <el-form :model="form" inline size="mini" label-width="100px">
-                <el-row>
-                    <el-col :span="8">
-                        <el-form-item label="展演活动名称">
-                            <el-select
-                                v-model="performanceId"
-                                clearable
-                                filterable
-                                placeholder="展演活动名称"
-                                style="width: 100%"
-                            >
-                                <el-option
-                                    v-for="item in performances"
-                                    :key="item.value"
-                                    :label="item.label"
-                                    :value="item.value"
-                                >
-                                </el-option>
-                            </el-select>
-                        </el-form-item>
-                    </el-col>
-                    <el-col :span="8">
-                        <el-form-item label="考级机构名称">
-                            <el-select
-                                v-model="form.gradingOrganizationId"
-                                clearable
-                                filterable
-                                placeholder="考级机构"
-                                style="width: 100%"
-                            >
-                                <el-option
-                                    v-for="item in gradingOrganizationIdOptions"
-                                    :key="item.value"
-                                    :label="item.label"
-                                    :value="item.value"
-                                >
-                                </el-option>
-                            </el-select>
-                        </el-form-item>
-                    </el-col>
-                    <el-col :span="8">
-                        <el-form-item label="承办单位名称">
-                            <el-select
-                                v-model="form.organizationId"
-                                clearable
-                                filterable
-                                placeholder="承办单位"
-                                style="width: 100%"
-                            >
-                                <el-option
-                                    v-for="item in organizationIdOptions"
-                                    :key="item.value"
-                                    :label="item.label"
-                                    :value="item.value"
-                                >
-                                </el-option>
-                            </el-select>
-                        </el-form-item>
-                    </el-col>
-                </el-row>
-                <el-row>
-                    <el-col :span="8"
-                        ><el-form-item label="考级点名称">
-                            <el-input placeholder="考级点名称" v-model="search" clearable></el-input> </el-form-item
-                    ></el-col>
-
-                    <el-col :span="8">
-                        <el-form-item label="参赛专业">
-                            <el-cascader
-                                ref="artCascader"
-                                style="width: 100%"
-                                v-model="form.specialtyId"
-                                :props="optionProps"
-                                :options="artTypes"
-                                :show-all-levels="false"
-                                placeholder="请选择专业"
-                                clearable
-                            >
-                            </el-cascader>
-                        </el-form-item>
-                    </el-col>
-                    <el-col :span="8"
-                        ><el-form-item label="参赛组别">
-                            <el-select v-model="form.competitionGroup" clearable filterable placeholder="参赛组别">
-                                <el-option
-                                    v-for="item in competitionGroupOptions"
-                                    :key="item.value"
-                                    :label="item.label"
-                                    :value="item.value"
-                                >
-                                </el-option>
-                            </el-select> </el-form-item
-                    ></el-col>
-                    <el-col :span="8"
-                        ><el-form-item label="参赛级别" v-if="form.competitionGroup">
-                            <el-select
-                                v-model="form.levelSettingId"
-                                clearable
-                                filterable
-                                placeholder="参赛级别"
-                                style="width: 100%"
-                                v-if="form.competitionGroup == 'SINGLE'"
-                            >
-                                <el-option
-                                    v-for="item in levelSingleOptions"
-                                    :key="item.value"
-                                    :label="item.label"
-                                    :value="item.value"
-                                >
-                                    <span style="float: left">{{ item.label }}</span>
-                                    <span style="float: right; color: #8492a6; font-size: 13px">{{ item.desc }}</span>
-                                </el-option>
-                            </el-select>
-                            <el-select
-                                v-model="form.levelSettingId"
-                                clearable
-                                filterable
-                                placeholder="请选择"
-                                style="width: 100%"
-                                v-else
-                            >
-                                <el-option
-                                    v-for="item in levelCollectiveOptions"
-                                    :key="item.value"
-                                    :label="item.label"
-                                    :value="item.value"
-                                >
-                                    <span style="float: left">{{ item.label }}</span>
-                                    <span style="float: right; color: #8492a6; font-size: 13px">{{ item.desc }}</span>
-                                </el-option>
-                            </el-select>
-                        </el-form-item></el-col
-                    >
-                </el-row>
-                <el-form-item>
-                    <el-button @click="getData" type="primary" icon="el-icon-search">查询 </el-button>
-                    <el-button @click="clearSearch" type="primary">清空 </el-button>
-                    <!-- <el-button @click="addRow" type="primary" icon="el-icon-plus">添加 </el-button> -->
-                    <el-button
-                        @click="download"
-                        type="primary"
-                        icon="el-icon-download"
-                        :loading="downloading"
-                        :disabled="totalElements < 1"
-                        >导出
-                    </el-button>
-                </el-form-item>
-            </el-form>
-        </div>
-        <el-table
-            :data="tableData"
-            row-key="id"
-            ref="table"
-            empty-text="加载中..."
-            header-row-class-name="table-header-row"
-            header-cell-class-name="table-header-cell"
-            row-class-name="table-row"
-            cell-class-name="table-cell"
-            :height="tableHeight"
-        >
-            <el-table-column v-if="multipleMode" align="center" type="selection" width="50"> </el-table-column>
-            <el-table-column prop="id" label="节目编号" width="80" fixed="left"> </el-table-column>
-            <el-table-column prop="name" label="节目名称" fixed="left"> </el-table-column>
-            <el-table-column prop="specialty" label="参赛专业"> </el-table-column>
-            <el-table-column
-                prop="competitionGroup"
-                label="参赛组别"
-                :formatter="competitionGroupFormatter"
-                min-width="70"
-            >
-            </el-table-column>
-            <el-table-column prop="level" label="参赛级别" min-width="70"> </el-table-column>
-            <!-- <el-table-column prop="durationOfWork" label="作品时长" min-width="70"> </el-table-column> -->
-            <el-table-column prop="quantity" label="参赛人数" min-width="70"> </el-table-column>
-            <el-table-column prop="contact" label="联系人" min-width="68"> </el-table-column>
-            <el-table-column prop="phone" label="联系电话" min-width="95"> </el-table-column>
-            <el-table-column prop="gradingOrganization" label="考级机构" show-overflow-tooltip min-width="160">
-            </el-table-column>
-            <el-table-column prop="organization" label="承办单位" min-width="160"> </el-table-column>
-            <el-table-column prop="examPoint" label="考级点" min-width="160"> </el-table-column>
-            <el-table-column
-                prop="programmeStatus"
-                label="节目状态"
-                min-width="180"
-                :formatter="programmeStatusFormatter"
-            ></el-table-column>
-            <el-table-column label="操作" align="left" fixed="right" min-width="260">
-                <template slot-scope="{ row }">
-                    <el-button @click="showRow(row)" size="mini" plain>查看</el-button>
-                    <el-button
-                        type="warning"
-                        @click="playImg(row)"
-                        v-if="
-                            row.specialty == '中国画' ||
-                                row.specialty == '美术' ||
-                                row.specialty == '西画' ||
-                                row.specialty == '书法' ||
-                                row.specialty == '漫画' ||
-                                row.specialty == '手工技艺' ||
-                                row.specialty == '摄影' ||
-                                row.specialty == '篆刻' ||
-                                row.specialty == '人物' ||
-                                row.specialty == '山水' ||
-                                row.specialty == '花鸟' ||
-                                row.specialty == '素描' ||
-                                row.specialty == '速写' ||
-                                row.specialty == '水粉画' ||
-                                row.specialty == '水彩画' ||
-                                row.specialty == '油画' ||
-                                row.specialty == '软笔书法' ||
-                                row.specialty == '硬笔书法' ||
-                                row.specialty == '剪纸' ||
-                                row.specialty == '泥塑' ||
-                                row.specialty == '年画' ||
-                                row.specialty == '皮影制作' ||
-                                row.specialty == '陶艺' ||
-                                row.specialty == '染织' ||
-                                row.specialty == '版画'
-                        "
-                        size="mini"
-                        plain
-                        >浏览图片</el-button
-                    >
-                    <el-button type="warning" @click="playVideo(row)" v-else size="mini" plain>浏览视频</el-button>
-                    <el-button
-                        @click="audit(row, 'AUDIT_FAILED')"
-                        type="danger"
-                        size="mini"
-                        plain
-                        v-if="row.programmeStatus == 'SUBMIT' && performance.auditTimes == 0"
-                        >不通过</el-button
-                    >
-                    <el-button
-                        @click="audit(row, 'SUBMIT')"
-                        type="info"
-                        size="mini"
-                        plain
-                        v-if="row.programmeStatus == 'AUDIT_FAILED' && performance.auditTimes == 0"
-                        >撤回</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>
-        <div class="pagination-wrapper">
-            <!-- <div class="multiple-mode-wrapper">
-                <el-button v-if="!multipleMode" @click="toggleMultipleMode(true)">批量编辑</el-button>
-                <el-button-group v-else>
-                    <el-button @click="operation1">批量操作1</el-button>
-                    <el-button @click="operation2">批量操作2</el-button>
-                    <el-button @click="toggleMultipleMode(false)">取消</el-button>
-                </el-button-group>
-            </div> -->
-            <el-pagination
-                background
-                @size-change="onSizeChange"
-                @current-change="onCurrentChange"
-                :current-page="page"
-                :page-sizes="[10, 20, 30, 40, 50]"
-                :page-size="pageSize"
-                layout="total, sizes, prev, pager, next, jumper"
-                :total="totalElements"
-            >
-            </el-pagination>
-        </div>
-
-        <el-dialog title="二维码" :visible.sync="dialogCode" width="400px" center>
-            <div style="margin-left: 70px;">
-                <qrcode-vue :value="dialogUrl" :size="200" level="H" />
-            </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"
-                controls
-                style="height: 600px; width: 100%"
-                oncontextmenu="return false;"
-                ref="video"
-                v-if="showViedo"
-            >
-                您的浏览器不支持 video 标签。
-            </video>
-        </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>
+    <programme-list :review="true"></programme-list>
 </template>
 <script>
-import delChild from '@/mixins/delChild';
-import { mapState } from 'vuex';
-import pageableTable from '@/mixins/pageableTable';
-import QrcodeVue from 'qrcode.vue';
-import ProgrammeLog from '@/components/ProgrammeLog.vue';
+import ProgrammeList from '@/views/performance/ProgrammeList';
 export default {
-    name: 'ProgrammeList',
-    mixins: [pageableTable, delChild],
-    data() {
-        return {
-            multipleMode: false,
-            search: '',
-            url: '/programme/backAll',
-            downloading: false,
-            competitionGroupOptions: [
-                { label: '个人', value: 'SINGLE' },
-                { label: '集体', value: 'COLLECTIVE' }
-            ],
-            form: {},
-            levelSingleOptions: [],
-            levelCollectiveOptions: [],
-            dialogUrl: '',
-            dialogCode: false,
-            isShow: false,
-            gradingOrganizationIdOptions: [],
-            organizationIdOptions: [],
-            performanceId: '',
-            performances: [],
-            performance: {},
-            artTypes: [],
-            optionProps: {
-                value: 'id',
-                label: 'name',
-                children: 'children',
-                multiple: false,
-                emitPath: false,
-                checkStrictly: true,
-                expandTrigger: 'hover'
-            },
-            showViedo: false,
-            showImg: false,
-            videoUrl: '',
-            annex: '',
-            programmeStatusOptions: [
-                { label: '未提交', value: 'INITIAL' },
-                { label: '已提交', value: 'SUBMIT' },
-                { label: '初选未通过', value: 'AUDIT_FAILED' },
-                { label: '审核未通过', value: 'REVIEW_FAILED' }
-            ]
-        };
-    },
-    created() {
-        if (this.$route.query.pid) {
-            this.performanceId = Number(this.$route.query.pid);
-        }
-        this.$http
-            .post('/setting/byFlag', { flag: 3 })
-            .then(res => {
-                if (res.length > 0) {
-                    res.forEach(item => {
-                        this.levelSingleOptions.push({
-                            label: item.name,
-                            value: item.id,
-                            desc: item.code
-                        });
-                    });
-                }
-            })
-            .catch(e => {
-                console.log(e);
-                this.$message.error(e.error);
-            });
-        this.$http
-            .post('/setting/byFlag', { flag: 4 })
-            .then(res => {
-                if (res.length > 0) {
-                    res.forEach(item => {
-                        this.levelCollectiveOptions.push({
-                            label: item.name,
-                            value: item.id,
-                            desc: item.code
-                        });
-                    });
-                }
-            })
-            .catch(e => {
-                console.log(e);
-                this.$message.error(e.error);
-            });
-        this.$http
-            .post('/gradingOrganization/all', { size: 1000, query: { del: false } }, { body: 'json' })
-            .then(res => {
-                if (res.content.length > 0) {
-                    res.content.forEach(item => {
-                        this.gradingOrganizationIdOptions.push({
-                            label: item.name,
-                            value: item.id
-                        });
-                    });
-                }
-            })
-            .catch(e => {
-                console.log(e);
-                this.$message.error(e.error);
-            });
-        this.$http
-            .post('/organization/all', { size: 1000, query: { del: false } }, { body: 'json' })
-            .then(res => {
-                if (res.content.length > 0) {
-                    res.content.forEach(item => {
-                        this.organizationIdOptions.push({
-                            label: item.name,
-                            value: item.id
-                        });
-                    });
-                }
-            })
-            .catch(e => {
-                console.log(e);
-                this.$message.error(e.error);
-            });
-        this.$http
-            .post(
-                '/performance/all',
-                {
-                    size: 1000,
-                    sort: 'year,desc',
-                    query: {
-                        publish: true
-                    }
-                },
-                { body: 'json' }
-            )
-            .then(res => {
-                if (res.content.length > 0) {
-                    res.content.forEach(item => {
-                        this.performances.push({
-                            label: item.name,
-                            value: item.id
-                        });
-                    });
-                    this.performanceId = res.content[0].id;
-                    this.performance = res.content[0];
-                    this.getData();
-                }
-            })
-            .catch(e => {
-                console.log(e);
-                this.$message.error(e.error);
-            });
-        this.$http
-            .post('/artType/allList')
-            .then(res => {
-                this.artTypes = this.delChild(res);
-            })
-            .catch(e => {
-                console.log(e);
-            });
-    },
     components: {
-        QrcodeVue,
-        ProgrammeLog
-    },
-    computed: {
-        selection() {
-            return this.$refs.table.selection.map(i => i.id);
-        }
-    },
-    methods: {
-        programmeStatusFormatter(row, column, cellValue, index) {
-            let selectedOption = this.programmeStatusOptions.find(i => i.value === cellValue);
-            if (selectedOption) {
-                return selectedOption.label;
-            }
-            return '';
-        },
-        competitionGroupFormatter(row, column, cellValue, index) {
-            let selectedOption = this.competitionGroupOptions.find(i => i.value === cellValue);
-            if (selectedOption) {
-                return selectedOption.label;
-            }
-            return '';
-        },
-        beforeGetData() {
-            let data = {
-                sort: 'createdAt,desc',
-                query: {
-                    programmeStatus: 'SUBMIT'
-                }
-            };
-            if (this.form.competitionGroup) {
-                data.query.competitionGroup = this.form.competitionGroup;
-            }
-            if (this.form.levelSettingId) {
-                data.query.levelSettingId = this.form.levelSettingId;
-            }
-            if (this.form.gradingOrganizationId) {
-                data.query.gradingOrganizationId = this.form.gradingOrganizationId;
-            }
-            if (this.form.organizationId) {
-                data.query.organizationId = this.form.organizationId;
-            }
-            if (this.form.specialtyId) {
-                data.query.code = this.getCode(this.form.specialtyId);
-            }
-            if (this.performanceId) {
-                data.query.performanceId = this.performanceId;
-            }
-            return data;
-        },
-        toggleMultipleMode(multipleMode) {
-            this.multipleMode = multipleMode;
-            if (!multipleMode) {
-                this.$refs.table.clearSelection();
-            }
-        },
-        addRow() {
-            this.$router.push({
-                path: '/programmeEdit',
-                query: {
-                    ...this.$route.query
-                }
-            });
-        },
-        showRow(row) {
-            this.isShow = true;
-            this.$refs.public.dataApi(row.id);
-        },
-        download() {
-            this.downloading = true;
-
-            let data = {
-                sort: 'createdAt,desc',
-                query: {}
-            };
-            if (this.form.competitionGroup) {
-                data.query.competitionGroup = this.form.competitionGroup;
-            }
-            if (this.form.levelSettingId) {
-                data.query.levelSettingId = this.form.levelSettingId;
-            }
-            if (this.form.gradingOrganizationId) {
-                data.query.gradingOrganizationId = this.form.gradingOrganizationId;
-            }
-            if (this.organizationId) {
-                data.query.form.organizationId = this.form.organizationId;
-            }
-            if (this.form.specialtyId) {
-                data.query.code = this.getCode(this.form.specialtyId);
-            }
-            if (this.performanceId) {
-                data.query.performanceId = this.performanceId;
-            }
-
-            this.$axios
-                .get('/programme/excel', {
-                    responseType: 'blob',
-                    params: data
-                })
-                .then(res => {
-                    console.log(res);
-                    this.downloading = false;
-                    const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
-                    const link = document.createElement('a');
-                    link.href = downloadUrl;
-                    link.setAttribute('download', res.headers['content-disposition'].split('filename=')[1]);
-                    document.body.appendChild(link);
-                    link.click();
-                    link.remove();
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.downloading = false;
-                    this.$message.error(e.error);
-                });
-        },
-        operation1() {
-            this.$notify({
-                title: '提示',
-                message: this.selection
-            });
-        },
-        operation2() {
-            this.$message('操作2');
-        },
-        deleteRow(row) {
-            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
-                .then(() => {
-                    return this.$http.post(`/programme/del/${row.id}`);
-                })
-                .then(() => {
-                    this.$message.success('删除成功');
-                    this.getData();
-                })
-                .catch(e => {
-                    if (e !== 'cancel') {
-                        this.$message.error(e.error);
-                    }
-                });
-        },
-        showCode(row) {
-            this.dialogCode = true;
-            this.dialogUrl =
-                'http://wljtest.izouma.com/h5/home?performanceId=' + row.performanceId + '&programmeId=' + row.id;
-        },
-        clearSearch() {
-            // this.competitionGroup = '';
-            // this.levelSettingId = '';
-            // this.gradingOrganizationId = '';
-            // this.organizationId = '';
-            // this.specialtyId = '';
-            this.form = {};
-            this.getData();
-        },
-        getCode(value) {
-            return this.forTree(this.artTypes, value).code;
-        },
-        forTree(list, value) {
-            var result = null;
-            if (!list) {
-                return;
-            }
-            for (var i in list) {
-                if (result !== null) {
-                    break;
-                }
-                var item = list[i];
-                if (item.id == value) {
-                    result = item;
-                    break;
-                } else if (item.children && item.children.length > 0) {
-                    result = this.forTree(item.children, value);
-                }
-            }
-            return result;
-        },
-        // closeEvent() {
-        //     document.exitPictureInPicture();
-        // },
-        playVideo(row) {
-            if (row.video) {
-                this.showViedo = true;
-                this.videoUrl = row.video;
-            } else if (row.annex) {
-                this.showImg = true;
-                this.annex = row.annex;
-            } else {
-                this.$message.success('暂无作品');
-            }
-        },
-        playImg(row) {
-            if (row.annex) {
-                this.showImg = true;
-                this.annex = row.annex;
-            } else {
-                this.$message.success('暂无图片');
-            }
-        },
-        audit(row, status) {
-            this.$set(row, 'loading', true);
-            let str = '确认该节目未通过初选?',
-                remark = '未通过考级机构初选。';
-            if (status == 'SUBMIT') {
-                str = '确认撤回,撤回后可参加后续的审核。';
-                remark = '撤消未通过考级机构初选。';
-            }
-            this.$confirm(str, '提示', {
-                confirmButtonText: '确认',
-                cancelButtonText: '取消',
-                type: 'warning'
-            })
-                .then(() => {
-                    this.$http
-                        .post('/programme/firstAudit', {
-                            id: row.id,
-                            status: status,
-                            remark: remark
-                        })
-                        .then(res => {
-                            this.$set(row, 'loading', false);
-                            this.$message.success('操作成功');
-                            this.getData();
-                        })
-                        .catch(e => {
-                            console.log(e);
-                            this.$set(row, 'loading', false);
-                            this.$message.error(e.error);
-                        });
-                })
-                .catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消'
-                    });
-                    this.$set(row, 'loading', false);
-                });
-        }
+        ProgrammeList
     }
 };
 </script>
-<style lang="less" scoped>
-.right {
-    float: right;
-}
-/deep/.el-form-item--mini.el-form-item,
-.el-form-item--small.el-form-item {
-    margin-bottom: 10px;
-}
-.videoDialog {
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    .el-dialog {
-        max-width: 900px;
-        margin-top: 0px;
-
-        .close {
-            position: absolute;
-            right: 0px;
-            top: -42px;
-            width: 71px;
-            height: 32px;
-            background: #00000015;
-
-            font-size: 12px;
-            color: #fdffff;
-            line-height: 32px;
-            text-align: center;
-            cursor: pointer;
-
-            &:hover {
-                background: #00000055;
-            }
-        }
-    }
-    .el-dialog__header {
-        display: none;
-    }
-
-    .el-dialog__body {
-        padding: 0;
-
-        video {
-            display: block;
-            height: auto;
-            width: 100%;
-            outline: none;
-        }
-    }
-}
-</style>
+<style lang="less" scoped></style>

+ 1 - 1
src/test/java/com/izouma/wenlvju/repo/UserRepoTest.java

@@ -74,7 +74,7 @@ public class UserRepoTest {
 
     @Test
     public void test3() {
-        System.out.println(jwtTokenUtil.generateToken(JwtUserFactory.create(userRepo.findById(281L)
+        System.out.println(jwtTokenUtil.generateToken(JwtUserFactory.create(userRepo.findById(10847L)
                 .orElseThrow(new BusinessException("用户不存在")))));
     }