From 0bb447f57ab45b86db18b0cfd7c2fda36da817d3 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 11 三月 2025 19:09:27 +0800
Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/center-lims-before-ruoyi into dev
---
src/views/CNAS/resourceDemand/device/component/resource-reservation.vue | 48 +++++++++++++++++++++---------------------------
1 files changed, 21 insertions(+), 27 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/device/component/resource-reservation.vue b/src/views/CNAS/resourceDemand/device/component/resource-reservation.vue
index b23611b..7f3806b 100644
--- a/src/views/CNAS/resourceDemand/device/component/resource-reservation.vue
+++ b/src/views/CNAS/resourceDemand/device/component/resource-reservation.vue
@@ -2,8 +2,7 @@
<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"
@@ -19,7 +18,7 @@
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">
@@ -134,7 +133,6 @@
}
},
data() {
-
return {
timeSlots: ['09:00-12:00', '13:00-18:00', '18:00-22:00'],
dates: [],
@@ -154,7 +152,6 @@
startTime: '',
endTime: '',
entity: {
- deviceName: null,
laboratoryName: '',
storagePoint: '',
},
@@ -169,15 +166,6 @@
reservationSpecification: ''
},
total: '',
- componentData: {
- entity: {
- largeCategory: null,
- orderBy: {
- field: 'id',
- order: 'asc'
- }
- },
- },
yuyue: null,
yuyuetime: '',
rules: {
@@ -202,14 +190,12 @@
this.clickSidebar(newVal)
}
},
-
created() {
this.clickSidebar(this.clickNodeVal)
this.initDate();
},
mounted() {
- this.getStartTimeAndEndTime();
-
+ // this.getStartTimeAndEndTime();
},
methods: {
isBeforeDate() {
@@ -218,7 +204,7 @@
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)
}
@@ -238,7 +224,7 @@
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) {
@@ -312,12 +298,16 @@
getStartTimeAndEndTime() {
//鏌ヨ閫昏緫
this.tableLoading = true;
- reservationSelectDevice({
- current: this.currentPage,
- size: this.pageSize,
- ...this.entity,
- laboratoryNameIsNull: this.laboratoryNameIsNull
- }).then(res => {
+ const params = {
+ current: this.currentPage,
+ size: this.pageSize,
+ 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;
@@ -326,17 +316,20 @@
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;
@@ -393,9 +386,10 @@
}
});
},
+ // 棰勫畾淇℃伅鏌ヨ
getList() {
const params = {
- selectReservationParameterPage: this.yuyue.id,
+ deviceId: this.yuyue.id,
reservationTime: this.yuyuetime,
specificTime: this.yuyue.time,
}
--
Gitblit v1.9.3