|
|
|
|
@ -24,7 +24,7 @@
|
|
|
|
|
<div>
|
|
|
|
|
<el-button type="primary" size="small" @click="select.page=1,getList()">查询</el-button>
|
|
|
|
|
<el-button type="primary" size="small" @click="resetSelect">重置</el-button>
|
|
|
|
|
|
|
|
|
|
<el-button type="primary" size="small" @click="updateTotal">批量调整</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
@ -35,24 +35,24 @@
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<xy-table :list="list" @pageIndexChange="pageIndexChange" @pageSizeChange="pageSizeChange" :total="total"
|
|
|
|
|
:table-item="table_item">
|
|
|
|
|
<template v-slot:start_time>
|
|
|
|
|
<el-table-column align='center' label="开始日期" header-align="center" width="120">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div v-if="scope.row.start_time">
|
|
|
|
|
{{scope.row.start_time.substring(0,10)}}
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:end_time>
|
|
|
|
|
<el-table-column align='center' label="结束日期" header-align="center" width="120">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div v-if="scope.row.end_time">
|
|
|
|
|
{{scope.row.end_time.substring(0,10)}}
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
:table-item="table_item">
|
|
|
|
|
<template v-slot:start_time>
|
|
|
|
|
<el-table-column align='center' label="开始日期" header-align="center" width="120">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div v-if="scope.row.start_time">
|
|
|
|
|
{{scope.row.start_time.substring(0,10)}}
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:end_time>
|
|
|
|
|
<el-table-column align='center' label="结束日期" header-align="center" width="120">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div v-if="scope.row.end_time">
|
|
|
|
|
{{scope.row.end_time.substring(0,10)}}
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- <template v-slot:appointments_count>
|
|
|
|
|
<el-table-column align='center' label="已预约次数" header-align="center" width="120">
|
|
|
|
|
@ -92,6 +92,8 @@
|
|
|
|
|
</xy-table>
|
|
|
|
|
</div>
|
|
|
|
|
<addCount ref="addCount" @refresh="getList"></addCount>
|
|
|
|
|
<updateCount ref="updateCount" @refresh="getList"></updateCount>
|
|
|
|
|
|
|
|
|
|
<showCount ref="showCount"></showCount>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
@ -99,8 +101,10 @@
|
|
|
|
|
<script>
|
|
|
|
|
import addCount from './components/addCount.vue';
|
|
|
|
|
import showCount from './components/showCount.vue';
|
|
|
|
|
import updateCount from './components/updateCount.vue';
|
|
|
|
|
import {
|
|
|
|
|
index
|
|
|
|
|
index,
|
|
|
|
|
update
|
|
|
|
|
} from '@/api/book/count.js'
|
|
|
|
|
import {
|
|
|
|
|
index as courseIndex
|
|
|
|
|
@ -108,7 +112,8 @@
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
addCount,
|
|
|
|
|
showCount
|
|
|
|
|
showCount,
|
|
|
|
|
updateCount
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
@ -142,12 +147,12 @@
|
|
|
|
|
label: '开始日期',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 120,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
prop: 'end_time',
|
|
|
|
|
label: '结束日期',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 120
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
prop: 'end_time',
|
|
|
|
|
label: '结束日期',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 120
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// prop: 'appointments_count',
|
|
|
|
|
@ -196,14 +201,14 @@
|
|
|
|
|
async getList() {
|
|
|
|
|
const res = await index({
|
|
|
|
|
page: this.select.page,
|
|
|
|
|
page_size: this.select.page_size,
|
|
|
|
|
filter:[{
|
|
|
|
|
key:'course_id',
|
|
|
|
|
op:'eq',
|
|
|
|
|
value:this.select.course_id
|
|
|
|
|
page_size: this.select.page_size,
|
|
|
|
|
filter: [{
|
|
|
|
|
key: 'course_id',
|
|
|
|
|
op: 'eq',
|
|
|
|
|
value: this.select.course_id
|
|
|
|
|
}],
|
|
|
|
|
name: this.select.name,
|
|
|
|
|
show_relation:['user','course']
|
|
|
|
|
name: this.select.name,
|
|
|
|
|
show_relation: ['user', 'course']
|
|
|
|
|
})
|
|
|
|
|
this.list = res.data
|
|
|
|
|
this.total = res.total
|
|
|
|
|
@ -212,6 +217,10 @@
|
|
|
|
|
this.$refs.addCount.setRow(row)
|
|
|
|
|
this.$refs.addCount.isShow = true
|
|
|
|
|
},
|
|
|
|
|
updateTotal() {
|
|
|
|
|
this.$refs.updateCount.setRow(this.course_options)
|
|
|
|
|
this.$refs.updateCount.isShow = true
|
|
|
|
|
},
|
|
|
|
|
showCounts(name) {
|
|
|
|
|
this.$refs.showCount.setName(name)
|
|
|
|
|
this.$refs.showCount.isShow = true
|
|
|
|
|
|