|
@@ -3,7 +3,12 @@
|
|
|
<div class="filters-container">
|
|
<div class="filters-container">
|
|
|
<!-- <el-input placeholder="输入关键字" v-model="search" clearable class="filter-item"></el-input>
|
|
<!-- <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="getData" type="primary" icon="el-icon-search" class="filter-item">搜索 </el-button> -->
|
|
|
- <el-button @click="openArrangement" type="primary" class="filter-item" :loading="loading"
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ @click="openArrangement"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ class="filter-item"
|
|
|
|
|
+ :loading="loading"
|
|
|
|
|
+ v-if="totalElements > 0"
|
|
|
>自动编排
|
|
>自动编排
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button @click="distribute('已成功通知')" type="primary" class="filter-item">一键通知 </el-button>
|
|
<el-button @click="distribute('已成功通知')" type="primary" class="filter-item">一键通知 </el-button>
|
|
@@ -37,7 +42,9 @@
|
|
|
<el-table-column prop="contact" label="联系人"> </el-table-column>
|
|
<el-table-column prop="contact" label="联系人"> </el-table-column>
|
|
|
<el-table-column prop="phone" label="联系电话"> </el-table-column>
|
|
<el-table-column prop="phone" label="联系电话"> </el-table-column>
|
|
|
<el-table-column prop="status" label="状态" :formatter="statusFormatter"> </el-table-column>
|
|
<el-table-column prop="status" label="状态" :formatter="statusFormatter"> </el-table-column>
|
|
|
- <el-table-column prop="showTime" label="表演时间" min-width="120"> </el-table-column>
|
|
|
|
|
|
|
+ <el-table-column label="表演时间" min-width="120">
|
|
|
|
|
+ <template slot-scope="{ row }"> {{ row.showStartTime }} 至 {{ row.showEndTime }} </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="awards" label="奖项">
|
|
<el-table-column prop="awards" label="奖项">
|
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
|
<span v-if="row.awards != null"> {{ row.awards }} </span>
|
|
<span v-if="row.awards != null"> {{ row.awards }} </span>
|
|
@@ -199,6 +206,13 @@ export default {
|
|
|
computed: {
|
|
computed: {
|
|
|
selection() {
|
|
selection() {
|
|
|
return this.$refs.table.selection.map(i => i.id);
|
|
return this.$refs.table.selection.map(i => i.id);
|
|
|
|
|
+ },
|
|
|
|
|
+ saveOtherJson() {
|
|
|
|
|
+ const timeList = [...this.timeList].filter(item => {
|
|
|
|
|
+ return !!item.composition || !!item.showStartTime || !!item.showEndTime || !!item.organizationId;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ return JSON.stringify(timeList);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -330,11 +344,11 @@ export default {
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
this.$http
|
|
this.$http
|
|
|
.post('/performanceApply/saveArrangement', {
|
|
.post('/performanceApply/saveArrangement', {
|
|
|
- applies: ''
|
|
|
|
|
|
|
+ applies: this.saveOtherJson
|
|
|
})
|
|
})
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
- this.$message.success('OK');
|
|
|
|
|
|
|
+ this.$message.success('自动编排成功');
|
|
|
this.getData();
|
|
this.getData();
|
|
|
this.dialogArrangement = false;
|
|
this.dialogArrangement = false;
|
|
|
})
|
|
})
|
|
@@ -416,7 +430,14 @@ export default {
|
|
|
...endInfo
|
|
...endInfo
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- this.timeList = timeList;
|
|
|
|
|
|
|
+ this.timeList = this.sortByKey(timeList);
|
|
|
|
|
+ },
|
|
|
|
|
+ sortByKey(array) {
|
|
|
|
|
+ return array.sort(function(a, b) {
|
|
|
|
|
+ var x = a['showStartTime'];
|
|
|
|
|
+ var y = b['showStartTime'];
|
|
|
|
|
+ return x < y ? -1 : x > y ? 1 : 0;
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|