|
@@ -0,0 +1,329 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div class="list-view">
|
|
|
|
|
+ <div class="filters-container">
|
|
|
|
|
+ <!-- <el-input placeholder="输入关键字" v-model="search" clearable class="filter-item"></el-input>
|
|
|
|
|
+ <el-button @click="getData" type="primary" icon="el-icon-search" class="filter-item">搜索 </el-button>
|
|
|
|
|
+ <el-button @click="addRow" type="primary" icon="el-icon-plus" class="filter-item">添加 </el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ @click="download"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ icon="el-icon-download"
|
|
|
|
|
+ :loading="downloading"
|
|
|
|
|
+ class="filter-item"
|
|
|
|
|
+ >导出EXCEL
|
|
|
|
|
+ </el-button> -->
|
|
|
|
|
+ <el-form :model="form" :rules="rules" ref="form" inline label-width="100px">
|
|
|
|
|
+ <el-form-item label="活动名称">
|
|
|
|
|
+ <el-select v-model="form.performanceId" 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-form-item label="活动日期">
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ v-model="dateRange"
|
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
|
+ type="daterange"
|
|
|
|
|
+ range-separator="至"
|
|
|
|
|
+ start-placeholder="开始日期"
|
|
|
|
|
+ end-placeholder="结束日期"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-date-picker>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="活动地点">
|
|
|
|
|
+ <el-select v-model="form.address">
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="(item, index) in addresses"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ :value="item"
|
|
|
|
|
+ :label="item"
|
|
|
|
|
+ ></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="时间安排">
|
|
|
|
|
+ <el-checkbox v-model="form.morning">上午</el-checkbox>
|
|
|
|
|
+ <el-checkbox v-model="form.afternoon">下午</el-checkbox>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item>
|
|
|
|
|
+ <el-button type="primary">查询</el-button>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ :data="tableData"
|
|
|
|
|
+ row-key="id"
|
|
|
|
|
+ ref="table"
|
|
|
|
|
+ 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="ID" width="100"> </el-table-column> -->
|
|
|
|
|
+ <el-table-column prop="date" label="活动日期"> </el-table-column>
|
|
|
|
|
+ <el-table-column prop="address" label="活动地点"> </el-table-column>
|
|
|
|
|
+ <el-table-column prop="name" label="分组名称" min-width="130"> </el-table-column>
|
|
|
|
|
+ <el-table-column label="时间安排" min-width="100">
|
|
|
|
|
+ <template slot-scope="{ row }"> {{ row.startTime }}-{{ row.endTime }} </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="quantity" label="节目数量"> </el-table-column>
|
|
|
|
|
+ <!-- <el-table-column prop="duration" label="节目时长"> </el-table-column> -->
|
|
|
|
|
+ <el-table-column label="参赛专业">
|
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
|
+ {{ row.specialtyName.join(',') }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </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="320">
|
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
|
+ <el-button @click="editRow(row)" type="primary" size="mini" plain>编辑</el-button>
|
|
|
|
|
+ <el-button @click="programme(row)" 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 :visible.sync="showProgramme" width="80%" title="未分组节目" center>
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ :data="unGrouped"
|
|
|
|
|
+ row-key="id"
|
|
|
|
|
+ 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="300"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-table-column prop="name" label="节目名称"> </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="考级点"> </el-table-column>
|
|
|
|
|
+ <el-table-column label="操作">
|
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
|
+ <el-button @click="choose(row)" size="mini" type="primary">增加</el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+<script>
|
|
|
|
|
+import { mapState } from 'vuex';
|
|
|
|
|
+import pageableTable from '@/mixins/pageableTable';
|
|
|
|
|
+
|
|
|
|
|
+export default {
|
|
|
|
|
+ name: 'ArrangeJudgeList',
|
|
|
|
|
+ mixins: [pageableTable],
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ multipleMode: false,
|
|
|
|
|
+ search: '',
|
|
|
|
|
+ url: '/arrange/all',
|
|
|
|
|
+ downloading: false,
|
|
|
|
|
+ form: {},
|
|
|
|
|
+ performances: [],
|
|
|
|
|
+ addresses: [],
|
|
|
|
|
+ dateRange: '',
|
|
|
|
|
+ rules: {
|
|
|
|
|
+ performanceId: [{ required: true, message: '请选择活动名称', trigger: 'blur' }],
|
|
|
|
|
+ address: [{ required: true, message: '请选择活动地点', trigger: 'blur' }],
|
|
|
|
|
+ quantity: [{ required: true, message: '请输入分组节目数量', trigger: 'blur' }],
|
|
|
|
|
+ duration: [{ required: true, message: '请输入单个节目时长', trigger: 'blur' }]
|
|
|
|
|
+ },
|
|
|
|
|
+ showProgramme: false,
|
|
|
|
|
+ unGrouped: [],
|
|
|
|
|
+ competitionGroupOptions: [
|
|
|
|
|
+ { label: '个人', value: 'SINGLE' },
|
|
|
|
|
+ { label: '集体', value: 'COLLECTIVE' }
|
|
|
|
|
+ ]
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ created() {
|
|
|
|
|
+ this.$http
|
|
|
|
|
+ .post(
|
|
|
|
|
+ '/performance/all',
|
|
|
|
|
+ {
|
|
|
|
|
+ size: 100,
|
|
|
|
|
+ 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
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ this.$message.error(e.error);
|
|
|
|
|
+ });
|
|
|
|
|
+ this.$http
|
|
|
|
|
+ .post(
|
|
|
|
|
+ '/performanceSchedule/all',
|
|
|
|
|
+ { size: 100, query: { performanceId: this.form.performanceId } },
|
|
|
|
|
+ { body: 'json' }
|
|
|
|
|
+ )
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ if (res.content.length > 0) {
|
|
|
|
|
+ res.content.forEach(item => {
|
|
|
|
|
+ this.addresses.push(item.address);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ this.$message.error(e.error);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ selection() {
|
|
|
|
|
+ return this.$refs.table.selection.map(i => i.id);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ competitionGroupFormatter(row, column, cellValue, index) {
|
|
|
|
|
+ let selectedOption = this.competitionGroupOptions.find(i => i.value === cellValue);
|
|
|
|
|
+ if (selectedOption) {
|
|
|
|
|
+ return selectedOption.label;
|
|
|
|
|
+ }
|
|
|
|
|
+ return '';
|
|
|
|
|
+ },
|
|
|
|
|
+ beforeGetData() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ search: this.search,
|
|
|
|
|
+ sort: 'date,asc;startTime,asc',
|
|
|
|
|
+ query: {
|
|
|
|
|
+ performanceId: this.form.performanceId
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ toggleMultipleMode(multipleMode) {
|
|
|
|
|
+ this.multipleMode = multipleMode;
|
|
|
|
|
+ if (!multipleMode) {
|
|
|
|
|
+ this.$refs.table.clearSelection();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ addRow() {
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: '/arrangeEdit',
|
|
|
|
|
+ query: {
|
|
|
|
|
+ ...this.$route.query
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ editRow(row) {
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: '/arrangeEdit',
|
|
|
|
|
+ query: {
|
|
|
|
|
+ id: row.id
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ programme(row) {
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: '/programmeGroupList',
|
|
|
|
|
+ query: {
|
|
|
|
|
+ aid: row.id
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ download() {
|
|
|
|
|
+ this.downloading = true;
|
|
|
|
|
+ this.$axios
|
|
|
|
|
+ .get('/arrange/excel', {
|
|
|
|
|
+ responseType: 'blob',
|
|
|
|
|
+ params: { size: 10000 }
|
|
|
|
|
+ })
|
|
|
|
|
+ .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(`/arrange/del/${row.id}`);
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.$message.success('删除成功');
|
|
|
|
|
+ this.getData();
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ if (e !== 'cancel') {
|
|
|
|
|
+ this.$message.error(e.error);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+</script>
|
|
|
|
|
+<style lang="less" scoped></style>
|