mirror of
https://gitee.com/elegant_wings/dbd-meeting-html.git
synced 2025-08-08 08:22:46 +08:00
调整预约列表、会议室列表
This commit is contained in:
parent
d576ad8a56
commit
e857ba49d9
@ -86,3 +86,39 @@ export function millsToTime (mills) {
|
||||
const year = month / 12
|
||||
return year.toFixed(0) + ' 年'
|
||||
};
|
||||
|
||||
const formatNumber = n => {
|
||||
n = n.toString()
|
||||
return n[1] ? n : '0' + n
|
||||
}
|
||||
|
||||
//返回 例 2017-12-12
|
||||
export function selfFormatTimeYMD(time) {
|
||||
if (typeof time === "string" && time.includes('-')) {
|
||||
time = time.replaceAll('-', '/')
|
||||
}
|
||||
let date = new Date(time)
|
||||
let year = date.getFullYear()
|
||||
let month = date.getMonth() + 1
|
||||
let day = date.getDate()
|
||||
let hour = date.getHours()
|
||||
let minute = date.getMinutes()
|
||||
let second = date.getSeconds()
|
||||
return [year, month, day].map(formatNumber).join('-')
|
||||
}
|
||||
|
||||
//返回 12:30
|
||||
export function selfFormatTimeHM(time) {
|
||||
if (typeof time === "string" && time.includes('-')) {
|
||||
time = time.replaceAll('-', '/')
|
||||
}
|
||||
let date = new Date(time);
|
||||
let year = date.getFullYear()
|
||||
let month = date.getMonth() + 1
|
||||
let day = date.getDate()
|
||||
let hour = date.getHours()
|
||||
let minute = date.getMinutes()
|
||||
let second = date.getSeconds()
|
||||
|
||||
return [hour, minute].map(formatNumber).join(':')
|
||||
}
|
||||
|
@ -3,61 +3,54 @@
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="48">
|
||||
|
||||
|
||||
<a-col :md="5" :sm="15">
|
||||
<a-form-item label="状态">
|
||||
<a-select v-model="queryParam.status">
|
||||
<a-select-option value="1">
|
||||
取消
|
||||
</a-select-option>
|
||||
<a-select-option value="3">
|
||||
驳回
|
||||
</a-select-option>
|
||||
<a-select-option value="4">
|
||||
占用
|
||||
</a-select-option>
|
||||
<a-select-option value="5">
|
||||
待审核
|
||||
</a-select-option>
|
||||
<a-select-option value="7">
|
||||
审核通过
|
||||
</a-select-option>
|
||||
<a-select-option value="9">
|
||||
进行中
|
||||
</a-select-option>
|
||||
<a-select-option value="11">
|
||||
已结束
|
||||
<a-col :md='5' :sm='15'>
|
||||
<a-form-item label='预约时间'>
|
||||
<a-date-picker :default-value='nowDate' @change="chooseDate" :disabled-date="disabledDate" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md='5' :sm='15'>
|
||||
<a-form-item label='所在楼层'>
|
||||
<a-select v-model='queryParam.typeName'>
|
||||
<a-select-option v-for='item in typeList' :value='item.value'>
|
||||
{{ item.text }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="5" :sm="15">
|
||||
<a-form-item label="会议室名称">
|
||||
<a-input placeholder="会议室名称" v-model="queryParam.roomName" />
|
||||
<a-col :md='5' :sm='15'>
|
||||
<a-form-item label='排列形状'>
|
||||
<a-select v-model='queryParam.shape' placeholder='请选择排列形状'>
|
||||
<a-select-option v-for='item in shapeList' :value='item.value'>
|
||||
{{ item.text }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="5" :sm="15">
|
||||
<a-form-item label="设备">
|
||||
<a-input placeholder="设备" v-model="queryParam.deviceId" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="5" :sm="15">
|
||||
<a-form-item label="人数">
|
||||
<a-input placeholder="请输人数" v-model="queryParam.num" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="5" :sm="15">
|
||||
<a-form-item label="形式">
|
||||
<a-input placeholder="请输入形式" v-model="queryParam.parkId" />
|
||||
<a-col :md='5' :sm='15'>
|
||||
<a-form-item label='容纳人数'>
|
||||
<a-select v-model='queryParam.capacityNum' placeholder='请选择范围'>
|
||||
<a-select-option value=''>
|
||||
全部
|
||||
</a-select-option>
|
||||
<a-select-option value='1'>
|
||||
0-20
|
||||
</a-select-option>
|
||||
<a-select-option value='2'>
|
||||
21-50
|
||||
</a-select-option>
|
||||
<a-select-option value='3'>
|
||||
51-100
|
||||
</a-select-option>
|
||||
<a-select-option value='4'>
|
||||
100以上
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="8" :sm="24">
|
||||
<span class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
||||
<a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
|
||||
<a-button type="primary" style="margin-left: 450px">会议预约</a-button>
|
||||
<a-button type="success" style="margin-left: 8px">占用</a-button>
|
||||
<a-button type="primary" @click="getAllRoomList">查询会议室</a-button>
|
||||
<!-- <a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>-->
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@ -68,20 +61,17 @@
|
||||
{{ item.name }}
|
||||
</div>
|
||||
<div class="nav">
|
||||
<div class="nav-item" @click="toMeetingList(room)" v-for="room in item.list" :key="room.id">
|
||||
<div class="nav-item" v-for="room in item.list" :key="room.id">
|
||||
<div class="desc">
|
||||
{{ room.name }}
|
||||
</div>
|
||||
<!-- <div class="desc disabled" >-->
|
||||
<!-- {{ room.name }}-->
|
||||
<!-- </div>-->
|
||||
<div class="am" v-if='room.am == 0'>上午</div>
|
||||
<div class="am disabled" v-if='room.am == 1'>上午</div>
|
||||
<div class="am disabled">上午</div>
|
||||
<div class="pm">下午</div>
|
||||
<div class="night">晚上</div>
|
||||
<div class="desc-item">
|
||||
<div class="num">
|
||||
{{ room.capacityNum }}人
|
||||
</div>
|
||||
<div class="shape">
|
||||
{{ room.typeName }}
|
||||
</div>
|
||||
{{ room.capacityNum }}人 {{ room.typeName }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -93,31 +83,99 @@
|
||||
|
||||
<script>
|
||||
import { getAllRoom } from '@/api/admin/meeting/meetingReservation'
|
||||
import {
|
||||
getRoomContentList, delRoomContent, selectSearchInfoByType,
|
||||
selectSearchInfoByShape, selectSearchInfoByCapacity, addRoomServe,
|
||||
selectRoomServeByRoom, selectRoomItemByRoom, getMeetingDict
|
||||
} from '@/api/admin/meeting/roomContent'
|
||||
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
name: 'MeetingMangerList',
|
||||
data () {
|
||||
return {
|
||||
|
||||
nowDate: moment().format('YYYY-MM-DD'), // 当前日期
|
||||
form: this.$form.createForm(this),
|
||||
mdl: {},
|
||||
// 高级搜索 展开/关闭
|
||||
advanced: false,
|
||||
// 查询参数
|
||||
queryParam: {},
|
||||
queryParam: {
|
||||
meetingName: '',
|
||||
typeName: '',
|
||||
shape: '',
|
||||
capacityNum: ''
|
||||
},
|
||||
capacityList: [],
|
||||
shapeList: [],
|
||||
typeList: [],
|
||||
roomList: []
|
||||
// 表头
|
||||
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.getAllRoomList()
|
||||
},
|
||||
mounted() {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
chooseDate(date, dateString) {
|
||||
this.nowDate = dateString
|
||||
},
|
||||
disabledDate(current) {
|
||||
return current < moment().startOf('day') || current > moment().add(14, 'days')
|
||||
},
|
||||
// 获取查询参数
|
||||
getDict() {
|
||||
getMeetingDict().then((res) => {
|
||||
// 楼层
|
||||
let _typeList = []
|
||||
let dataObj = res.data
|
||||
for (let key in dataObj.floors) {
|
||||
let eachObj = dataObj.floors[key]
|
||||
const keys = Object.keys(eachObj)
|
||||
_typeList.push({
|
||||
text: keys[0],
|
||||
value: keys[0]
|
||||
})
|
||||
}
|
||||
_typeList = [{
|
||||
text: '全部',
|
||||
value: ''
|
||||
}, ..._typeList]
|
||||
this.typeList = _typeList
|
||||
|
||||
// 形状
|
||||
let _shapeList = []
|
||||
for (let key in dataObj.types) {
|
||||
let eachObj = dataObj.types[key]
|
||||
const keys = Object.keys(eachObj)
|
||||
_shapeList.push({
|
||||
text: keys[0],
|
||||
value: keys[0]
|
||||
})
|
||||
}
|
||||
_shapeList = [{
|
||||
text: '全部',
|
||||
value: ''
|
||||
}, ..._shapeList]
|
||||
this.shapeList = _shapeList
|
||||
})
|
||||
},
|
||||
reset() {
|
||||
this.queryParam = {
|
||||
meetingName: '',
|
||||
typeName: '',
|
||||
shape: '',
|
||||
capacityNum: ''
|
||||
}
|
||||
this.getAllRoomList()
|
||||
},
|
||||
toMeetingList (item) {
|
||||
this.$router.push({ name: 'reservation', params: { roomId: item.name } })
|
||||
},
|
||||
|
||||
getAllRoomList () {
|
||||
getAllRoom({ timeFormat: 0, min: 1, max: 1000 }).then(res => {
|
||||
const roomArr = {}
|
||||
@ -146,31 +204,45 @@ export default {
|
||||
.room {
|
||||
border-top: 1px solid rgb(221 215 215 / 65%);
|
||||
}
|
||||
|
||||
.room .title {
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
}
|
||||
.roomItem {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.roomItem .desc {
|
||||
width: 150px;
|
||||
height: 50px;
|
||||
background-color: #A3CDFF;
|
||||
border-radius: 10px 10px 0 0px;
|
||||
line-height: 50px;
|
||||
height: 30px;
|
||||
//background-color: #A3CDFF;
|
||||
//border-radius: 10px 10px 0 0px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
margin-top: 20px;
|
||||
font-weight: 700;
|
||||
}
|
||||
.roomItem .am, .roomItem .pm, .roomItem .night{
|
||||
width: 150px;
|
||||
height: 30px;
|
||||
background-color: #A3CDFF;
|
||||
//border-radius: 10px 10px 0 0px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
margin-top: 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.roomItem .disabled {
|
||||
background-color: #F2F2F2 !important;
|
||||
}
|
||||
|
||||
|
||||
.roomItem .desc-item {
|
||||
width: 150px;
|
||||
height: 30px;
|
||||
background-color: #D8E9FC;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-radius: 0 0px 10px 10px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.desc-item .num {
|
||||
|
@ -1,154 +1,112 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="48">
|
||||
<a-col :md="5" :sm="15">
|
||||
<a-form-item label="状态">
|
||||
<a-select v-model="queryParam.status">
|
||||
<a-select-option value="1">
|
||||
<a-card :bordered='false'>
|
||||
<div class='table-page-search-wrapper'>
|
||||
<a-form layout='inline'>
|
||||
<a-row :gutter='48'>
|
||||
<a-col :md='5' :sm='15'>
|
||||
<a-form-item label='状态'>
|
||||
<a-select v-model='queryParam.status'>
|
||||
<a-select-option value='1'>
|
||||
取消
|
||||
</a-select-option>
|
||||
<a-select-option value="3">
|
||||
<a-select-option value='3'>
|
||||
驳回
|
||||
</a-select-option>
|
||||
<a-select-option value="4">
|
||||
<a-select-option value='4'>
|
||||
占用
|
||||
</a-select-option>
|
||||
<a-select-option value="5">
|
||||
<a-select-option value='5'>
|
||||
待审核
|
||||
</a-select-option>
|
||||
<a-select-option value="7">
|
||||
<a-select-option value='7'>
|
||||
审核通过
|
||||
</a-select-option>
|
||||
<a-select-option value="9">
|
||||
<a-select-option value='9'>
|
||||
进行中
|
||||
</a-select-option>
|
||||
<a-select-option value="11">
|
||||
<a-select-option value='11'>
|
||||
已结束
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="5" :sm="15">
|
||||
<a-form-item label="会议室">
|
||||
<a-input placeholder="请输入会议室" v-model="queryParam.name" />
|
||||
<a-col :md='5' :sm='15'>
|
||||
<a-form-item label='会议室'>
|
||||
<a-input placeholder='请输入会议室' v-model='queryParam.name' />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :md="5" :sm="15">-->
|
||||
<!-- <a-form-item label="预约时间格式:0 任意时间,1上午,2下午,3晚上">-->
|
||||
<!-- <a-input placeholder="请输入预约时间格式:0 任意时间,1上午,2下午,3晚上" v-model="queryParam.timeFormat"/>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<a-col :md="5" :sm="15">
|
||||
<a-form-item label="参与人数">
|
||||
<a-input placeholder="请输入参与人数" v-model="queryParam.personNum" />
|
||||
<a-col :md='5' :sm='15'>
|
||||
<a-form-item label='参与人数'>
|
||||
<a-input placeholder='请输入参与人数' v-model='queryParam.personNum' />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :md="5" :sm="15">-->
|
||||
<!-- <a-form-item label="参会领导">-->
|
||||
<!-- <a-input placeholder="请输入参会领导" v-model="queryParam.leader"/>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<a-col :md="5" :sm="15">
|
||||
<a-form-item label="姓名">
|
||||
<a-input placeholder="请输入预约人姓名" v-model="queryParam.bookingUserName" />
|
||||
<a-col :md='5' :sm='15'>
|
||||
<a-form-item label='姓名'>
|
||||
<a-input placeholder='请输入预约人姓名' v-model='queryParam.bookingUserName' />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="5" :sm="15">
|
||||
<a-form-item label="联系电话">
|
||||
<a-input placeholder="请输入预约人联系电话" v-model="queryParam.bookingUserPhone" />
|
||||
<a-col :md='5' :sm='15'>
|
||||
<a-form-item label='联系电话'>
|
||||
<a-input placeholder='请输入预约人联系电话' v-model='queryParam.bookingUserPhone' />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :md="5" :sm="15">-->
|
||||
<!-- <a-form-item label="预约用户单位id">-->
|
||||
<!-- <a-input placeholder="请输入预约用户单位id" v-model="queryParam.userOrgId"/>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<a-col :md="5" :sm="15">
|
||||
<a-form-item label="单位名称">
|
||||
<a-input placeholder="请输入单位名称" v-model="queryParam.userOrg" />
|
||||
<a-col :md='5' :sm='15'>
|
||||
<a-form-item label='单位名称'>
|
||||
<a-input placeholder='请输入单位名称' v-model='queryParam.userOrg' />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :md="5" :sm="15">-->
|
||||
<!-- <a-form-item label="操作记录,json 格式">-->
|
||||
<!-- <a-input placeholder="请输入操作记录,json 格式" v-model="queryParam.operate"/>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :md="5" :sm="15">-->
|
||||
<!-- <a-form-item label="扩展1">-->
|
||||
<!-- <a-input placeholder="请输入扩展1" v-model="queryParam.ext1"/>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :md="5" :sm="15">-->
|
||||
<!-- <a-form-item label="扩展2">-->
|
||||
<!-- <a-input placeholder="请输入扩展2" v-model="queryParam.ext2"/>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :md="5" :sm="15">-->
|
||||
<!-- <a-form-item label="扩展3">-->
|
||||
<!-- <a-input placeholder="请输入扩展3" v-model="queryParam.ext3"/>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :md="5" :sm="15">-->
|
||||
<!-- <a-form-item label="园区ID">-->
|
||||
<!-- <a-input placeholder="请输入园区ID" v-model="queryParam.parkId"/>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<a-col :md="8" :sm="24">
|
||||
<span class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
||||
<a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
|
||||
<a-col :md='8' :sm='24'>
|
||||
<span class='table-page-search-submitButtons'>
|
||||
<a-button type='primary' @click='$refs.table.refresh(true)'>查询</a-button>
|
||||
<a-button style='margin-left: 8px' @click='() => queryParam = {}'>重置</a-button>
|
||||
<a-dropdown v-if='removeEnable&&selectedRowKeys.length > 0'>
|
||||
<a-button style='margin-left: 8px' type='danger' icon='delete'
|
||||
@click='delByIds(selectedRowKeys)'>删除</a-button>
|
||||
</a-dropdown>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<a-button v-if="addEnable" type="primary" icon="plus" @click="$refs.modal.add()">新建</a-button>
|
||||
<a-dropdown v-if="removeEnable&&selectedRowKeys.length > 0">
|
||||
<a-button type="danger" icon="delete" @click="delByIds(selectedRowKeys)">删除</a-button>
|
||||
</a-dropdown>
|
||||
</div>
|
||||
<s-table
|
||||
size="default"
|
||||
ref="table"
|
||||
rowKey="id"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
:columns="columns"
|
||||
:data="loadData"
|
||||
size='default'
|
||||
ref='table'
|
||||
rowKey='id'
|
||||
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
|
||||
:columns='columns'
|
||||
:data='loadData'
|
||||
>
|
||||
<!-- '预约状态,1 取消 3 驳回 4 占用 5 待审核 7 审核通过,待开始 9 进行中 11已结束',-->
|
||||
<span slot="status" slot-scope="text, record">
|
||||
<a-tag v-if="record.status == 1" color="pink">
|
||||
<span slot='status' slot-scope='text, record'>
|
||||
<a-tag v-if='record.status == 1' color='pink'>
|
||||
取消
|
||||
</a-tag>
|
||||
<a-tag v-if="record.status == 3" color="red">
|
||||
<a-tag v-if='record.status == 3' color='red'>
|
||||
驳回
|
||||
</a-tag>
|
||||
<a-tag v-if="record.status == 4" color="purple">
|
||||
<a-tag v-if='record.status == 4' color='purple'>
|
||||
占用
|
||||
</a-tag>
|
||||
<a-tag v-if="record.status == 5" color="blue">
|
||||
<a-tag v-if='record.status == 5' color='blue'>
|
||||
待审核
|
||||
</a-tag>
|
||||
<a-tag v-if="record.status == 7" color="green">
|
||||
<a-tag v-if='record.status == 7' color='green'>
|
||||
审核通过
|
||||
</a-tag>
|
||||
<a-tag v-if="record.status == 9" color="cyan">
|
||||
<a-tag v-if='record.status == 9' color='cyan'>
|
||||
进行中
|
||||
</a-tag>
|
||||
<a-tag v-if="record.status == 11" color="orange">
|
||||
<a-tag v-if='record.status == 11' color='orange'>
|
||||
已结束
|
||||
</a-tag>
|
||||
</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="editEnabel" @click="handleEdit(record)">编辑</a>
|
||||
<a-divider type="vertical" />
|
||||
<a v-if="removeEnable" @click="delByIds([record.id])">删除</a>
|
||||
<span slot='action' slot-scope='text, record'>
|
||||
<a v-if='editEnabel' @click='handleEdit(record)'>编辑</a>
|
||||
<a-divider type='vertical' />
|
||||
<a v-if='removeEnable' @click='delByIds([record.id])'>删除</a>
|
||||
</span>
|
||||
</s-table>
|
||||
<meetingReservation-modal ref="modal" @ok="handleOk" />
|
||||
<meetingReservation-modal ref='modal' @ok='handleOk' />
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
@ -159,6 +117,8 @@ import { delMeetingReservation, getMeetingReservationList } from '@/api/admin/me
|
||||
import MeetingReservationModal from './modules/MeetingReservationModal.vue'
|
||||
import { checkPermission } from '@/utils/permissions'
|
||||
import { getRoomServeList } from '@/api/admin/meeting/roomServe'
|
||||
import { delRoomContent } from '@/api/admin/meeting/roomContent'
|
||||
import { selfFormatTimeYMD, selfFormatTimeHM } from '@/utils/util'
|
||||
|
||||
export default {
|
||||
name: 'TableList',
|
||||
@ -166,7 +126,7 @@ export default {
|
||||
STable,
|
||||
MeetingReservationModal
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
@ -184,45 +144,34 @@ export default {
|
||||
queryParam: {},
|
||||
// 表头
|
||||
columns: [
|
||||
{
|
||||
title: '会议室',
|
||||
dataIndex: 'name'
|
||||
},
|
||||
{
|
||||
title: '会议时间',
|
||||
dataIndex: 'timeSlot'
|
||||
},
|
||||
{
|
||||
title: '会议名称',
|
||||
dataIndex: 'title'
|
||||
},
|
||||
{
|
||||
title: '会议室',
|
||||
dataIndex: 'name'
|
||||
},
|
||||
// {
|
||||
// title: '预约号',
|
||||
// dataIndex: 'sn'
|
||||
// },
|
||||
|
||||
{
|
||||
title: '预约-开始时间',
|
||||
dataIndex: 'start',
|
||||
sorter: true
|
||||
title: '参会人数',
|
||||
dataIndex: 'personNum'
|
||||
},
|
||||
{
|
||||
title: '预约-结束时间',
|
||||
dataIndex: 'end',
|
||||
sorter: true
|
||||
title: '参会领导',
|
||||
dataIndex: 'leader'
|
||||
},
|
||||
{
|
||||
title: '预约用户单位名称',
|
||||
title: '预约部门',
|
||||
dataIndex: 'userOrg'
|
||||
},
|
||||
{
|
||||
title: '预约人姓名',
|
||||
title: '会议预约人',
|
||||
dataIndex: 'bookingUserName'
|
||||
},
|
||||
{
|
||||
title: '预约人联系电话',
|
||||
dataIndex: 'bookingUserPhone'
|
||||
},
|
||||
{
|
||||
title: '会议服务',
|
||||
dataIndex: 'device'
|
||||
},
|
||||
{
|
||||
title: '预约状态',
|
||||
dataIndex: 'status',
|
||||
@ -234,105 +183,73 @@ export default {
|
||||
dataIndex: 'action',
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
// {
|
||||
// title: '预约时间格式:0 任意时间,1上午,2下午,3晚上',
|
||||
// dataIndex: 'timeFormat'
|
||||
// },
|
||||
|
||||
// {
|
||||
// title: '参与人数',
|
||||
// dataIndex: 'personNum'
|
||||
// },
|
||||
// {
|
||||
// title: '参会领导',
|
||||
// dataIndex: 'leader'
|
||||
// },
|
||||
|
||||
// {
|
||||
// title: '预约用户单位id',
|
||||
// dataIndex: 'userOrgId'
|
||||
// },
|
||||
|
||||
// {
|
||||
// title: '预约状态,1 取消 3 驳回 4 占用 5 待审核 7 审核通过,待开始 9 进行中 11已结束',
|
||||
// dataIndex: 'status'
|
||||
// },
|
||||
// {
|
||||
// title: '操作记录,json 格式',
|
||||
// dataIndex: 'operate'
|
||||
// },
|
||||
// {
|
||||
// title: '备注',
|
||||
// dataIndex: 'remark'
|
||||
// },
|
||||
// {
|
||||
// title: '扩展1',
|
||||
// dataIndex: 'ext1'
|
||||
// },
|
||||
// {
|
||||
// title: '扩展2',
|
||||
// dataIndex: 'ext2'
|
||||
// },
|
||||
// {
|
||||
// title: '扩展3',
|
||||
// dataIndex: 'ext3'
|
||||
// },
|
||||
// {
|
||||
// title: '园区ID',
|
||||
// dataIndex: 'parkId'
|
||||
// },
|
||||
|
||||
],
|
||||
// 加载数据方法 必须为 Promise 对象
|
||||
loadData: parameter => {
|
||||
this.queryParam.name = this.$route.params.roomId
|
||||
|
||||
return getMeetingReservationList(Object.assign(parameter, this.queryParam))
|
||||
},
|
||||
serveLoadData: (parameter) => {
|
||||
|
||||
let param = {
|
||||
parkId: this.parkId,
|
||||
|
||||
// 处理一下时间
|
||||
return getMeetingReservationList(Object.assign(parameter, this.queryParam)).then(res => {
|
||||
for (let key in res.rows) {
|
||||
let startTime = res.rows[key].start
|
||||
let endTime = res.rows[key].end
|
||||
res.rows[key].timeSlot = selfFormatTimeYMD(startTime) + ' ' + selfFormatTimeHM(startTime) + '~' + selfFormatTimeHM(endTime)
|
||||
}
|
||||
return getRoomServeList(Object.assign(parameter, param))
|
||||
return res
|
||||
})
|
||||
},
|
||||
selectedRowKeys: [],
|
||||
selectedRows: [],
|
||||
addEnable: checkPermission('meeting:meetingReservation:add'),
|
||||
editEnabel: checkPermission('meeting:meetingReservation:edit'),
|
||||
removeEnable: checkPermission('meeting:meetingReservation:remove')
|
||||
}
|
||||
},
|
||||
filters: {},
|
||||
created () {
|
||||
console.log()
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
onSelectChange (selectedRowKeys, selectedRows) {
|
||||
reset() {
|
||||
this.queryParam = {}
|
||||
this.$refs.table.refresh(true)
|
||||
},
|
||||
onSelectChange(selectedRowKeys, selectedRows) {
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
this.selectedRows = selectedRows
|
||||
},
|
||||
handleAdd () {
|
||||
handleAdd() {
|
||||
this.$refs.modal.add()
|
||||
},
|
||||
handleEdit (record) {
|
||||
this.$refs.modal.edit(record)
|
||||
handleEdit(id) {
|
||||
this.$refs.modal.edit(id)
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.table.refresh(true)
|
||||
console.log('handleSaveOk')
|
||||
handleOk(status) {
|
||||
status = status || false
|
||||
this.$refs.table.refresh(status)
|
||||
},
|
||||
delByIds (ids) {
|
||||
delMeetingReservation({ ids: ids.join(',') }).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success('删除成功')
|
||||
this.handleOk()
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
delByIds(ids) {
|
||||
const _this = this
|
||||
if (ids === '') {
|
||||
this.$message.error('请选择后删除!')
|
||||
return
|
||||
}
|
||||
this.selectedRowKeys = []
|
||||
this.$confirm({
|
||||
title: '警告',
|
||||
content: '删除后不可恢复,是否确认删除?',
|
||||
okText: '是',
|
||||
okType: 'warning',
|
||||
cancelText: '否',
|
||||
onOk() {
|
||||
delMeetingReservation({ ids: ids.join(',') }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
_this.$message.success('删除成功')
|
||||
_this.handleOk()
|
||||
} else {
|
||||
_this.$message.error(res.msg)
|
||||
}
|
||||
_this.selectedRowKeys = []
|
||||
})
|
||||
},
|
||||
onCancel() {
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user