| | |
| | | <template> |
| | | <div class="role_manage"> |
| | | <el-row class="title"> |
| | | <el-col :span="8" style="text-align: left;">预定总览</el-col> |
| | | <el-col :span="16" style="text-align: right;padding-bottom:10px"> |
| | | <el-col :span="24" style="text-align: right;padding:10px 0"> |
| | | <el-date-picker |
| | | v-model="startTime" |
| | | format="yyyy-MM-dd" |
| | |
| | | size="mini" |
| | | type="date" |
| | | value-format="yyyy-MM-dd"/> |
| | | <el-button size="mini" type="primary" @click="ValidateAndQuery">查 询</el-button> |
| | | <el-button size="mini" type="primary" @click="ValidateAndQuery" style="margin-left: 10px">查 询</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="table-container"> |
| | |
| | | } |
| | | }, |
| | | data() { |
| | | |
| | | return { |
| | | timeSlots: ['09:00-12:00', '13:00-18:00', '18:00-22:00'], |
| | | dates: [], |
| | |
| | | startTime: '', |
| | | endTime: '', |
| | | entity: { |
| | | deviceName: null, |
| | | laboratoryName: '', |
| | | storagePoint: '', |
| | | }, |
| | |
| | | reservationSpecification: '' |
| | | }, |
| | | total: '', |
| | | componentData: { |
| | | entity: { |
| | | largeCategory: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'asc' |
| | | } |
| | | }, |
| | | }, |
| | | yuyue: null, |
| | | yuyuetime: '', |
| | | rules: { |
| | |
| | | this.clickSidebar(newVal) |
| | | } |
| | | }, |
| | | |
| | | created() { |
| | | this.clickSidebar(this.clickNodeVal) |
| | | this.initDate(); |
| | | }, |
| | | mounted() { |
| | | this.getStartTimeAndEndTime(); |
| | | |
| | | // this.getStartTimeAndEndTime(); |
| | | }, |
| | | methods: { |
| | | isBeforeDate() { |
| | |
| | | const appointment = this.appointment && this.appointment.split('-') |
| | | let appointment0 = '' |
| | | let appointment1 = '' |
| | | if (appointment !== '') { |
| | | if (appointment) { |
| | | appointment0 = appointment[0].slice(0, 2) |
| | | appointment1 = appointment[1].slice(0, 2) |
| | | } |
| | |
| | | if (!row || row.dateList === null || row.dateList === undefined || row.dateList === "") { |
| | | return '预约'; |
| | | } |
| | | var dateLst = row.dateList |
| | | const dateLst = row.dateList |
| | | for (const dateLstElement of dateLst) { |
| | | if (dateLstElement.date === date) { |
| | | if (dateLstElement.value === 0) { |
| | |
| | | getStartTimeAndEndTime() { |
| | | //查询逻辑 |
| | | this.tableLoading = true; |
| | | reservationSelectDevice({ |
| | | const params = { |
| | | current: this.currentPage, |
| | | size: this.pageSize, |
| | | ...this.entity, |
| | | laboratoryNameIsNull: this.laboratoryNameIsNull |
| | | }).then(res => { |
| | | starttime: this.startTime, |
| | | endtime: this.endTime, |
| | | laboratoryNameIsNull: this.laboratoryNameIsNull, |
| | | laboratoryName: this.entity.laboratoryName, |
| | | storagePoint: this.entity.storagePoint, |
| | | } |
| | | reservationSelectDevice(params).then(res => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data; |
| | |
| | | this.tableLoading = false; |
| | | }) |
| | | }, |
| | | // 打开预约弹框 |
| | | openModal(date, row) { |
| | | console.log('date', date); |
| | | console.log('row', row); |
| | | this.yuyue = row; |
| | | this.yuyuetime = date; |
| | | this.appointment = row.time |
| | | this.showModal = true; |
| | | this.getList(); |
| | | }, |
| | | // 打开新建预定弹框 |
| | | openAdd() { |
| | | this.addVisiable = true; |
| | | this.addReservation.deviceId = this.yuyue.id; |
| | | // this.addReservation.deviceNumber = this.yuyue.deviceNumber; |
| | | this.addReservation.deviceName = this.yuyue.deviceName; |
| | | this.addReservation.reservationTime = this.yuyuetime + " " + this.yuyue.time; |
| | | this.addReservation.specificTime = this.yuyue.time; |
| | |
| | | } |
| | | }); |
| | | }, |
| | | // 预定信息查询 |
| | | getList() { |
| | | const params = { |
| | | selectReservationParameterPage: this.yuyue.id, |
| | | deviceId: this.yuyue.id, |
| | | reservationTime: this.yuyuetime, |
| | | specificTime: this.yuyue.time, |
| | | } |