Merge branch 'hi-ucs-dev' into release

This commit is contained in:
a0049873 2022-09-01 09:31:45 +08:00
commit a05c37a04a
4 changed files with 89 additions and 52 deletions

View File

@ -232,6 +232,9 @@ export default {
id: '', id: '',
num: '', num: '',
file: '', file: '',
name: '',
roomName: '',
creator: '',
} }
}, },
mounted() { mounted() {
@ -268,10 +271,12 @@ export default {
if (num == '1') { if (num == '1') {
this.dialogVisibleChuli = true this.dialogVisibleChuli = true
this.id = item.id this.id = item.id
this.name = item.name
this.roomName = item.roomName
this.creator = item.creator
} else { } else {
this.dialogVisible = true this.dialogVisible = true
this.$http.get(`bookMeeting/${item.id}`).then(({ data: res }) => { this.$http.get(`bookMeeting/${item.id}`).then(({ data: res }) => {
console.log(55555555)
this.file = res.data.file this.file = res.data.file
}) })
} }
@ -283,6 +288,9 @@ export default {
auditViem: this.desc, auditViem: this.desc,
state: this.radio, state: this.radio,
id: this.id, id: this.id,
name: this.name,
roomName: this.roomName,
creator: this.creator,
} }
this.$http.put('/bookMeeting', query).then(({ data: res }) => { this.$http.put('/bookMeeting', query).then(({ data: res }) => {
this.dialogVisibleChuli = false this.dialogVisibleChuli = false

View File

@ -246,7 +246,7 @@ export default {
], ],
area: [ area: [
{ required: true, message: '请输入会议室面积', trigger: 'blur' }, { required: true, message: '请输入会议室面积', trigger: 'blur' },
{ min: 1, type: 'number', trigger: 'blur' }, { min: 1, trigger: 'blur' },
], ],
description: [ description: [
{ required: true, message: '请填写描述内容', trigger: 'blur' }, { required: true, message: '请填写描述内容', trigger: 'blur' },

View File

@ -11,8 +11,13 @@ import store from '@/store'
import qs from 'qs' import qs from 'qs'
import router from '@/router' import router from '@/router'
// import { isArray } from '@/utils/validate' // import { isArray } from '@/utils/validate'
import { message } from 'ant-design-vue' import {
import { getAccessToken, setAccessToken } from '@/utils/accessToken' message
} from 'ant-design-vue'
import {
getAccessToken,
setAccessToken
} from '@/utils/accessToken'
let loadingInstance let loadingInstance
@ -29,11 +34,16 @@ const handleCode = (code, msg, res) => {
store.dispatch('user/resetAll').catch(() => {}) store.dispatch('user/resetAll').catch(() => {})
break break
case 403: case 403:
router.push({ path: '/401' }).catch(() => {}) router.push({
path: '/401'
}).catch(() => {})
break break
case 500: case 500:
message.error(msg || '接口异常') message.error(msg || '接口异常')
break break
case 505:
message.error(msg || '该时段已被预约')
break
case 302: case 302:
// window.location.href = redirect // window.location.href = redirect
break break
@ -64,7 +74,7 @@ instance.interceptors.request.use(
if ( if (
config.data && config.data &&
config.headers['Content-Type'] === 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) config.data = qs.stringify(config.data)
if (debounce.some((item) => config.url.includes(item))) { if (debounce.some((item) => config.url.includes(item))) {
@ -91,7 +101,10 @@ instance.interceptors.response.use(
console.log('接口返回headers', response.headers) console.log('接口返回headers', response.headers)
console.log('接口返回REDIRECT', response.headers.redirect) console.log('接口返回REDIRECT', response.headers.redirect)
response['Access-Control-Expose-Headers'] = 'redirect' response['Access-Control-Expose-Headers'] = 'redirect'
const { code, message } = response.data const {
code,
message
} = response.data
if (response.headers.token) { if (response.headers.token) {
setAccessToken(response.headers.token) setAccessToken(response.headers.token)
@ -106,7 +119,7 @@ instance.interceptors.response.use(
if (response.headers.redirect === '/#/login') { if (response.headers.redirect === '/#/login') {
var keys = document.cookie.match(/[^ =;]+(?=\=)/g) var keys = document.cookie.match(/[^ =;]+(?=\=)/g)
if (keys) { if (keys) {
for (var i = keys.length; i--; ) { for (var i = keys.length; i--;) {
document.cookie = document.cookie =
keys[i] + '=0;path=/;expires=' + new Date(0).toUTCString() //,m.kevis.com keys[i] + '=0;path=/;expires=' + new Date(0).toUTCString() //,m.kevis.com
document.cookie = document.cookie =
@ -150,7 +163,10 @@ instance.interceptors.response.use(
console.log('接口error', error) console.log('接口error', error)
if (loadingInstance) loadingInstance.close() if (loadingInstance) loadingInstance.close()
const { response, message } = error const {
response,
message
} = error
if (error.response) { if (error.response) {
console.log('接口返回', response) console.log('接口返回', response)
console.log('接口返回headers', response.headers) console.log('接口返回headers', response.headers)
@ -162,12 +178,17 @@ instance.interceptors.response.use(
window.location.replace(response.headers.redirect) window.location.replace(response.headers.redirect)
return Promise.resolve() return Promise.resolve()
} }
const { status, data } = response const {
status,
data
} = response
handleCode(status, data.msg || message, response.headers.redirect) handleCode(status, data.msg || message, response.headers.redirect)
return Promise.reject(error) return Promise.reject(error)
} else { } else {
let { message } = error let {
message
} = error
if (message === 'Network Error') { if (message === 'Network Error') {
message = '后端接口连接异常' message = '后端接口连接异常'
} }

View File

@ -204,7 +204,13 @@
style="display: flex; flex-direction: column; margin-top: 0.2rem" style="display: flex; flex-direction: column; margin-top: 0.2rem"
> >
<span style="margin-bottom: 0.2rem"> <span style="margin-bottom: 0.2rem">
审核结果{{ lookData.state === '2' ? '通过' : '不通过' }} 审核结果{{
lookData.state == 2
? '通过'
: lookData.state == 1
? '审核中'
: '不通过'
}}
</span> </span>
<span style="width: 8rem; margin-bottom: 0.3rem"> <span style="width: 8rem; margin-bottom: 0.3rem">
审核意见{{ lookData.auditViem }} 审核意见{{ lookData.auditViem }}
@ -1054,9 +1060,11 @@
// //
const disabledStartHours = () => { const disabledStartHours = () => {
if (roomEndTime.value) { if (roomEndTime.value) {
console.log(roomEndTime.value, 5555555555)
let hours = [] let hours = []
let hour = moment().hour() let hour = roomEndTime.value.substr(0, 2)
for (let i = hour + 1; i < 24; i++) { console.log(hour, 888888888888)
for (let i = hour; i < 24; i++) {
hours.push(i) hours.push(i)
} }
return hours return hours
@ -1066,10 +1074,10 @@
const disabledStartMinutes = (selectedHour) => { const disabledStartMinutes = (selectedHour) => {
if (roomEndTime.value) { if (roomEndTime.value) {
let minutes = [] let minutes = []
let hour = moment().hour() let hour = roomEndTime.value.substr(0, 2)
let minute = moment().minute() let minute = roomEndTime.value.substr(3, 2)
if (selectedHour === hour) { if (selectedHour == hour) {
for (let i = minute + 1; i < 60; i++) { for (let i = minute; i < 60; i++) {
minutes.push(i) minutes.push(i)
} }
} }
@ -1080,11 +1088,11 @@
const disabledStartSeconds = (selectedHour, selectedMinute) => { const disabledStartSeconds = (selectedHour, selectedMinute) => {
if (roomEndTime.value) { if (roomEndTime.value) {
let seconds = [] let seconds = []
let hour = moment().hour() let hour = roomEndTime.value.substr(0, 2)
let minute = moment().minute() let minute = roomEndTime.value.substr(3, 2)
let second = moment().second() let second = roomEndTime.value.substr(6, 2)
if (selectedHour === hour && selectedMinute.value === minute) { if (selectedHour == hour && selectedMinute.value == minute) {
for (let i = second + 1; i < 60; i++) { for (let i = second - 1; i < 60; i++) {
seconds.push(i) seconds.push(i)
} }
} }
@ -1095,7 +1103,7 @@
const disabledEndHours = () => { const disabledEndHours = () => {
if (roomCreateTime.value) { if (roomCreateTime.value) {
let hours = [] let hours = []
let hour = moment().hour() let hour = roomCreateTime.value.substr(0, 2)
for (let i = 0; i < hour; i++) { for (let i = 0; i < hour; i++) {
hours.push(i) hours.push(i)
} }
@ -1106,9 +1114,9 @@
const disabledEndMinutes = (selectedHour) => { const disabledEndMinutes = (selectedHour) => {
if (roomCreateTime.value) { if (roomCreateTime.value) {
let minutes = [] let minutes = []
let hour = moment().hour() let hour = roomCreateTime.value.substr(0, 2)
let minute = moment().minute() let minute = roomCreateTime.value.substr(3, 2)
if (selectedHour === hour) { if (selectedHour == hour) {
for (let i = 0; i < minute; i++) { for (let i = 0; i < minute; i++) {
minutes.push(i) minutes.push(i)
} }
@ -1120,11 +1128,11 @@
const disabledEndSeconds = (selectedHour, selectedMinute) => { const disabledEndSeconds = (selectedHour, selectedMinute) => {
if (roomCreateTime.value) { if (roomCreateTime.value) {
let seconds = [] let seconds = []
let hour = moment().hour() let hour = roomCreateTime.value.substr(0, 2)
let minute = moment().minute() let minute = roomCreateTime.value.substr(3, 2)
let second = moment().second() let second = roomCreateTime.value.substr(6, 2)
if (selectedHour === hour && selectedMinute.value === minute) { if (selectedHour == hour && selectedMinute.value == minute) {
for (let i = 0; i < second; i++) { for (let i = 0; i <= second; i++) {
seconds.push(i) seconds.push(i)
} }
} }
@ -1136,8 +1144,8 @@
const disabledTimeHours = () => { const disabledTimeHours = () => {
if (formState.endTime) { if (formState.endTime) {
let hours = [] let hours = []
let hour = moment().hour() let hour = formState.endTime.substr(0, 2)
for (let i = hour + 1; i < 24; i++) { for (let i = hour; i < 24; i++) {
hours.push(i) hours.push(i)
} }
return hours return hours
@ -1147,10 +1155,10 @@
const disabledTimeMinutes = (selectedHour) => { const disabledTimeMinutes = (selectedHour) => {
if (formState.endTime) { if (formState.endTime) {
let minutes = [] let minutes = []
let hour = moment().hour() let hour = formState.endTime.substr(0, 2)
let minute = moment().minute() let minute = formState.endTime.substr(3, 2)
if (selectedHour === hour) { if (selectedHour == hour) {
for (let i = minute + 1; i < 60; i++) { for (let i = minute; i < 60; i++) {
minutes.push(i) minutes.push(i)
} }
} }
@ -1161,11 +1169,11 @@
const disabledTimeSeconds = (selectedHour, selectedMinute) => { const disabledTimeSeconds = (selectedHour, selectedMinute) => {
if (formState.endTime) { if (formState.endTime) {
let seconds = [] let seconds = []
let hour = moment().hour() let hour = formState.endTime.substr(0, 2)
let minute = moment().minute() let minute = formState.endTime.substr(3, 2)
let second = moment().second() let second = formState.endTime.substr(6, 2)
if (selectedHour === hour && selectedMinute.value === minute) { if (selectedHour == hour && selectedMinute.value == minute) {
for (let i = second + 1; i < 60; i++) { for (let i = second - 1; i < 60; i++) {
seconds.push(i) seconds.push(i)
} }
} }
@ -1176,7 +1184,7 @@
const disabledTimeEndHours = () => { const disabledTimeEndHours = () => {
if (formState.startTime) { if (formState.startTime) {
let hours = [] let hours = []
let hour = moment().hour() let hour = formState.startTime.substr(0, 2)
for (let i = 0; i < hour; i++) { for (let i = 0; i < hour; i++) {
hours.push(i) hours.push(i)
} }
@ -1187,9 +1195,9 @@
const disabledTimeEndMinutes = (selectedHour) => { const disabledTimeEndMinutes = (selectedHour) => {
if (formState.startTime) { if (formState.startTime) {
let minutes = [] let minutes = []
let hour = moment().hour() let hour = formState.startTime.substr(0, 2)
let minute = moment().minute() let minute = formState.startTime.substr(3, 2)
if (selectedHour === hour) { if (selectedHour == hour) {
for (let i = 0; i < minute; i++) { for (let i = 0; i < minute; i++) {
minutes.push(i) minutes.push(i)
} }
@ -1201,11 +1209,11 @@
const disabledTimeEndSeconds = (selectedHour, selectedMinute) => { const disabledTimeEndSeconds = (selectedHour, selectedMinute) => {
if (formState.startTime) { if (formState.startTime) {
let seconds = [] let seconds = []
let hour = moment().hour() let hour = formState.startTime.substr(0, 2)
let minute = moment().minute() let minute = formState.startTime.substr(3, 2)
let second = moment().second() let second = formState.startTime.substr(6, 2)
if (selectedHour === hour && selectedMinute.value === minute) { if (selectedHour == hour && selectedMinute.value == minute) {
for (let i = 0; i < second; i++) { for (let i = 0; i <= second; i++) {
seconds.push(i) seconds.push(i)
} }
} }