江西小程序管理端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

204 lines
4.3 KiB

<template>
<view class="pageBgImg">
<topNavbar title="排课计划"></topNavbar>
<view class="pad">
<view class="card">
<view class="row">
<view class="lab">计划日期</view>
<view class="rightCon" @click="show=true">
<view class="inputBox">
<input type="text" v-model="form.classDate" placeholder="请选择" disabled style="pointer-events: none;">
</view>
<view class="icon">
<u-icon name="arrow-right" :size="12" :color="'#696B72'"></u-icon>
</view>
</view>
</view>
<view class="row">
<view class="lab">选择开课时间段</view>
<view class="rightCon" @click="$goPage('/pages/recordEntry/operate/mySchedule/mould/mould')">
<view class="inputBox">
<input type="text" v-model="form.input1" placeholder="请选择" disabled style="pointer-events: none;">
</view>
<view class="icon">
<u-icon name="arrow-right" :size="12" :color="'#696B72'"></u-icon>
</view>
</view>
</view>
<view class="blueBg">
<view class="time_row hui">
<text>时间段</text> <text>最多人数</text>
</view>
<view class="time_row">
<text>7:00-8:00</text> <text>4人</text>
</view>
<view class="time_row">
<text>8:00-9:00</text> <text>4人</text>
</view>
</view>
<view class="row">
<view class="lab">训练科目</view>
<view class="rightCon">
<myRadio @changeRadio="changeRadio" :radioData="radiolist1"></myRadio>
</view>
</view>
<view class="row">
<view class="lab">教练车</view>
<view class="rightCon">
<myRadio @changeRadio="changeRadio" :radioData="radiolist2"></myRadio>
</view>
</view>
<view class="row">
<view class="lab">开放范围</view>
<view class="rightCon">
<myRadio @changeRadio="changeRadio" :radioData="radiolist3"></myRadio>
</view>
</view>
</view>
<view class="btnBg">确认发布</view>
</view>
<u-datetime-picker
:show="show"
:minDate="minDate"
:maxDate="maxDate"
mode="date"
@confirm="changeDate"
></u-datetime-picker>
</view>
</template>
<script>
import { scheduleClassCreate, getClassDateLimit } from '@/config/api.js'
export default {
data() {
return {
minDate: null,
maxDate: null,
show: false,
form: {
classDate: '',
radio1: 1
},
radiolist1: [{
name: '科目二',
id: 1,
disabled: false
},
{
name: '科目三',
id: 2,
disabled: false
},
],
radiolist2: [{
name: '浙A8888',
id: 1,
disabled: false
},
{
name: '浙A8889',
id: 2,
disabled: false
},
],
radiolist3: [{
name: '我的学员',
id: 1,
disabled: false
},
{
name: '所有学员',
id: 2,
disabled: false
},
]
}
},
onLoad() {
this.getClassDateLimitFn()
},
methods: {
changeRadio(val) {
console.log(val)
},
// 选择日期
changeDate(val) {
this.form.classDate = this.$u.date(val.value, 'yyyy-mm-dd')
console.log(val)
},
// 发布排课计划
async scheduleClassCreateFn() {
let obj = {
coachId: this.vuex_coachId
}
const {data: res} = await scheduleClassCreate(obj)
},
// 获取排课日期范围
async getClassDateLimitFn() {
let obj = {
coachId: this.vuex_coachId
}
const {data: res} = await getClassDateLimit(obj)
this.minDate = new Date(res.beginDateLimit)*1 + 86400000
this.maxDate = new Date(res.endDateLimit)*1
}
}
}
</script>
<style lang="scss" scoped>
.card {
padding: 10rpx 28rpx;
.row {
display: flex;
justify-content: space-between;
padding: 26rpx 0;
.lab {
font-weight: 500;
}
}
}
.btnBg {
width: 396rpx;
margin: 120rpx auto 0 auto;
}
.rightCon {
display: flex;
align-items: center;
.icon {
margin-left: 10rpx;
}
.inputBox {
flex: 1;
input {
text-align: right;
font-size: 28rpx;
color: #333;
}
}
}
.blueBg {
background-color: #E8F3FE;
padding: 12rpx 32rpx;
border-radius: 16rpx;
text-align: center;
.time_row {
display: flex;
justify-content: space-between;
padding: 12rpx 0;
&.hui {
color: #ADADAD;
}
text {
width: 170rpx;
}
}
}
</style>