aaa
This commit is contained in:
parent
86ad9fd422
commit
31e2035808
1
App.vue
1
App.vue
|
@ -57,6 +57,7 @@
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
/*每个页面公共css */
|
/*每个页面公共css */
|
||||||
|
@import "@/static/iconfont.css";
|
||||||
@import '@/uni_modules/uni-scss/index.scss';
|
@import '@/uni_modules/uni-scss/index.scss';
|
||||||
@import '@/uni_modules/uni-scss/theme.scss';
|
@import '@/uni_modules/uni-scss/theme.scss';
|
||||||
@import '@/uni_modules/uni-scss/variables.scss';
|
@import '@/uni_modules/uni-scss/variables.scss';
|
||||||
|
|
|
@ -95,7 +95,7 @@
|
||||||
"vueVersion" : "3",
|
"vueVersion" : "3",
|
||||||
"h5" : {
|
"h5" : {
|
||||||
"router" : {
|
"router" : {
|
||||||
"base" : "/h5/",
|
"base" : "/h5x/",
|
||||||
"mode" : "hash"
|
"mode" : "hash"
|
||||||
},
|
},
|
||||||
"devServer" : {
|
"devServer" : {
|
||||||
|
|
30
pages.json
30
pages.json
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"pages": [{
|
"pages": [
|
||||||
|
{
|
||||||
"path": "pages/auth/login",
|
"path": "pages/auth/login",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "登录",
|
"navigationBarTitleText": "登录",
|
||||||
|
@ -24,12 +25,33 @@
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "账户信息"
|
"navigationBarTitleText" : "账户信息"
|
||||||
}
|
}
|
||||||
}],
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/ofm/booking",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "会议室预约"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"path" : "pages/ofm/mroom",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "会议室"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"path" : "pages/ofm/bookingRecord",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "预约记录"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
"navigationBarTitleText": "uni-app",
|
"navigationBarTitleText": "uni-app",
|
||||||
"navigationBarBackgroundColor": "#F8F8F8",
|
"navigationBarBackgroundColor": "#FFFFFF",
|
||||||
"backgroundColor": "#F8F8F8",
|
"backgroundColor": "#FFFFFF",
|
||||||
|
// "backgroundColor": "#F8F8F8",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"background": "#efeff4"
|
"background": "#efeff4"
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,9 @@
|
||||||
</template>
|
</template>
|
||||||
</uni-section>
|
</uni-section>
|
||||||
<uni-section title="功能入口" type="line">
|
<uni-section title="功能入口" type="line">
|
||||||
<uni-grid :column="4" :show-border="false" :square="false" @change="change">
|
<uni-grid :column="4" :show-border="false" :square="false">
|
||||||
<uni-grid-item v-for="(item ,index) in moduleList" :index="index" :key="index">
|
<uni-grid-item v-for="(item ,index) in moduleList" :index="index" :key="index">
|
||||||
<view class="grid-item-box">
|
<view class="grid-item-box" @click="pageEnter(item)">
|
||||||
<image class="image" :src="item.url" mode="aspectFill" />
|
<image class="image" :src="item.url" mode="aspectFill" />
|
||||||
<text class="text">{{item.text}}</text>
|
<text class="text">{{item.text}}</text>
|
||||||
<view v-if="item.badge" class="grid-dot">
|
<view v-if="item.badge" class="grid-dot">
|
||||||
|
@ -23,15 +23,15 @@
|
||||||
<view style="height: 12rpx;"></view>
|
<view style="height: 12rpx;"></view>
|
||||||
<uni-row :gutter="12">
|
<uni-row :gutter="12">
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<navigator style="padding: 28rpx;background-color: white;display: flex;justify-content : space-between;" url="../wf/index?category=duty">
|
<navigator class="middleNavigator" url="../wf/index?category=duty">
|
||||||
<span>待办</span>
|
<span>待办</span>
|
||||||
<span style="color: #2979ff;font-size: 36rpx; font-weight: bold;">3</span>
|
<span class="numSpan">3</span>
|
||||||
</navigator>
|
</navigator>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<navigator style="padding: 28rpx;background-color: white;display: flex;justify-content : space-between;" url="../wf/index?category=owner">
|
<navigator class="middleNavigator" url="../wf/index?category=owner">
|
||||||
<span>我的</span>
|
<span>我的</span>
|
||||||
<span style="color: #2979ff;font-size: 36rpx; font-weight: bold;">3</span>
|
<span class="numSpan">3</span>
|
||||||
</navigator>
|
</navigator>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
|
@ -54,36 +54,27 @@
|
||||||
welTitle: "",
|
welTitle: "",
|
||||||
currentDate: tool.getTodayDate(),
|
currentDate: tool.getTodayDate(),
|
||||||
moduleList: [{
|
moduleList: [{
|
||||||
url: '/static/c1.png',
|
navigate:'/pages/ofm/booking',
|
||||||
text: 'Grid 1',
|
url: '/static/yuding.png',
|
||||||
badge: '0',
|
text: '预定会议室',
|
||||||
type: "primary"
|
type: "primary",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: '/static/c2.png',
|
navigate:'/pages/ofm/bookingRecord',
|
||||||
text: 'Grid 2',
|
url: '/static/meetingRecord.png',
|
||||||
badge: '1',
|
text: '历史预定',
|
||||||
type: "success"
|
type: "success"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: '/static/c3.png',
|
navigate:'/pages/ofm/mroom',
|
||||||
text: 'Grid 3',
|
url: '/static/huiyishi.png',
|
||||||
badge: '99',
|
text: '会议室列表',
|
||||||
type: "warning"
|
type: "warning"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: '/static/c4.png',
|
url: '/static/renyuan.png',
|
||||||
text: 'Grid 4',
|
text: '人员列表',
|
||||||
badge: '2',
|
|
||||||
type: "error"
|
type: "error"
|
||||||
},
|
|
||||||
{
|
|
||||||
url: '/static/c5.png',
|
|
||||||
text: 'Grid 5'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
url: '/static/c6.png',
|
|
||||||
text: '全部'
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -108,13 +99,21 @@
|
||||||
url: "/pages/system/userInfo"
|
url: "/pages/system/userInfo"
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
pageEnter(item){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:item.navigate
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.image {
|
.image {
|
||||||
width: 25px;
|
width: 120rpx;
|
||||||
height: 25px;
|
height: 120rpx;
|
||||||
|
padding: 10rpx;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
background-color: #2979ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
|
@ -124,7 +123,6 @@
|
||||||
|
|
||||||
.grid-item-box {
|
.grid-item-box {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
// position: relative;
|
|
||||||
/* #ifndef APP-NVUE */
|
/* #ifndef APP-NVUE */
|
||||||
display: flex;
|
display: flex;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
|
@ -139,6 +137,17 @@
|
||||||
top: 5px;
|
top: 5px;
|
||||||
right: 15px;
|
right: 15px;
|
||||||
}
|
}
|
||||||
|
.middleNavigator{
|
||||||
|
padding: 28rpx;
|
||||||
|
background-color: white;
|
||||||
|
display: flex;
|
||||||
|
justify-content : space-between;
|
||||||
|
}
|
||||||
|
.numSpan{
|
||||||
|
color: #2979ff;
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
.swiper {
|
.swiper {
|
||||||
height: 420px;
|
height: 420px;
|
||||||
|
|
|
@ -0,0 +1,362 @@
|
||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<view class="topView">
|
||||||
|
<!-- 日期和会议室 -->
|
||||||
|
<view class="titleView">
|
||||||
|
<view class="viewLabel">会议名称:</view>
|
||||||
|
<view v-if="type=='show'">{{form.title}}</view>
|
||||||
|
<input v-else v-model="form.title" class="inputStyle"/>
|
||||||
|
</view>
|
||||||
|
<view class="roomView">
|
||||||
|
<view class="viewLabel">会议室:</view>
|
||||||
|
<view v-if="type=='show'">{{form.mroom_name}}</view>
|
||||||
|
<picker v-else @change="bindPickerChange" :range-key="'name'" :value="index" :range="mroomList" class="pickerDom">
|
||||||
|
<view class="uni-input">{{mroomList[index].name}}</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
<view class="titleView">
|
||||||
|
<view class="viewLabel">参加人数:</view>
|
||||||
|
<view v-if="type=='show'">{{form.participant_count}}</view>
|
||||||
|
<input v-else v-model="form.participant_count" class="inputStyle"/>
|
||||||
|
</view>
|
||||||
|
<view class="titleView">
|
||||||
|
<view class="viewLabel">参会领导:</view>
|
||||||
|
<view v-if="type=='show'">{{form.key_participants}}</view>
|
||||||
|
<input v-else v-model="form.key_participants" class="inputStyle"/>
|
||||||
|
</view>
|
||||||
|
<view class="dateView">
|
||||||
|
<view class="viewLabel">预约时间:</view>
|
||||||
|
<view v-if="type=='show'">{{form.mdate}}</view>
|
||||||
|
<uni-datetime-picker v-else style="width: 540upx;" type="date" :clear-icon="false" v-model="form.mdate"/>
|
||||||
|
</view>
|
||||||
|
<view class="titleView">
|
||||||
|
<view class="viewLabel">备注:</view>
|
||||||
|
<view v-if="type=='show'">{{form.note}}</view>
|
||||||
|
<input v-else v-model="form.note" class="inputStyle"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="timeView">
|
||||||
|
<view style="height: 70upx;line-height: 70upx;">
|
||||||
|
<text>凌晨:</text>
|
||||||
|
<view class="iconsWrap" @click="showAmChange">
|
||||||
|
<uni-icons v-if="showAm" type="up" size="20" color="#ffffff"></uni-icons>
|
||||||
|
<uni-icons v-else type="down" size="20" color="#ffffff"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view :class="{'amBlockHide':!showAm,'amBlock': showAm}">
|
||||||
|
<view v-for="(item,index) in timesListAm" :key="item.value" class="timeBlock ">
|
||||||
|
<view :class="{'isSelected':item.selected,'timeItem': true}" @click="timeItemClickAm(index)">{{item.label}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-for="(item,index) in timesListPm" :key="item.value" class="timeBlock">
|
||||||
|
<view :class="{'isSelected':item.selected,'timeItem': true}" @click="timeItemClickPm(index)">{{item.label}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="footerView">
|
||||||
|
<text>已选时间段:</text>
|
||||||
|
<view class="">
|
||||||
|
<text v-for="item in selectList" :key="item.value">{{item.label}}、</text>
|
||||||
|
</view>
|
||||||
|
<view>共{{totalCount}}小时</view>
|
||||||
|
<view style="position: relative;text-align: right;">
|
||||||
|
<button
|
||||||
|
class="mini-btn buttonSure" type="primary" size="mini"
|
||||||
|
v-for="item in transitions"
|
||||||
|
:key="item.id"
|
||||||
|
:type="item.attribute_type === 2 ? 'danger' : 'primary'"
|
||||||
|
@click="submit(item.id)"
|
||||||
|
>{{ item.name }}</button>
|
||||||
|
<button @click="uni.navigateBack(-1)" size="mini" class="mini-btn">取消</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data(){
|
||||||
|
return{
|
||||||
|
index:0,
|
||||||
|
totalCount:0,
|
||||||
|
pickDate:'',
|
||||||
|
mroomId:'',
|
||||||
|
ticketId:null,
|
||||||
|
showAm:false,
|
||||||
|
bookingTitle:'',
|
||||||
|
form:{
|
||||||
|
id:'',
|
||||||
|
note:'',
|
||||||
|
title:'',
|
||||||
|
mroom:'',
|
||||||
|
mdate:'',
|
||||||
|
slots:[],
|
||||||
|
create_by_phone:'',
|
||||||
|
key_participants:'',
|
||||||
|
participant_count:'',
|
||||||
|
belong_dept:uni.getStorageSync('userInfo').belong_dept
|
||||||
|
},
|
||||||
|
selectList:[],
|
||||||
|
mroomList: [],
|
||||||
|
transitions:[],
|
||||||
|
//凌晨0-6点
|
||||||
|
timesListAm:[
|
||||||
|
{value:0,label:'00:00-00:30',isSelect:false},
|
||||||
|
{value:1,label:'00:30-01:00',isSelect:false},
|
||||||
|
{value:2,label:'01:00-01:30',isSelect:false},
|
||||||
|
{value:3,label:'01:30-02:00',isSelect:false},
|
||||||
|
{value:4,label:'02:00-02:30',isSelect:false},
|
||||||
|
{value:5,label:'02:30-03:00',isSelect:false},
|
||||||
|
{value:6,label:'03:00-03:30',isSelect:false},
|
||||||
|
{value:7,label:'03:30-04:00',isSelect:false},
|
||||||
|
{value:8,label:'04:00-04:30',isSelect:false},
|
||||||
|
{value:9,label:'04:30-05:00',isSelect:false},
|
||||||
|
{value:10,label:'05:00-05:30',isSelect:false},
|
||||||
|
{value:11,label:'05:30-06:00',isSelect:false}
|
||||||
|
],
|
||||||
|
timesListPm:[
|
||||||
|
{value:12,label:'06:00-06:30',isSelect:false},
|
||||||
|
{value:13,label:'06:30-07:00',isSelect:false},
|
||||||
|
{value:14,label:'07:00-07:30',isSelect:false},
|
||||||
|
{value:15,label:'07:30-08:00',isSelect:false},
|
||||||
|
{value:16,label:'08:00-08:30',isSelect:false},
|
||||||
|
{value:17,label:'08:30-09:00',isSelect:false},
|
||||||
|
{value:18,label:'09:00-09:30',isSelect:false},
|
||||||
|
{value:19,label:'09:30-10:00',isSelect:false},
|
||||||
|
{value:20,label:'10:00-10:30',isSelect:false},
|
||||||
|
{value:21,label:'10:30-11:00',isSelect:false},
|
||||||
|
{value:22,label:'11:00-11:30',isSelect:false},
|
||||||
|
{value:23,label:'11:30-12:00',isSelect:false},
|
||||||
|
{value:24,label:'12:00-12:30',isSelect:false},
|
||||||
|
{value:25,label:'12:30-13:00',isSelect:false},
|
||||||
|
{value:26,label:'13:00-13:30',isSelect:false},
|
||||||
|
{value:27,label:'13:30-14:00',isSelect:false},
|
||||||
|
{value:28,label:'14:00-14:30',isSelect:false},
|
||||||
|
{value:29,label:'14:30-15:00',isSelect:false},
|
||||||
|
{value:30,label:'15:00-15:30',isSelect:false},
|
||||||
|
{value:31,label:'15:30-16:00',isSelect:false},
|
||||||
|
{value:32,label:'16:00-16:30',isSelect:false},
|
||||||
|
{value:33,label:'16:30-17:00',isSelect:false},
|
||||||
|
{value:34,label:'17:00-17:30',isSelect:false},
|
||||||
|
{value:35,label:'17:30-18:00',isSelect:false},
|
||||||
|
{value:36,label:'18:00-18:30',isSelect:false},
|
||||||
|
{value:37,label:'18:30-19:00',isSelect:false},
|
||||||
|
{value:38,label:'19:00-19:30',isSelect:false},
|
||||||
|
{value:39,label:'19:30-20:00',isSelect:false},
|
||||||
|
{value:40,label:'20:00-20:30',isSelect:false},
|
||||||
|
{value:41,label:'20:30-21:00',isSelect:false},
|
||||||
|
{value:42,label:'21:00-21:30',isSelect:false},
|
||||||
|
{value:43,label:'21:30-22:00',isSelect:false},
|
||||||
|
{value:44,label:'22:00-22:30',isSelect:false},
|
||||||
|
{value:45,label:'22:30-23:00',isSelect:false},
|
||||||
|
{value:46,label:'23:00-23:30',isSelect:false},
|
||||||
|
{value:47,label:'23:30-24:00',isSelect:false}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
let that = this;
|
||||||
|
that.form.id='';
|
||||||
|
that.mroomId = options.mroomId;
|
||||||
|
that.getmRooms();
|
||||||
|
that.getTransitions();
|
||||||
|
console.log('options',options)
|
||||||
|
console.log(uni.getStorageSync('userInfo'))
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
getTransitions(){
|
||||||
|
let that = this;
|
||||||
|
console.log('getTransitions')
|
||||||
|
if(that.ticketId!==null){
|
||||||
|
that.$api.getTransition(that.ticketId).then(res=>{
|
||||||
|
that.transitions = res;
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
that.$api.workflowInitkey('booking').then(res=>{
|
||||||
|
that.transitions = res.transitions;
|
||||||
|
that.workflow = res.workflow;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getmRooms(){
|
||||||
|
let that = this;
|
||||||
|
that.$api.getMroom({ page: 0}).then(res=>{
|
||||||
|
that.mroomList = res;
|
||||||
|
if(that.mroomId!==''&&res.length>0){
|
||||||
|
that.form.mroom = res[0].id;
|
||||||
|
res.forEach((item,index)=>{
|
||||||
|
if(item.id==that.mroomId){
|
||||||
|
that.index = index ;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
that.index = null;
|
||||||
|
}
|
||||||
|
}).catch(e=>{})
|
||||||
|
},
|
||||||
|
showAmChange(){
|
||||||
|
this.showAm = !this.showAm;
|
||||||
|
},
|
||||||
|
timeItemClickAm(index){
|
||||||
|
this.timesListAm[index].selected = !this.timesListAm[index].selected;
|
||||||
|
this.clickItems();
|
||||||
|
},
|
||||||
|
timeItemClickPm(index){
|
||||||
|
this.timesListPm[index].selected = !this.timesListPm[index].selected;
|
||||||
|
this.clickItems();
|
||||||
|
},
|
||||||
|
clickItems(){
|
||||||
|
let that = this;
|
||||||
|
let lists = [],slots=[];
|
||||||
|
that.timesListAm.forEach(item=>{
|
||||||
|
if(item.selected){
|
||||||
|
lists.push(item)
|
||||||
|
slots.push(item.value);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
that.timesListPm.forEach(item2=>{
|
||||||
|
if(item2.selected){
|
||||||
|
lists.push(item2)
|
||||||
|
slots.push(item2.value);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
setTimeout(()=>{
|
||||||
|
that.totalCount = slots.length*0.5;
|
||||||
|
that.selectList = lists;
|
||||||
|
that.form.slots = slots;
|
||||||
|
},500)
|
||||||
|
},
|
||||||
|
bindPickerChange(e) {
|
||||||
|
this.form.mroom = e.detail.value;
|
||||||
|
this.index = e.detail.value;
|
||||||
|
},
|
||||||
|
submit(id){
|
||||||
|
let that = this;
|
||||||
|
console.log('that.form',that.form)
|
||||||
|
if(that.form.id == "") {
|
||||||
|
that.$api.bookingCreate(that.form).then(res=>{
|
||||||
|
that.form.id = res.id;
|
||||||
|
that.ticketSubmit(id,that.form.id)
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
that.$api.bookingUpdate(that.form.id, that.form).then(res=>{
|
||||||
|
that.ticketSubmit(id,that.form.id)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ticketSubmit(id,t_id){
|
||||||
|
let that = this;
|
||||||
|
let params = {};
|
||||||
|
params.title = that.mroomList[that.index].name+'预约';
|
||||||
|
params.workflow = that.workflow ;
|
||||||
|
params.transition = id;
|
||||||
|
params.ticket_data = {t_id:t_id};
|
||||||
|
that.$api.ticketCreate(params).then(res=>{
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.container{
|
||||||
|
height: 100%;
|
||||||
|
padding: 0!important;
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
.topView{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.roomView,.dateView,.titleView{
|
||||||
|
height: 35px;
|
||||||
|
display: flex;
|
||||||
|
padding: 10upx;
|
||||||
|
line-height: 35px;
|
||||||
|
margin-bottom: 10upx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
.inputStyle{
|
||||||
|
height: 35px;
|
||||||
|
width: 560upx;
|
||||||
|
padding: 0 10px;
|
||||||
|
line-height: 35px;
|
||||||
|
border-radius: 10upx;
|
||||||
|
display: inline-block;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.viewLabel{
|
||||||
|
width: 160upx;
|
||||||
|
font-size: 30upx;
|
||||||
|
text-align: right;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.iconsWrap{
|
||||||
|
width: 40upx;
|
||||||
|
height: 40upx;
|
||||||
|
display: inline-block;
|
||||||
|
line-height: 40upx;
|
||||||
|
border-radius: 25upx;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #74ddfc;
|
||||||
|
border: 1px solid #74ddfc;
|
||||||
|
}
|
||||||
|
.pickerDom{
|
||||||
|
height: 35px;
|
||||||
|
width: 560upx;
|
||||||
|
line-height: 35px;
|
||||||
|
padding-left: 20upx;
|
||||||
|
border-radius: 8upx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
.timeView{
|
||||||
|
width: 100%;
|
||||||
|
padding: 10upx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.amBlock{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.amBlockHide{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.timeBlock{
|
||||||
|
width: 25%;
|
||||||
|
padding: 6upx;
|
||||||
|
height: 70upx;
|
||||||
|
margin: 10upx 0;
|
||||||
|
font-size: 28upx;
|
||||||
|
line-height: 70upx;
|
||||||
|
display: inline-block;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.timeItem{
|
||||||
|
color: #666666;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 10upx;
|
||||||
|
background-color: #b9f0cb;
|
||||||
|
border: 1upx solid #eeeeee;
|
||||||
|
}
|
||||||
|
.timeItem.notCanSelect{
|
||||||
|
background-color: #ff8888;
|
||||||
|
}
|
||||||
|
.timeItem.isSelected{
|
||||||
|
background-color: #ffce88
|
||||||
|
}
|
||||||
|
.footerView{
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 100%;
|
||||||
|
padding:10px;
|
||||||
|
background-color: #ffffff;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #666666;
|
||||||
|
}
|
||||||
|
.buttonSure{
|
||||||
|
margin-top: 10upx;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,126 @@
|
||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<view v-for="item in dataList" class="uni-list-item">
|
||||||
|
<view class="uni-list-item__container">
|
||||||
|
<view class="uni-list-item__content" @click="handleClick(item)">
|
||||||
|
<view class="uni-list-item__content-title">{{item.title}}</view>
|
||||||
|
<view class="uni-list-item__content-note">预约日期:{{item.mdate}}</view>
|
||||||
|
<view class="uni-list-item__content-note">参加人数:{{item.participant_count}}</view>
|
||||||
|
<view class="uni-list-item__content-note">所属部门:{{item.belong_dept_name}}</view>
|
||||||
|
<view class="uni-list-item__content-note">参会领导:{{item.key_participants}}</view>
|
||||||
|
<view class="uni-list-item__content-note">预约会议室:{{item.mroom_name}}</view>
|
||||||
|
<view class="uni-list-item__content-note">预约时间:<text v-for="range in item.time_ranges">{{range}}、</text></view>
|
||||||
|
<view v-if="item.note!==null" class="uni-list-item__content-note">备注:{{item.note}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data(){
|
||||||
|
return{
|
||||||
|
page:1,
|
||||||
|
page_size:10,
|
||||||
|
dataList:[],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getlistData();
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
getlistData(){
|
||||||
|
let that = this;
|
||||||
|
that.$api.bookingList({page:that.page,page_size:that.page_size}).then(res=>{
|
||||||
|
that.dataList = res.results;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleClick(item){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/ofm/booking?item='+item,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.container{
|
||||||
|
height: 100%;
|
||||||
|
padding: 0!important;
|
||||||
|
}
|
||||||
|
.chat-custom-right {
|
||||||
|
flex: 1;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chat-custom-text {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
.uniListItem{
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.stateIcon{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
.yiwancheng{
|
||||||
|
color: #ff0000;
|
||||||
|
}
|
||||||
|
.uni-list-item{
|
||||||
|
display: flex;
|
||||||
|
font-size: 16px;
|
||||||
|
position: relative;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: row;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.uni-list-item__container{
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
padding:20upx 30upx;
|
||||||
|
padding-left: 30upx;
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.uni-list-item__content{
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
color: #3b4144;
|
||||||
|
background-color: #c4f0f6;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
overflow: hidden;
|
||||||
|
border: 5upx solid #9ce7f1;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 20upx;
|
||||||
|
border-radius: 20upx;
|
||||||
|
box-shadow: 0 0 10upx 10upx rgba(196,232,246,.3);
|
||||||
|
}
|
||||||
|
/* .uni-list-item__content:hover,
|
||||||
|
.uni-list-item__content:focus{
|
||||||
|
border: 1px solid #7ed47e;
|
||||||
|
} */
|
||||||
|
.uni-list-item__content-title{
|
||||||
|
font-size: 14px;
|
||||||
|
color: #3b4144;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.uni-list-item__content-note{
|
||||||
|
margin-top: 0.1875rem;
|
||||||
|
color: #999;
|
||||||
|
font-size: 12px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,112 @@
|
||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<!-- 搜索框 -->
|
||||||
|
<view class="searchView">
|
||||||
|
<uni-search-bar class="searchInput" radius="5" placeholder="搜索" clearButton="auto" cancelButton="none" @confirm="search" />
|
||||||
|
</view>
|
||||||
|
<view class="roomView">
|
||||||
|
<view v-for=" item in tlist" :key="item.id">
|
||||||
|
<uni-card :title="item.name" class="roomCard">
|
||||||
|
<view class="uni-body">容纳人数:{{item.capacity}}</view>
|
||||||
|
<view class="uni-body">位置:{{item.location}}</view>
|
||||||
|
<view slot="actions" class="card-actions">
|
||||||
|
<view class="card-actions-item" @click="actionsClick(item)">
|
||||||
|
<text class="card-actions-item-text">立即预定</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-card>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
page: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
inputValue:'',
|
||||||
|
status: 'noMore',
|
||||||
|
tlist: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getmRooms();
|
||||||
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.page = 1;
|
||||||
|
this.getmRooms();
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
getmRooms(){
|
||||||
|
let that = this;
|
||||||
|
that.status = 'loading';
|
||||||
|
that.$api.getMroom({ page: that.page, page_size: that.pageSize}).then(data=>{
|
||||||
|
if(data.results.length < that.pageSize){
|
||||||
|
that.status = 'noMore';
|
||||||
|
}else{
|
||||||
|
that.status = 'more';
|
||||||
|
}
|
||||||
|
if(that.page == 1){
|
||||||
|
that.tlist = data.results;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
that.tlist = that.tlist.concat(data.results)
|
||||||
|
}
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
}).catch(e=>{
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onKeyInput: function(event) {
|
||||||
|
this.inputValue = event.detail.value
|
||||||
|
},
|
||||||
|
actionsClick(item){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/ofm/booking?mroomId='+item.id,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
@font-face {
|
||||||
|
font-family: CustomFont;
|
||||||
|
src: url('./iconfont.ttf');
|
||||||
|
}
|
||||||
|
.container{
|
||||||
|
padding: 10rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
.searchView{
|
||||||
|
height: 70rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
}
|
||||||
|
.searchIcon{
|
||||||
|
margin: auto 10rpx;
|
||||||
|
}
|
||||||
|
.searchInput{
|
||||||
|
padding: 0!important;
|
||||||
|
height: 70rpx;
|
||||||
|
}
|
||||||
|
.roomCard{
|
||||||
|
padding: 0!important;
|
||||||
|
}
|
||||||
|
.uni-card .uni-card__content{
|
||||||
|
padding: 0!important;
|
||||||
|
}
|
||||||
|
.uni-body{
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
.card-actions-item{
|
||||||
|
text-align: center;
|
||||||
|
height: 70rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
background-color: #9fd3b0;
|
||||||
|
}
|
||||||
|
.card-actions-item-text{
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
</style>
|
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
|
@ -0,0 +1,93 @@
|
||||||
|
@font-face {
|
||||||
|
font-family: "iconfont";
|
||||||
|
src: url('/static/iconfont.ttf') format('truetype');
|
||||||
|
}
|
||||||
|
|
||||||
|
.iconfont {
|
||||||
|
font-family: "iconfont" !important;
|
||||||
|
font-size: 16px;
|
||||||
|
font-style: normal;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-weikaishi2:before {
|
||||||
|
content: "\e744";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-jinhangzhong2:before {
|
||||||
|
content: "\e64e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-jinhangzhong:before {
|
||||||
|
content: "\e72b";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-weikaishi:before {
|
||||||
|
content: "\e72a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-yijieshu4:before {
|
||||||
|
content: "\e729";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-weikaishi21:before {
|
||||||
|
content: "\e635";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-arrow-up:before {
|
||||||
|
content: "\e612";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-arrow-down:before {
|
||||||
|
content: "\e613";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-RectangleCopy:before {
|
||||||
|
content: "\e6a2";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-RectangleCopy1:before {
|
||||||
|
content: "\e6a9";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-RectangleCopy2:before {
|
||||||
|
content: "\e6eb";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-canyubiaojue:before {
|
||||||
|
content: "\e681";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-shijian:before {
|
||||||
|
content: "\e684";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-yiban-01:before {
|
||||||
|
content: "\e69d";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-huiyi-01:before {
|
||||||
|
content: "\e69e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-yicheng-01:before {
|
||||||
|
content: "\e69f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-huanjieliebiao1-01:before {
|
||||||
|
content: "\e6a0";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-lishihuiyi-01:before {
|
||||||
|
content: "\e6a1";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-qiandaochaxun-01:before {
|
||||||
|
content: "\e6a3";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-yonghu-01:before {
|
||||||
|
content: "\e6a4";
|
||||||
|
}
|
||||||
|
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
12
utils/api.js
12
utils/api.js
|
@ -11,5 +11,15 @@ export default {
|
||||||
codeLogin:(data) => http('/auth/login_sms_code/', 'POST', data),
|
codeLogin:(data) => http('/auth/login_sms_code/', 'POST', data),
|
||||||
wxmpLogin: (data) => http('/auth/login_wxmp/', 'POST', data, true, false), //微信小程序登录
|
wxmpLogin: (data) => http('/auth/login_wxmp/', 'POST', data, true, false), //微信小程序登录
|
||||||
wxmpClogin: (data) => http('/auth/login_wxmp/', 'POST', data, true, false), //微信小程序登录(自动创建账号)
|
wxmpClogin: (data) => http('/auth/login_wxmp/', 'POST', data, true, false), //微信小程序登录(自动创建账号)
|
||||||
getTicket:(query) => http('/wf/ticket/', 'GET', query),
|
getTicket:(data) => http('/wf/ticket/', 'GET', data),
|
||||||
|
ticketCreate:(data)=>http('/wf/ticket/', 'POST', data),
|
||||||
|
ticketHandle:(id,data)=>http(`/wf/ticket/${id}/handle/`, 'POST', data),
|
||||||
|
getMroom:(data) => http('/ofm/mroom/', 'GET', data),
|
||||||
|
getTransition:(id) => http(`/wf/ticket/${id}/transitions/`, 'GET'),
|
||||||
|
workflowInitkey:(key) => http(`/wf/workflow/${key}/init_key/`, 'GET'),
|
||||||
|
bookingList:(data) => http('/ofm/mroombooking/', 'GET', data),
|
||||||
|
bookingItem:(id,data) => http(`/ofm/mroombooking/${id}/`, 'GET', data),
|
||||||
|
bookingCreate:(data) => http(`/ofm/mroombooking/`, 'POST', data),
|
||||||
|
bookingUpdate:(id,data) => http(`/ofm/mroombooking/${id}/`, 'PUT', data),
|
||||||
|
bookingDelete:(id) => http(`/ofm/mroombooking/${id}/`, 'DELETE'),
|
||||||
}
|
}
|
Loading…
Reference in New Issue