parent
b8c5a59b2b
commit
2d58f60350
@ -0,0 +1,174 @@
|
||||
<template>
|
||||
<div class="meeting-room-apply-div">
|
||||
<div v-if="pageType === 0">
|
||||
<DateChange @changeDate="changeDate" type="day" :callBackNow="true"></DateChange>
|
||||
<div class="data-list-div">
|
||||
<vue-scroll :ops="listScroll" style="height:25rem">
|
||||
<div class="data-row-div" v-for="item,index in dataList" :key="item.room_id">
|
||||
<div class="room-img-div"><img :src="item.src" style="width: 100%;height: 100%"/></div>
|
||||
<div class="room-info-div">
|
||||
<div class="top-info-row-div">
|
||||
<span class="room-type-div">{{item.room_type_str}}</span>
|
||||
<span class="default-span-div" :title="item.room_location">{{item.room_location}}</span>
|
||||
</div>
|
||||
<div class="info-row-div">
|
||||
<span class="room-other-info-div">{{item.person_number + '人'}}</span>
|
||||
<span class="room-other-info-div">{{item.network_situation === 1?'wifi覆盖':(item.network_situation === 2?'有线网络':(item.network_situation === 3?'无网络':''))}}</span>
|
||||
<span :class="'room-other-info-div ' + (item.media_title == ''?' no-data-tips':'')">{{item.media_title == ''?'无多媒体':item.media_title}}</span>
|
||||
</div>
|
||||
<div class="info-row-div">
|
||||
<TimeBox :currentDate="currentDate" :itemData="item" :dataIndex="index" @boxClick="toApply"></TimeBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</vue-scroll>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="pageType === 1">
|
||||
<Apply :dataList="dataList" :currentRoom="currentRoom" @cancel="cancel"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import DateChange from '../../common/dateChange';
|
||||
import InterConfig from '../interConfig';
|
||||
import StaticParams from '../../../../../../../../global-llibs/staticParams';
|
||||
import TimeBox from '../timeBox.vue';
|
||||
import Apply from './apply.vue';
|
||||
export default{
|
||||
data(){
|
||||
return {
|
||||
pageType:0,//0 列表 1 申请
|
||||
listScroll: this.StaticParams.scrollOption,
|
||||
showLoading: true,
|
||||
currentDate: "",
|
||||
dataList: [],
|
||||
currentRoom:{},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeDate: function (value) {
|
||||
this.currentDate = value;
|
||||
this.getAppointment();
|
||||
},
|
||||
getAppointment: function () {
|
||||
let param = {
|
||||
org_id: this.BaseConfig.person_info_my.bureau_id,
|
||||
search_date: this.currentDate,
|
||||
}
|
||||
this.showLoading = true;
|
||||
this.InterfaceConfig.callInterface([{
|
||||
url: InterConfig.getAppointment.url,
|
||||
params: param,
|
||||
method: InterConfig.getAppointment.method,
|
||||
isTestLogin: InterConfig.getAppointment.isTestLogin,
|
||||
}], (result) => {
|
||||
this.showLoading = false;
|
||||
let resData = result[0].data;
|
||||
if (resData.code === 2000) {
|
||||
let dataList = resData.data;
|
||||
if (dataList && dataList.length > 0) {
|
||||
for (let i = 0, len = dataList.length; i < len; i++) {
|
||||
let src = "";
|
||||
let attachment_json = dataList[i].attachment_json;
|
||||
if(attachment_json && attachment_json.length > 0){
|
||||
let attachmentArray = JSON.parse(attachment_json);
|
||||
if(attachmentArray.length > 0){
|
||||
src = StaticParams.getThumbUrl(JSON.parse(attachment_json)[0].file_id +"."+JSON.parse(attachment_json)[0].resource_format,100,100,100);
|
||||
src = src.substring(0,src.lastIndexOf("@"))
|
||||
}
|
||||
}
|
||||
dataList[i]["src"] = src;
|
||||
}
|
||||
}
|
||||
this.dataList = dataList;
|
||||
}
|
||||
})
|
||||
},
|
||||
//跳转申请页面
|
||||
toApply:function (room) {
|
||||
this.currentRoom = room;
|
||||
this.pageType = 1;
|
||||
},
|
||||
//跳转列表页面
|
||||
cancel:function () {
|
||||
this.pageType = 0;
|
||||
}
|
||||
},
|
||||
components: {
|
||||
DateChange,
|
||||
TimeBox,
|
||||
Apply
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.meeting-room-apply-div {
|
||||
width: 100%;
|
||||
min-height: 20rem;
|
||||
padding: 0.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.data-list-div {
|
||||
width: 100%;
|
||||
min-height: 20rem;
|
||||
.data-row-div {
|
||||
width: 100%;
|
||||
min-height: 5rem;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
padding: 0.5rem 0 0.5rem 0;
|
||||
display: flex;
|
||||
font-size: 12px;
|
||||
.room-img-div {
|
||||
width: 5rem;
|
||||
height: auto;
|
||||
}
|
||||
.room-info-div {
|
||||
width: calc(100% - 5rem);
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding:0 0.5rem ;
|
||||
.top-info-row-div{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
margin-bottom: 0.2rem;
|
||||
.room-type-div{
|
||||
border: 1px solid #31a8fa;
|
||||
color: #31a8fa;
|
||||
padding: 0 0.2rem;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.default-span-div{
|
||||
width: calc(100% - 10rem);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
.info-row-div{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
margin-bottom: 0.2rem;
|
||||
.room-other-info-div{
|
||||
padding: 0 0.5rem;
|
||||
background-color: #f59a23;
|
||||
color: white;
|
||||
border-radius: 10px;
|
||||
margin-right: 0.5rem;
|
||||
margin-bottom: 0.2rem;
|
||||
}
|
||||
.no-data-tips{
|
||||
background-color: #f2f2f2;
|
||||
color: black;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,20 @@
|
||||
export default {
|
||||
/*
|
||||
* 获取会议室预约情况
|
||||
* */
|
||||
"getAppointment":{
|
||||
url:'/intellioa/meetingRoom/apply/getAppointment',
|
||||
method:'get',
|
||||
isTestLogin:true
|
||||
},
|
||||
|
||||
/*
|
||||
* 流程规则
|
||||
* */
|
||||
"getPersonRule":{
|
||||
url:'/intellioa/soflow/rule/getPersonRule',
|
||||
method:'get',
|
||||
isTestLogin:true
|
||||
},
|
||||
|
||||
}
|
Loading…
Reference in new issue