diff --git a/back/src/views/modules/activiti/RoomExamineAdmin.vue b/back/src/views/modules/activiti/RoomExamineAdmin.vue
index ac6de099..f5a7aaa6 100644
--- a/back/src/views/modules/activiti/RoomExamineAdmin.vue
+++ b/back/src/views/modules/activiti/RoomExamineAdmin.vue
@@ -232,6 +232,9 @@ export default {
id: '',
num: '',
file: '',
+ name: '',
+ roomName: '',
+ creator: '',
}
},
mounted() {
@@ -268,10 +271,12 @@ export default {
if (num == '1') {
this.dialogVisibleChuli = true
this.id = item.id
+ this.name = item.name
+ this.roomName = item.roomName
+ this.creator = item.creator
} else {
this.dialogVisible = true
this.$http.get(`bookMeeting/${item.id}`).then(({ data: res }) => {
- console.log(55555555)
this.file = res.data.file
})
}
@@ -283,6 +288,9 @@ export default {
auditViem: this.desc,
state: this.radio,
id: this.id,
+ name: this.name,
+ roomName: this.roomName,
+ creator: this.creator,
}
this.$http.put('/bookMeeting', query).then(({ data: res }) => {
this.dialogVisibleChuli = false
diff --git a/back/src/views/modules/myAgent/ConferenceRoom.vue b/back/src/views/modules/myAgent/ConferenceRoom.vue
index 6233aaf1..132875e9 100644
--- a/back/src/views/modules/myAgent/ConferenceRoom.vue
+++ b/back/src/views/modules/myAgent/ConferenceRoom.vue
@@ -246,7 +246,7 @@ export default {
],
area: [
{ required: true, message: '请输入会议室面积', trigger: 'blur' },
- { min: 1, type: 'number', trigger: 'blur' },
+ { min: 1, trigger: 'blur' },
],
description: [
{ required: true, message: '请填写描述内容', trigger: 'blur' },
diff --git a/front/src/utils/request.js b/front/src/utils/request.js
index 24446dc5..d96f4f78 100644
--- a/front/src/utils/request.js
+++ b/front/src/utils/request.js
@@ -11,8 +11,13 @@ import store from '@/store'
import qs from 'qs'
import router from '@/router'
// import { isArray } from '@/utils/validate'
-import { message } from 'ant-design-vue'
-import { getAccessToken, setAccessToken } from '@/utils/accessToken'
+import {
+ message
+} from 'ant-design-vue'
+import {
+ getAccessToken,
+ setAccessToken
+} from '@/utils/accessToken'
let loadingInstance
@@ -29,11 +34,16 @@ const handleCode = (code, msg, res) => {
store.dispatch('user/resetAll').catch(() => {})
break
case 403:
- router.push({ path: '/401' }).catch(() => {})
+ router.push({
+ path: '/401'
+ }).catch(() => {})
break
case 500:
message.error(msg || '接口异常')
break
+ case 505:
+ message.error(msg || '该时段已被预约')
+ break
case 302:
// window.location.href = redirect
break
@@ -64,7 +74,7 @@ instance.interceptors.request.use(
if (
config.data &&
config.headers['Content-Type'] ===
- 'application/x-www-form-urlencoded;charset=UTF-8'
+ 'application/x-www-form-urlencoded;charset=UTF-8'
)
config.data = qs.stringify(config.data)
if (debounce.some((item) => config.url.includes(item))) {
@@ -91,7 +101,10 @@ instance.interceptors.response.use(
console.log('接口返回headers', response.headers)
console.log('接口返回REDIRECT', response.headers.redirect)
response['Access-Control-Expose-Headers'] = 'redirect'
- const { code, message } = response.data
+ const {
+ code,
+ message
+ } = response.data
if (response.headers.token) {
setAccessToken(response.headers.token)
@@ -106,7 +119,7 @@ instance.interceptors.response.use(
if (response.headers.redirect === '/#/login') {
var keys = document.cookie.match(/[^ =;]+(?=\=)/g)
if (keys) {
- for (var i = keys.length; i--; ) {
+ for (var i = keys.length; i--;) {
document.cookie =
keys[i] + '=0;path=/;expires=' + new Date(0).toUTCString() //清除当前域名下的,例如:m.kevis.com
document.cookie =
@@ -150,7 +163,10 @@ instance.interceptors.response.use(
console.log('接口error', error)
if (loadingInstance) loadingInstance.close()
- const { response, message } = error
+ const {
+ response,
+ message
+ } = error
if (error.response) {
console.log('接口返回', response)
console.log('接口返回headers', response.headers)
@@ -162,12 +178,17 @@ instance.interceptors.response.use(
window.location.replace(response.headers.redirect)
return Promise.resolve()
}
- const { status, data } = response
+ const {
+ status,
+ data
+ } = response
handleCode(status, data.msg || message, response.headers.redirect)
return Promise.reject(error)
} else {
- let { message } = error
+ let {
+ message
+ } = error
if (message === 'Network Error') {
message = '后端接口连接异常'
}
diff --git a/front/src/views/home/infrastructurePage.vue b/front/src/views/home/infrastructurePage.vue
index 7110c18e..7ee824d1 100644
--- a/front/src/views/home/infrastructurePage.vue
+++ b/front/src/views/home/infrastructurePage.vue
@@ -204,7 +204,13 @@
style="display: flex; flex-direction: column; margin-top: 0.2rem"
>
- 审核结果:{{ lookData.state === '2' ? '通过' : '不通过' }}
+ 审核结果:{{
+ lookData.state == 2
+ ? '通过'
+ : lookData.state == 1
+ ? '审核中'
+ : '不通过'
+ }}
审核意见:{{ lookData.auditViem }}
@@ -1054,9 +1060,11 @@
//获取不可选择的小时
const disabledStartHours = () => {
if (roomEndTime.value) {
+ console.log(roomEndTime.value, 5555555555)
let hours = []
- let hour = moment().hour()
- for (let i = hour + 1; i < 24; i++) {
+ let hour = roomEndTime.value.substr(0, 2)
+ console.log(hour, 888888888888)
+ for (let i = hour; i < 24; i++) {
hours.push(i)
}
return hours
@@ -1066,10 +1074,10 @@
const disabledStartMinutes = (selectedHour) => {
if (roomEndTime.value) {
let minutes = []
- let hour = moment().hour()
- let minute = moment().minute()
- if (selectedHour === hour) {
- for (let i = minute + 1; i < 60; i++) {
+ let hour = roomEndTime.value.substr(0, 2)
+ let minute = roomEndTime.value.substr(3, 2)
+ if (selectedHour == hour) {
+ for (let i = minute; i < 60; i++) {
minutes.push(i)
}
}
@@ -1080,11 +1088,11 @@
const disabledStartSeconds = (selectedHour, selectedMinute) => {
if (roomEndTime.value) {
let seconds = []
- let hour = moment().hour()
- let minute = moment().minute()
- let second = moment().second()
- if (selectedHour === hour && selectedMinute.value === minute) {
- for (let i = second + 1; i < 60; i++) {
+ let hour = roomEndTime.value.substr(0, 2)
+ let minute = roomEndTime.value.substr(3, 2)
+ let second = roomEndTime.value.substr(6, 2)
+ if (selectedHour == hour && selectedMinute.value == minute) {
+ for (let i = second - 1; i < 60; i++) {
seconds.push(i)
}
}
@@ -1095,7 +1103,7 @@
const disabledEndHours = () => {
if (roomCreateTime.value) {
let hours = []
- let hour = moment().hour()
+ let hour = roomCreateTime.value.substr(0, 2)
for (let i = 0; i < hour; i++) {
hours.push(i)
}
@@ -1106,9 +1114,9 @@
const disabledEndMinutes = (selectedHour) => {
if (roomCreateTime.value) {
let minutes = []
- let hour = moment().hour()
- let minute = moment().minute()
- if (selectedHour === hour) {
+ let hour = roomCreateTime.value.substr(0, 2)
+ let minute = roomCreateTime.value.substr(3, 2)
+ if (selectedHour == hour) {
for (let i = 0; i < minute; i++) {
minutes.push(i)
}
@@ -1120,11 +1128,11 @@
const disabledEndSeconds = (selectedHour, selectedMinute) => {
if (roomCreateTime.value) {
let seconds = []
- let hour = moment().hour()
- let minute = moment().minute()
- let second = moment().second()
- if (selectedHour === hour && selectedMinute.value === minute) {
- for (let i = 0; i < second; i++) {
+ let hour = roomCreateTime.value.substr(0, 2)
+ let minute = roomCreateTime.value.substr(3, 2)
+ let second = roomCreateTime.value.substr(6, 2)
+ if (selectedHour == hour && selectedMinute.value == minute) {
+ for (let i = 0; i <= second; i++) {
seconds.push(i)
}
}
@@ -1136,8 +1144,8 @@
const disabledTimeHours = () => {
if (formState.endTime) {
let hours = []
- let hour = moment().hour()
- for (let i = hour + 1; i < 24; i++) {
+ let hour = formState.endTime.substr(0, 2)
+ for (let i = hour; i < 24; i++) {
hours.push(i)
}
return hours
@@ -1147,10 +1155,10 @@
const disabledTimeMinutes = (selectedHour) => {
if (formState.endTime) {
let minutes = []
- let hour = moment().hour()
- let minute = moment().minute()
- if (selectedHour === hour) {
- for (let i = minute + 1; i < 60; i++) {
+ let hour = formState.endTime.substr(0, 2)
+ let minute = formState.endTime.substr(3, 2)
+ if (selectedHour == hour) {
+ for (let i = minute; i < 60; i++) {
minutes.push(i)
}
}
@@ -1161,11 +1169,11 @@
const disabledTimeSeconds = (selectedHour, selectedMinute) => {
if (formState.endTime) {
let seconds = []
- let hour = moment().hour()
- let minute = moment().minute()
- let second = moment().second()
- if (selectedHour === hour && selectedMinute.value === minute) {
- for (let i = second + 1; i < 60; i++) {
+ let hour = formState.endTime.substr(0, 2)
+ let minute = formState.endTime.substr(3, 2)
+ let second = formState.endTime.substr(6, 2)
+ if (selectedHour == hour && selectedMinute.value == minute) {
+ for (let i = second - 1; i < 60; i++) {
seconds.push(i)
}
}
@@ -1176,7 +1184,7 @@
const disabledTimeEndHours = () => {
if (formState.startTime) {
let hours = []
- let hour = moment().hour()
+ let hour = formState.startTime.substr(0, 2)
for (let i = 0; i < hour; i++) {
hours.push(i)
}
@@ -1187,9 +1195,9 @@
const disabledTimeEndMinutes = (selectedHour) => {
if (formState.startTime) {
let minutes = []
- let hour = moment().hour()
- let minute = moment().minute()
- if (selectedHour === hour) {
+ let hour = formState.startTime.substr(0, 2)
+ let minute = formState.startTime.substr(3, 2)
+ if (selectedHour == hour) {
for (let i = 0; i < minute; i++) {
minutes.push(i)
}
@@ -1201,11 +1209,11 @@
const disabledTimeEndSeconds = (selectedHour, selectedMinute) => {
if (formState.startTime) {
let seconds = []
- let hour = moment().hour()
- let minute = moment().minute()
- let second = moment().second()
- if (selectedHour === hour && selectedMinute.value === minute) {
- for (let i = 0; i < second; i++) {
+ let hour = formState.startTime.substr(0, 2)
+ let minute = formState.startTime.substr(3, 2)
+ let second = formState.startTime.substr(6, 2)
+ if (selectedHour == hour && selectedMinute.value == minute) {
+ for (let i = 0; i <= second; i++) {
seconds.push(i)
}
}