Browse Source

初始化

元子 5 months ago
parent
commit
afa5410d7f

+ 2 - 1
app.json

@@ -22,7 +22,8 @@
     "pages/myTransfer/index/index",
     "pages/myTransfer/detail/index",
     "pages/audit/index/index",
-    "pages/audit/deteil/index"
+    "pages/audit/deteil/index",
+    "pages/meetingRecord/index/index"
 
   ],
   "window":{

+ 2 - 2
components/myMeetingModule/index.wxml

@@ -16,12 +16,12 @@
     </view>
     <view class="status">
         <text class="status-text {{item.status==1?'status1':item.status==2?'status2':item.status==3?'status3':''}}" wx:if="{{type=='my-meeting'}}">{{item.status==1?'未开始':item.status==2?'进行中':item.status==3?'已结束':''}}</text>
-        <text class="f-w" wx:if="{{type=='subscribe-audit'}}">预约人:{{item.name}}</text>
+        <text class="f-w" wx:if="{{type=='subscribe-audit'||type=='meeting-record'}}">预约人:{{item.name}}</text>
         <view>
             <van-icon name="friends" />
             <text>参会{{item.meetingNum}}人</text>
         </view>
     </view>
     <image wx:if="{{type=='my-subscribe'}}" class="status-img1" src="/static/status/{{item.status==1?'audit':item.status==2?'pass':item.status==3?'refuse':item.status==4?'cancel':item.status==5?'transfer':''}}.png" mode="" />
-    <image wx:if="{{type=='subscribe-audit'}}" class="status-img" src="/static/status/{{item.status==1?'audit':item.status==2?'pass':item.status==3?'refuse':item.status==4?'cancel':item.status==5?'transfer':''}}.png" mode="" />
+    <image wx:if="{{type=='subscribe-audit'||type=='meeting-record'}}" class="status-img" src="/static/status/{{item.status==1?'audit':item.status==2?'pass':item.status==3?'refuse':item.status==4?'cancel':item.status==5?'transfer':''}}.png" mode="" />
 </view>

+ 273 - 254
pages/home/home.js

@@ -1,286 +1,305 @@
 // pages/home/home.js
 import {
-    meetingGetPageList,
-    myMeeting
+  meetingGetPageList,
+  myMeeting
 } from '../../utils/api/meeting'
 import {
-    doGetInfo
+  doGetInfo
 } from '../../utils/api/api'
 import {
-    GetQueryJson
+  GetQueryJson
 } from '../../utils/util'
 const app = getApp();
 Page({
 
-    /**
-     * 页面的初始数据
-     */
-    data: {
-        StatusBar: app.globalData.StatusBar, //胶囊按钮位置
-        CustomBar: app.globalData.CustomBar,
-        userInfo: wx.getStorageSync('userInfo'),
-        myMeetingList: [],
-        meetingList: [],
-        funList: [{
-                id: '1',
-                name: '会议室预约',
-                img: '/static/home/home-1.png',
-                url: '/pages/meeting/index/index?type=meeting-detail',
-                jurisdiction: [1, 2],
-            },
-            {
-                id: '2',
-                name: '我的会议',
-                img: '/static/home/home-2.png',
-                url: '/pages/myMeeting/index/index?type=my-meeting',
-                jurisdiction: [1],
-            },
-            {
-                id: '3',
-                name: '我的预约',
-                img: '/static/home/home-3.png',
-                url: '/pages/mySubscribe/index/index?type=my-subscribe',
-                jurisdiction: [1],
-            },
-            {
-                id: '10',
-                name: '我的续约',
-                img: '/static/home/home-4.png',
-                url: '/pages/myRenewalContract/index/index?type=my-renewalContract',
-                jurisdiction: [1],
-            },
-            {
-                id: '5',
-                name: '我的转让',
-                img: '/static/home/home-5.png',
-                url: '/pages/myTransfer/index/index?type=my-transfer',
-                jurisdiction: [1],
-            },
-            {
-                id: '6',
-                name: '转让审核',
-                img: '/static/home/home-6.png',
-                url: '/pages/myTransfer/index/index?type=transfer-audit',
-                jurisdiction: [1],
-            },
-            {
-                id: '4',
-                name: '预约审核',
-                img: '/static/home/home-7.png',
-                url: '/pages/mySubscribe/index/index?type=subscribe-audit',
-                jurisdiction: [2],
-            },
-            {
-                id: '7',
-                name: '续约审核',
-                img: '/static/home/home-8.png',
-                url: '/pages/myRenewalContract/index/index?type=renewalContract-audit',
-                jurisdiction: [2],
-            },
-            {
-                id: '9',
-                name: '会议服务',
-                img: '/static/home/home-9.png',
-                url: '/pages/orderMeal/index/index?type=order-audit',
-                jurisdiction: [3],
-            },
-        ],
-        // accountId: null,
-        // accountName: null,
-    },
-    // getVal(e) {
-    //     console.log(e);
-    //     this.setData({
-    //         accountName: this.data.accountList[e.detail.value].name,
-    //         accountId: this.data.accountList[e.detail.value].id
-    //     })
-    // },
-    gotomy() {
-        wx.switchTab({
-            url: '/pages/mine/index/index',
-        })
-    },
-    // 我的会议室-数据
-    myMeeting() {
-        let data = {
-            data: {
-                appointmentStatus: null
-            },
-            pageNum: 1,
-            pageSize: 3,
-        }
-        myMeeting(data).then(res => {
-            this.setData({
-                myMeetingList: res.data.records
-            })
-        })
-    },
-    // 会议室-数据
-    meetingGetList() {
-        let data = {
-            pageNum: 1,
-            pageSize: 8,
-        }
-        meetingGetPageList(data).then(res => {
-            this.setData({
-                meetingList: res.data.records
-            })
-        })
-    },
-    // 我的会议-详情
-    myMeetingFun(e) {
-        let item = e.currentTarget.dataset.item
-        item.status = item.appointmentStatus
-        item = JSON.stringify(e.currentTarget.dataset.item)
-        wx.navigateTo({
-            url: '/pages/meeting/appointmentDetail/index?item=' + item + '&type=' + e.currentTarget.dataset.type
-        })
-    },
-    // 会议室-详情
-    goRoomFun(e) {
-        let type = 'meeting-detail'
-        if (e.currentTarget.dataset.item) {
-            let item = JSON.stringify(e.currentTarget.dataset.item)
-            wx.navigateTo({
-                url: '/pages/meeting/detail/index?item=' + item + '&type=' + type
-            })
-        } else {
-            wx.navigateTo({
-                url: '/pages/meeting/index/index?' + '&type=' + type
-            })
-        }
-    },
-    // 功能区
-    goFun(e) {
-        let item = e.currentTarget.dataset.item
-        if (item.id == 6 || item.id == 4 || item.id == 7 || item.id == 9) {
-            wx.requestSubscribeMessage({
-                tmplIds: ['w7cy1am3DS8BF31uUDoMKfruKWQXT0ckhALzyUdvweg', 'mJs6TXjIFuwgPu2JOEIpu3lO9ym9rnai-schUPuLuok'],
-                success(res) {
-                    wx.navigateTo({
-                        url: item.url
-                    })
-                }
-            })
-        } else {
-            wx.navigateTo({
-                url: item.url
-            })
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    StatusBar: app.globalData.StatusBar, //胶囊按钮位置
+    CustomBar: app.globalData.CustomBar,
+    userInfo: wx.getStorageSync('userInfo'),
+    myMeetingList: [],
+    meetingList: [],
+    funList: [{
+        id: '1',
+        name: '会议室预约',
+        img: '/static/home/home-1.png',
+        url: '/pages/meeting/index/index?type=meeting-detail',
+        jurisdiction: [1, 2],
+      },
+      {
+        id: '2',
+        name: '我的会议',
+        img: '/static/home/home-2.png',
+        url: '/pages/myMeeting/index/index?type=my-meeting',
+        jurisdiction: [1],
+      },
+      {
+        id: '3',
+        name: '我的预约',
+        img: '/static/home/home-3.png',
+        url: '/pages/mySubscribe/index/index?type=my-subscribe',
+        jurisdiction: [1],
+      },
+      {
+        id: '10',
+        name: '我的续约',
+        img: '/static/home/home-4.png',
+        url: '/pages/myRenewalContract/index/index?type=my-renewalContract',
+        jurisdiction: [1],
+      },
+      {
+        id: '5',
+        name: '我的转让',
+        img: '/static/home/home-5.png',
+        url: '/pages/myTransfer/index/index?type=my-transfer',
+        jurisdiction: [1],
+      },
+      {
+        id: '6',
+        name: '转让审核',
+        img: '/static/home/home-6.png',
+        url: '/pages/myTransfer/index/index?type=transfer-audit',
+        jurisdiction: [1],
+      },
+      {
+        id: '4',
+        name: '预约审核',
+        img: '/static/home/home-7.png',
+        url: '/pages/mySubscribe/index/index?type=subscribe-audit',
+        jurisdiction: [2],
+      },
+      {
+        id: '7',
+        name: '续约审核',
+        img: '/static/home/home-8.png',
+        url: '/pages/myRenewalContract/index/index?type=renewalContract-audit',
+        jurisdiction: [2],
+      },
+      {
+        id: '11',
+        name: '已约会议',
+        img: '/static/home/home-10.png',
+        url: '/pages/meeting/index/index?type=meeting-detail&statusItem=1',
+        jurisdiction: [3],
+      },
+      {
+        id: '12',
+        name: '会议记录',
+        img: '/static/home/home-2.png',
+        url: '/pages/meetingRecord/index/index?type=meeting-record',
+        jurisdiction: [3],
+      },
+      {
+        id: '9',
+        name: '会议服务',
+        img: '/static/home/home-9.png',
+        url: '/pages/orderMeal/index/index?type=order-audit',
+        jurisdiction: [3],
+      },
+    ],
+    // accountId: null,
+    // accountName: null,
+  },
+  // getVal(e) {
+  //     console.log(e);
+  //     this.setData({
+  //         accountName: this.data.accountList[e.detail.value].name,
+  //         accountId: this.data.accountList[e.detail.value].id
+  //     })
+  // },
+  gotomy() {
+    wx.switchTab({
+      url: '/pages/mine/index/index',
+    })
+  },
+  // 我的会议室-数据
+  myMeeting() {
+    let data = {
+      data: {
+        appointmentStatus: null
+      },
+      pageNum: 1,
+      pageSize: 3,
+    }
+    myMeeting(data).then(res => {
+      this.setData({
+        myMeetingList: res.data.records
+      })
+    })
+  },
+  // 会议室-数据
+  meetingGetList() {
+    let data = {
+      pageNum: 1,
+      pageSize: 8,
+    }
+    meetingGetPageList(data).then(res => {
+      this.setData({
+        meetingList: res.data.records
+      })
+    })
+  },
+  // 我的会议-详情
+  myMeetingFun(e) {
+    let item = e.currentTarget.dataset.item
+    item.status = item.appointmentStatus
+    item = JSON.stringify(e.currentTarget.dataset.item)
+    wx.navigateTo({
+      url: '/pages/meeting/appointmentDetail/index?item=' + item + '&type=' + e.currentTarget.dataset.type
+    })
+  },
+  // 会议室-详情
+  goRoomFun(e) {
+    let type = 'meeting-detail'
+    if (e.currentTarget.dataset.item) {
+      let item = JSON.stringify(e.currentTarget.dataset.item)
+      wx.navigateTo({
+        url: '/pages/meeting/detail/index?item=' + item + '&type=' + type
+      })
+    } else {
+      wx.navigateTo({
+        url: '/pages/meeting/index/index?' + '&type=' + type
+      })
+    }
+  },
+  // 功能区
+  goFun(e) {
+    let item = e.currentTarget.dataset.item
+    if (item.id == 6 || item.id == 4 || item.id == 7 || item.id == 9) {
+      wx.requestSubscribeMessage({
+        tmplIds: ['w7cy1am3DS8BF31uUDoMKfruKWQXT0ckhALzyUdvweg', 'mJs6TXjIFuwgPu2JOEIpu3lO9ym9rnai-schUPuLuok'],
+        success(res) {
+          wx.navigateTo({
+            url: item.url
+          })
         }
-    },
+      })
+    } else {
+      wx.navigateTo({
+        url: item.url
+      })
+    }
+  },
 
-    doGetInfo() {
-        let userInfo = wx.getStorageSync('userInfo')
-        if (userInfo) {
-            doGetInfo().then(res => {
-                if (res.code == 200) {
-                    userInfo = Object.assign(userInfo, res.data);
-                    this.setData({
-                        userInfo
-                    })
-                    wx.setStorageSync('userInfo', userInfo)
-                    this.meetingGetList()
-                    // 预约权限
-                    if (userInfo.appointmentAuth) {
-                        this.myMeeting()
-                    }
-                } else {
-                    this.removeData()
-                }
-            }).catch((err) => {
-                this.removeData()
+  doGetInfo() {
+    let userInfo = wx.getStorageSync('userInfo')
+    if (userInfo) {
+      doGetInfo().then(res => {
+        if (res.code == 200) {
+          userInfo = Object.assign(userInfo, res.data);
+          this.setData({
+            userInfo
+          })
+          wx.setStorageSync('userInfo', userInfo)
+          this.meetingGetList()
+          // 预约权限
+          if(!userInfo.appointmentAuth&&(userInfo.serivceAuth||userInfo.checkAuth)){
+            this.setData({
+              myMeetingList: [],
             })
+          }
+          if (userInfo.appointmentAuth) {
+            this.myMeeting()
+          }
         } else {
-            this.removeData()
+          this.removeData()
         }
-    },
-    removeData() {
-        wx.removeStorageSync('userInfo')
-        this.setData({
-            userInfo: {},
-            myMeetingList: [],
-            meetingList: [],
-        })
-    },
-    // 审核人消息订阅
-    subscriptionFun() {
-        wx.showModal({
-            title: '感谢您使用!',
-            content: '',
-            success(res) {
-                wx.requestSubscribeMessage({
-                    tmplIds: ['w7cy1am3DS8BF31uUDoMKfruKWQXT0ckhALzyUdvweg'],
-                    success(res) {}
-                })
-            }
+      }).catch((err) => {
+        this.removeData()
+      })
+    } else {
+      this.removeData()
+    }
+  },
+  removeData() {
+    wx.removeStorageSync('userInfo')
+    this.setData({
+      userInfo: {},
+      myMeetingList: [],
+      meetingList: [],
+    })
+  },
+  // 审核人消息订阅
+  subscriptionFun() {
+    wx.showModal({
+      title: '感谢您使用!',
+      content: '',
+      success(res) {
+        wx.requestSubscribeMessage({
+          tmplIds: ['w7cy1am3DS8BF31uUDoMKfruKWQXT0ckhALzyUdvweg'],
+          success(res) {}
         })
+      }
+    })
 
-    },
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad(options) {
-        let json = {};
-        if (options.q) {
-            var url = decodeURIComponent(options.q);
-            json = GetQueryJson(url);
-            if ('adminId' in json) {
-                console.log(111, json.adminId);
-                let adminId = wx.getStorageSync('adminId')
-                if (adminId != json.adminId) {
-                    this.removeData()
-                }
-                wx.setStorageSync('adminId', json.adminId)
-            }
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    let json = {};
+    if (options.q) {
+      var url = decodeURIComponent(options.q);
+      json = GetQueryJson(url);
+      if ('adminId' in json) {
+        // console.log(111, json.adminId);
+        let adminId = wx.getStorageSync('adminId')
+        if (adminId != json.adminId) {
+          this.removeData()
         }
-    },
+        wx.setStorageSync('adminId', json.adminId)
+      }
+    }
+  },
 
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady() {
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
 
-    },
+  },
 
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow() {
-        this.doGetInfo()
-    },
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+    this.doGetInfo()
+  },
 
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide() {
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
 
-    },
+  },
 
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload() {
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
 
-    },
+  },
 
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh() {
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
 
-    },
+  },
 
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
 
-    },
+  },
 
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage() {
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
 
-    }
+  }
 })

+ 7 - 2
pages/home/home.wxml

@@ -70,14 +70,19 @@
                         <view class="rooom-name over">
                             {{item.meetingName}}
                         </view>
-                        <view class="over">
+                        <view class="over home-text-color">
                             <van-icon name="location" />
                             <text>{{item.meetingAddress}}</text>
                         </view>
-                        <view class="over">
+                        <view class="over home-text-color">
                             <van-icon name="map-marked" />
                             <text>共有{{item.seatNum}}个座位</text>
                         </view>
+                        <view class="over home-text-color" wx:if="{{!userInfo.appointmentAuth&&userInfo.serivceAuth&&!userInfo.checkAuth}}">
+                          <image class="meeting-img" src="../../static/img/home-num-icon.png" alt="" srcset=""/>
+                          <text>今日有{{item.hadMeetingTimes}}场会议</text>
+                        </view>
+                        
                         <!-- <view class="go-subscribe border-radius-20">
                             去预约
                             <van-icon name="arrow" />

+ 14 - 0
pages/home/home.wxss

@@ -165,6 +165,7 @@
     font-size: 36rpx;
     font-weight: 700;
     margin-bottom: 20rpx;
+    color: #3A3C65;
 }
 
 .room>.over {
@@ -190,4 +191,17 @@
     font-weight: 500;
     text-align: center;
     margin: 20rpx 0;
+}
+.meeting-img{
+  width: 28rpx;
+  height: 25rpx;
+  margin-right: 10rpx;
+}
+.meeting-bottom{
+  display: flex;
+  align-items: center;
+  padding-left: 5rpx;
+}
+.home-text-color{
+  color: #3A3C65B2;
 }

+ 1 - 1
pages/login/index.js

@@ -48,7 +48,7 @@ Page({
             })
             return
         }
-        // adminId=2
+        // adminId=2 todo
         if (!adminId) {
             wx.showToast({
                 title: '请重新扫码进入',

+ 25 - 21
pages/login/index.wxml

@@ -1,27 +1,31 @@
 <!--pages/login/index.wxml-->
 <view class="page">
-    <view class="top">
-        <view class="top-area"></view>
-    </view>
+  <view class="top">
+    <view class="top-area"></view>
+  </view>
 
-    <!-- 胶囊按钮区 -->
-    <view style=" box-sizing: border-box;height: {{CustomBar-StatusBar}}px; width: 100%;margin-top: {{StatusBar}}px; padding-left: 40rpx; line-height: {{CustomBar-StatusBar}}px;position: absolute;color: #fff;">登录</view>
-    <view class="user">
-        <view class="login">
-            <view class="item">
-                <view class="tit">账号</view>
-                <input class="login-input" type="text" value="{{username}}" placeholder="请输入您的账号" placeholder-class="center" bindinput="getVal" data-type="username"></input>
-            </view>
-            <view class="item">
-                <view class="tit">密码</view>
-                <input class="login-input" password="{{!open}}" data-type="password" value="{{form.password}}" placeholder="请输入您的密码" placeholder-class="center" bindinput="getVal" />
-                <van-icon class="position" name="eye-o" wx:if="{{open}}" bindtap="switch" />
-                <van-icon class="position" name="closed-eye" wx:if="{{!open}}" bindtap="switch" />
-            </view>
-        </view>
+  <!-- 胶囊按钮区 -->
+  <view style=" box-sizing: border-box;height: {{CustomBar-StatusBar}}px; width: 100%;margin-top: {{StatusBar}}px; padding-left: 40rpx; line-height: {{CustomBar-StatusBar}}px;position: absolute;color: #fff;">登录</view>
+  <view class="user">
+    <view class="login">
+      <view class="item">
+        <view class="tit">账号</view>
+        <input class="login-input" type="text" value="{{username}}" placeholder="请输入您的账号" placeholder-class="center" bindinput="getVal" data-type="username"></input>
+      </view>
+      <!-- 新增 -->
+      <view type="text" value="" style="width: 1rpx;height: 1rpx;overflow: hidden;">
+        <input></input>
+      </view>
+      <view class="item">
+        <view class="tit">密码</view>
+        <input class="login-input" password="{{!open}}" data-type="password" value="{{form.password}}" placeholder="请输入您的密码" placeholder-class="center" bindinput="getVal" />
+        <van-icon class="position" name="eye-o" wx:if="{{open}}" bindtap="switch" />
+        <van-icon class="position" name="closed-eye" wx:if="{{!open}}" bindtap="switch" />
+      </view>
     </view>
+  </view>
 
-    <view class="btn-area">
-        <button bindtap="goLogin">登录</button>
-    </view>
+  <view class="btn-area">
+    <button bindtap="goLogin">登录</button>
+  </view>
 </view>

+ 3 - 3
pages/meeting/appointmentDetail/index.wxml

@@ -17,8 +17,8 @@
         
         <view class="apps-o" bindtap="showFun" wx:if="{{type=='my-meeting' && (item.status==1 ||item.status==2&&item.meetingRoomVo.continueMeeting)}}">更多</view>
         <!-- <van-icon name="apps-o" color="#fff" size="50rpx" class="apps-o" bindtap="showFun" wx:if="{{type=='my-meeting' &&item.status!=3}}" /> -->
-        <view wx:if="{{type=='my-subscribe' || type=='subscribe-audit'}}">
-            <view class="audit" bindtap="gotoFun" data-id="1">
+        <view wx:if="{{type=='my-subscribe' || type=='subscribe-audit'||type=='meeting-record'}}">
+            <view wx:if="{{type!='meeting-record'}}" class="audit" bindtap="gotoFun" data-id="1" >
                 <text>审核详情</text>
                 <van-icon name="arrow" />
             </view>
@@ -82,7 +82,7 @@
         <text wx:else>本会议室中,暂无与本场会议时间相邻的下一场会议,最晚可预约至{{item.meetingRoomVo.canAppointmentEndTime}}点</text>
     </view>
 
-    <view class="service border-radius-20" wx:if="{{type=='meeting-detail' || type=='subscribe-audit'}}">
+    <view class="service border-radius-20" wx:if="{{type=='meeting-detail' || type=='subscribe-audit'||type=='meeting-record'}}">
         <!-- <image src="/static/img/air.png" mode="" /> -->
         <text>预约人:{{item.name}} <text wx:if="{{item.pohne}}">【{{item.pohne}}】</text> </text>
     </view>

+ 202 - 163
pages/meeting/detail/index.js

@@ -1,186 +1,225 @@
 // pages/meeting/detail/index.js
 import {
-    appointmentDateRecordList
+  appointmentDateRecordList,
+  meetingRecordDateData
 } from '../../../utils/api/meeting'
 const app = getApp();
 
 Page({
 
-    /**
-     * 页面的初始数据
-     */
-    data: {
-        StatusBar: app.globalData.StatusBar, //胶囊按钮位置
-        CustomBar: app.globalData.CustomBar,
-        itemData: {},
-        type: '',
-        chooseId: 0,
-        subscribeList: [],
-        appointmentList: [],
-    },
-    // 获取日期
-    getDate() {
-        let num = this.data.itemData.meetingLargestDayNum
-        let subscribeList = []
-        for (let i = 0; i < num; i++) {
-            let time = this.getDay(i)
-            let data = {
-                id: i,
-                year: time,
-                month: time.slice(5)
-            }
-            subscribeList.push(data)
-        }
-        this.setData({
-            subscribeList
-        })
-    },
-    getDay(day) {
-        var today = new Date();
-        var targetday_milliseconds = today.getTime() + 1000 * 60 * 60 * 24 * day;
-        today.setTime(targetday_milliseconds); //注意,这行是关键代码
-        var tYear = today.getFullYear();
-        var tMonth = today.getMonth();
-        var tDate = today.getDate();
-        tMonth = this.doHandleMonth(tMonth + 1);
-        tDate = this.doHandleMonth(tDate);
-        return tYear + "-" + tMonth + "-" + tDate;
-    },
-    doHandleMonth(month) {
-        var m = month;
-        if (month.toString().length == 1) {
-            m = "0" + month;
-        }
-        return m;
-    },
-    goBack() {
-        wx.navigateBack({
-            delta: 1,
-        })
-    },
-    goto(e) {
-        let url
-        let itemData = JSON.stringify(this.data.itemData)
-        let {
-            type,
-            subscribeList,
-            appointmentList,
-            chooseId
-        } = this.data
-        const length = subscribeList.length;
-        let subscribeYear = subscribeList[chooseId].year
-        appointmentList = JSON.stringify(appointmentList)
-        switch (e.currentTarget.dataset.id) {
-            case '1':
-                url = '/pages/meeting/subscribe/index?itemData=' + itemData + '&type=' + type + '&endDate=' + subscribeList[length - 1].year + '&appointmentList=' + appointmentList + '&subscribeYear=' + subscribeYear
-                break;
-            default:
-                break;
-        }
-        wx.navigateTo({
-            url
-        })
-    },
-    goDetail(e) {
-        let item = e.currentTarget.dataset.item
-        let {
-            itemData
-        } = this.data
-        item = Object.assign(item, itemData)
-        item = JSON.stringify(e.currentTarget.dataset.item)
-        wx.navigateTo({
-            url: '/pages/meeting/appointmentDetail/index?item=' + item + '&type=' + this.data.type
-        })
-    },
-    clickDate(e) {
-        let item = e.currentTarget.dataset.item
-        this.setData({
-            chooseId: item.id
-        })
-        this.appointmentDateRecordList(item.year)
-    },
-    // 本会议室预约的会议列表
-    appointmentDateRecordList(year) {
-        let data = {
-            appointmentDate: year,
-            meetingRoomId: this.data.itemData.meetingRoomId
-        }
-        appointmentDateRecordList(data).then(res => {
-            this.setData({
-                appointmentList: res.data
-            })
-        })
-    },
-    preview(event) {
-        let currentUrl = event.currentTarget.dataset.src
-        wx.previewImage({
-            current: currentUrl, // 当前显示图片的http链接
-            urls: this.data.itemData.imgList // 需要预览的图片http链接列表
-        })
-    },
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad(options) {
-        this.setData({
-            userInfo: wx.getStorageSync('userInfo'),
-        })
-        if (options.type) {
-            this.setData({
-                type: options.type,
-                itemData: JSON.parse(options.item)
-            })
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    StatusBar: app.globalData.StatusBar, //胶囊按钮位置
+    CustomBar: app.globalData.CustomBar,
+    itemData: {},
+    type: '',
+    chooseId: 0,
+    subscribeList: [],
+    appointmentList: [],
+    statusItem: '', //会议室已约会议的详情
+    meetingNum:[],//会议数量列表
+  },
+  // 获取日期
+  getDate() {
+    let num = this.data.itemData.meetingLargestDayNum
+    let subscribeList = []
+    for (let i = 0; i < num; i++) {
+      let time = this.getDay(i)
+      let data = {
+        id: i,
+        year: time,
+        month: time.slice(5),
+        num:0
+      }
+      subscribeList.push(data)
+    }
+    this.data.meetingNum.forEach(item=>{
+      subscribeList = subscribeList.map(v=>{
+        if(item.appointmentDate == v.year){
+          return {
+            ...v,
+            num:item.hadMeetingTimes
+          }
+        }else{
+          return v
         }
-        this.getDate()
-        this.appointmentDateRecordList(this.data.subscribeList[0].year)
-    },
+      })
+    })
+   
+    this.setData({
+      subscribeList
+    })
+  },
+  getDay(day) {
+    var today = new Date();
+    var targetday_milliseconds = today.getTime() + 1000 * 60 * 60 * 24 * day;
+    today.setTime(targetday_milliseconds); //注意,这行是关键代码
+    var tYear = today.getFullYear();
+    var tMonth = today.getMonth();
+    var tDate = today.getDate();
+    tMonth = this.doHandleMonth(tMonth + 1);
+    tDate = this.doHandleMonth(tDate);
+    return tYear + "-" + tMonth + "-" + tDate;
+  },
+  doHandleMonth(month) {
+    var m = month;
+    if (month.toString().length == 1) {
+      m = "0" + month;
+    }
+    return m;
+  },
+  goBack() {
+    wx.navigateBack({
+      delta: 1,
+    })
+  },
+  goto(e) {
+    let url
+    let itemData = JSON.stringify(this.data.itemData)
+    let {
+      type,
+      subscribeList,
+      appointmentList,
+      chooseId
+    } = this.data
+    const length = subscribeList.length;
+    let subscribeYear = subscribeList[chooseId].year
+    appointmentList = JSON.stringify(appointmentList)
+    switch (e.currentTarget.dataset.id) {
+      case '1':
+        url = '/pages/meeting/subscribe/index?itemData=' + itemData + '&type=' + type + '&endDate=' + subscribeList[length - 1].year + '&appointmentList=' + appointmentList + '&subscribeYear=' + subscribeYear
+        break;
+      default:
+        break;
+    }
+    wx.navigateTo({
+      url
+    })
+  },
+  goDetail(e) {
+    let item = e.currentTarget.dataset.item
+    let {
+      itemData
+    } = this.data
+    item = Object.assign(item, itemData)
+    item = JSON.stringify(e.currentTarget.dataset.item)
+    wx.navigateTo({
+      url: '/pages/meeting/appointmentDetail/index?item=' + item + '&type=' + this.data.type
+    })
+  },
+  clickDate(e) {
+    let item = e.currentTarget.dataset.item
+    this.setData({
+      chooseId: item.id
+    })
+    this.appointmentDateRecordList(item.year)
+  },
+  // 本会议室预约的会议列表
+  appointmentDateRecordList(year) {
+    let data = {
+      appointmentDate: year,
+      meetingRoomId: this.data.itemData.meetingRoomId
+    }
+    appointmentDateRecordList(data).then(res => {
+      this.setData({
+        appointmentList: res.data
+      })
+    })
+  },
+  // 会议预约-获取日期和预约数量
+  _meetingRecordDateData(){
+    let data = {
+      meetingRoomId: this.data.itemData.meetingRoomId
+    }
+    meetingRecordDateData(data).then(res => {
+      this.setData({
+        meetingNum: res.data
+      })
+      this.getDate()
+      this.appointmentDateRecordList(this.data.subscribeList[0].year)
+    })
+  },
+  preview(event) {
+    let currentUrl = event.currentTarget.dataset.src
+    wx.previewImage({
+      current: currentUrl, // 当前显示图片的http链接
+      urls: this.data.itemData.imgList // 需要预览的图片http链接列表
+    })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    this.setData({
+      userInfo: wx.getStorageSync('userInfo'),
+    })
+    if (options.type) {
+      this.setData({
+        type: options.type,
+        itemData: JSON.parse(options.item)
+      })
+    }
+    if (options.statusItem) {
+      this.setData({
+        statusItem: options.statusItem,
+      })
+    }
+    if (this.data.userInfo && !this.data.userInfo.appointmentAuth && !this.data.userInfo.checkAuth && this.data.userInfo.serivceAuth) {
+      this.setData({
+        statusItem: 1,
+      })
+    }
+    this._meetingRecordDateData()
+  },
 
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady() {
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
 
-    },
+  },
 
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow() {
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
 
-    },
+  },
 
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide() {
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
 
-    },
+  },
 
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload() {
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
 
-    },
+  },
 
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh() {
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
 
-    },
+  },
 
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
 
-    },
+  },
 
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage() {
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
 
-    }
+  }
 })

+ 6 - 5
pages/meeting/detail/index.wxml

@@ -24,14 +24,14 @@
                 <van-icon name="map-marked" />
                 <text>共有{{itemData.seatNum}}个座位</text>
             </view>
-            <view class="tips">
+            <view wx:if="{{!statusItem}}" class="tips">
                 <van-icon name="info" />
                 <text>最长可提前{{itemData.meetingLargestDayNum}}天进行预约</text>
             </view>
         </view>
     </view>
     <view class="contnt">
-        <view class="service border-radius-20">
+        <view wx:if="{{!statusItem}}" class="service border-radius-20">
             <view>
                 <van-icon name="invitation" class="m-r-16" />
                 <text>会议室预约可配置</text>
@@ -47,7 +47,7 @@
                 <text class="letter" wx:for="{{itemData.meetingInServiceList}}" wx:key="index">{{item}} {{itemData.meetingInServiceList.length>index+1?'/':''}}</text>
             </view>
         </view>
-        <view wx:if="{{itemData.imgList &&itemData.imgList.length>0}}">
+        <view wx:if="{{itemData.imgList &&itemData.imgList.length>0 &&!statusItem}}">
             <view class="picture-tit">
                 会议室实景图
             </view>
@@ -63,7 +63,8 @@
                 <view class="date-item border-radius-20 {{chooseId==item.id?'choose-bg':''}}" wx:for="{{subscribeList}}" wx:key="index" bindtap="clickDate" data-item="{{item}}">
                     <!-- <view class="{{chooseId==item.id?'choose-one':'one'}}">今天</view> -->
                     <view class="{{chooseId==item.id?'choose-two':'two'}}">{{item.month}}</view>
-                    <view class="{{chooseId==item.id?'choose-three':'three'}}">可预约</view>
+                    <view wx:if="{{!statusItem}}" class="{{chooseId==item.id?'choose-three':'three'}}">可预约</view>
+                    <view wx:else class="{{chooseId==item.id?'choose-three':'three'}}">{{item.num}}场</view>
                 </view>
             </view>
         </view>
@@ -90,7 +91,7 @@
         </view>
 
     </view>
-    <view class="btn-area" wx:if="{{userInfo.appointmentAuth}}">
+    <view class="btn-area" wx:if="{{userInfo.appointmentAuth&&!statusItem}}">
         <button bindtap="goto" data-id="1">去预约</button>
     </view>
 </view>

+ 8 - 2
pages/meeting/index/index.js

@@ -15,7 +15,8 @@ Page({
             pageSize: 10000,
         },
         total: null,
-        type: ''
+        type: '',
+        statusItem:'',//会议室已约会议
     },
     getSearch(e){
         this.setData({
@@ -26,7 +27,7 @@ Page({
     goto(e) {
         let item = JSON.stringify(e.currentTarget.dataset.item)
         wx.navigateTo({
-            url: '/pages/meeting/detail/index?item=' + item + '&type=' + this.data.type
+            url: '/pages/meeting/detail/index?item=' + item + '&type=' + this.data.type + '&statusItem=' +this.data.statusItem
         })
     },
     // 会议室
@@ -50,6 +51,11 @@ Page({
                 type: options.type
             })
         }
+        if(options.statusItem){
+          this.setData({
+            statusItem: options.statusItem
+        })
+        }
         this.getList()
     },
 

+ 5 - 1
pages/meeting/index/index.wxml

@@ -18,12 +18,16 @@
                 <van-icon name="location" />
                 <text>{{item.meetingAddress}}</text>
             </view>
-            <view class="green">
+            <view wx:if="{{!statusItem}}" class="green">
                 <van-icon name="map-marked" />
                 <text>{{item.canAppointmentStartTime}}~{{item.canAppointmentEndTime}}内可预约</text>
                 <van-icon class="m-l" name="map-marked" />
                 <text>共有{{item.seatNum}}个座位</text>
             </view>
+            <view wx:else class="green meeting-bottom">
+                <image class="meeting-img" src="../../../static/img/meeting-icon.png" alt="" srcset=""/>
+                <text>今日有{{item.hadMeetingTimes}}场会议</text>
+            </view>
             <!-- <view class="go-subscribe">
                 预约
                 <van-icon name="arrow" />

+ 10 - 0
pages/meeting/index/index.wxss

@@ -86,4 +86,14 @@ van-icon {
 
 .m-l {
     margin-left: 28rpx;
+}
+.meeting-img{
+  width: 28rpx;
+  height: 25rpx;
+  margin-right: 10rpx;
+}
+.meeting-bottom{
+  display: flex;
+  align-items: center;
+  padding-left: 5rpx;
 }

+ 148 - 0
pages/meetingRecord/index/index.js

@@ -0,0 +1,148 @@
+import {
+  recentMeetingRecord,
+} from '../../../utils/api/meeting'
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    list: [],
+    tomorrowList: [],
+    //tab的current
+    currentPage: 0,
+    searchData: {
+      data: {
+        status: null,
+      },
+      pageNum: 1,
+      pageSize: 1000,
+    },
+    total: 0,
+    type: 'meeting-record'
+  },
+  // 获取列表 type-> 1:初始化 2:下拉加载  currentPage-> 0全部1审核中2通过3不通过
+  getList(type) {
+    let {
+      searchData,
+      list,
+      tomorrowList,
+      currentPage,
+    } = this.data
+    if (currentPage == 0) {
+      searchData.data.status = null
+    }else if(currentPage == 1){
+      searchData.data.status = 2
+    }else if( currentPage == 2){
+      searchData.data.status = 3
+    }else if(currentPage == 3){
+      searchData.data.status = 4
+    }
+    searchData.pageNum = type === 1 ? 1 : (searchData.pageNum + 1)
+    this.setData({
+      'searchData.pageNum': searchData.pageNum
+    })
+    wx.showLoading({
+      title: '加载中',
+    })
+
+    recentMeetingRecord({
+      status: searchData.data.status
+    }).then(res => {
+      list = res.data.todayMeetingRecords
+      tomorrowList = res.data.tomorrowMeetingRecords
+      this.setData({
+        list,
+        tomorrowList
+      })
+      wx.hideLoading()
+    })
+
+
+  },
+  // scrollView触底事件
+  reachBottom(e) {
+    // this.getList()
+  },
+  //获得切换tab的index
+  changeSwiper(e) {
+    var {
+      currentPage
+    } = this.data;
+    switch (e.currentTarget.dataset.type) {
+      case 'click':
+        currentPage = e.currentTarget.dataset.index
+        break;
+      case 'slide':
+        currentPage = e.detail.current
+        break;
+      default:
+        break;
+    };
+    this.setData({
+      currentPage
+    })
+    this.getList(1)
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    if (options.type) {
+      this.setData({
+        type: options.type
+      })
+      // console.log(this.data.type,4);
+    }
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+    this.getList(1)
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 4 - 0
pages/meetingRecord/index/index.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText":"会议记录"
+}

+ 52 - 0
pages/meetingRecord/index/index.wxml

@@ -0,0 +1,52 @@
+<view class="tab">
+  <view class="item" data-index="{{0}}" data-type="click" bindtap="changeSwiper">
+    <text class="text-{{currentPage === 0?'blue':'grey'}}">全部</text>
+  </view>
+  <view class="item" data-index="{{1}}" data-type="click" bindtap="changeSwiper">
+    <text class="text-{{currentPage === 1?'blue':'grey'}}">通过</text>
+  </view>
+  <view class="item" data-index="{{2}}" data-type="click" bindtap="changeSwiper">
+    <text class="text-{{currentPage === 2?'blue':'grey'}}">不通过</text>
+  </view>
+  <view class="item" data-index="{{3}}" data-type="click" bindtap="changeSwiper">
+    <text class="text-{{currentPage === 3?'blue':'grey'}}">已取消</text>
+  </view>
+</view>
+<swiper class="card-area" current="{{currentPage}}" duration="200" data-type="slide" bindchange="changeSwiper">
+  <swiper-item>
+    <scroll-view class="scroll-area" scroll-y="{{currentPage==0}}" bindscrolltolower="reachBottom" data-type="{{0}}">
+      <view class="metting-record-text"  wx:if="{{list.length>0}}">今日会议</view>
+      <my-meeting-module type="my-meeting" wx:if="{{list.length>0}}" wx:for="{{list}}" wx:key="index" item="{{item}}" type="{{type}}" />
+      <view class="metting-record-text" wx:if="{{tomorrowList.length>0}}">明日及之后的会议</view>
+      <my-meeting-module type="my-meeting" wx:if="{{tomorrowList.length>0}}" wx:for="{{tomorrowList}}" wx:key="index" item="{{item}}" type="{{type}}" />
+      <tailTip total="{{total}}" pageSize="{{searchData.pageSize}}" pageNum="{{searchData.pageNum}}" loadding="{{false}}"></tailTip>
+    </scroll-view>
+  </swiper-item>
+  <swiper-item>
+    <scroll-view class="scroll-area" scroll-y="{{currentPage==1}}" bindscrolltolower="reachBottom" data-type="{{1}}">
+      <view class="metting-record-text"  wx:if="{{list.length>0}}">今日会议</view>
+      <my-meeting-module wx:if="{{list.length>0}}" wx:for="{{list}}" wx:key="index" item="{{item}}" type="{{type}}" />
+      <view class="metting-record-text" wx:if="{{tomorrowList.length>0}}">明日及之后的会议</view>
+      <my-meeting-module type="my-meeting" wx:if="{{tomorrowList.length>0}}" wx:for="{{tomorrowList}}" wx:key="index" item="{{item}}" type="{{type}}" />
+      <tailTip total="{{total}}" pageSize="{{searchData.pageSize}}" pageNum="{{searchData.pageNum}}" loadding="{{false}}"></tailTip>
+    </scroll-view>
+  </swiper-item>
+  <swiper-item>
+    <scroll-view class="scroll-area" scroll-y="{{currentPage==2}}" bindscrolltolower="reachBottom" data-type="{{2}}">
+      <view class="metting-record-text"  wx:if="{{list.length>0}}">今日会议</view>
+      <my-meeting-module wx:if="{{list.length>0}}" wx:for="{{list}}" wx:key="index" item="{{item}}" type="{{type}}" />
+      <view class="metting-record-text" wx:if="{{tomorrowList.length>0}}">明日及之后的会议</view>
+      <my-meeting-module type="my-meeting" wx:if="{{tomorrowList.length>0}}" wx:for="{{tomorrowList}}" wx:key="index" item="{{item}}" type="{{type}}" />
+      <tailTip total="{{total}}" pageSize="{{searchData.pageSize}}" pageNum="{{searchData.pageNum}}" loadding="{{false}}"></tailTip>
+    </scroll-view>
+  </swiper-item>
+  <swiper-item>
+    <scroll-view class="scroll-area" scroll-y="{{currentPage==3}}" bindscrolltolower="reachBottom" data-type="{{3}}">
+      <view class="metting-record-text" wx:if="{{list.length>0}}">今日会议</view>
+      <my-meeting-module wx:if="{{list.length>0}}" wx:for="{{list}}" wx:key="index" item="{{item}}" type="{{type}}" />
+      <view class="metting-record-text" wx:if="{{tomorrowList.length>0}}">明日及之后的会议</view>
+      <my-meeting-module type="my-meeting" wx:if="{{tomorrowList.length>0}}" wx:for="{{tomorrowList}}" wx:key="index" item="{{item}}" type="{{type}}" />
+      <tailTip total="{{total}}" pageSize="{{searchData.pageSize}}" pageNum="{{searchData.pageNum}}" loadding="{{false}}"></tailTip>
+    </scroll-view>
+  </swiper-item>
+</swiper>

+ 40 - 0
pages/meetingRecord/index/index.wxss

@@ -0,0 +1,40 @@
+/* pages/mySubscribe/index/index.wxss */
+.card-area {
+  min-height: 1380rpx;
+  background-color: #f3f4f6;
+}
+
+.scroll-area {
+  height: 100%;
+  padding: 28rpx 24rpx;
+  box-sizing: border-box;
+}
+
+.tab {
+  position: sticky;
+  width: 100%;
+  height: 88rpx;
+  background-color: #FFFFFF;
+  display: flex;
+}
+
+.item {
+  width: 50%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+
+.item>text {
+  margin-left: 10rpx;
+  font-size: 32rpx;
+}
+
+.metting-record-text {
+  font-size: 32rpx;
+  font-weight: 500;
+  line-height: 48rpx;
+  text-align: left;
+  color: #333333;
+  margin-bottom: 20rpx;
+}

BIN
static/home/home-10.png


BIN
static/img/home-num-icon.png


BIN
static/img/meeting-icon.png


+ 21 - 1
utils/api/meeting.js

@@ -19,6 +19,15 @@ const appointmentDateRecordList = (data) => {
         type: 'application/json'
     })
 }
+// 会议预约-获取日期和预约数量
+const meetingRecordDateData = (data) => {
+  return request({
+      url: '/api/meeting/meetingRecordDateData',
+      data: data,
+      method: 'post',
+      type: 'application/json'
+  })
+}
 // 会议室-提交预约
 const insertMeetingRecord = (data) => {
     return request({
@@ -47,6 +56,15 @@ const myMeetingRecord = (data) => {
         type: 'application/json'
     })
 }
+// (new)会议预约-近期预约记录(会议记录)
+const recentMeetingRecord = (data) => {
+  return request({
+      url: '/api/meeting/recentMeetingRecord',
+      data: data,
+      method: 'post',
+      type: 'application/json'
+  })
+}
 
 // 审核预约列表
 const checkMeetingRecord = (data) => {
@@ -271,5 +289,7 @@ module.exports = {
     getMeetingInServiceList,
     closeMeetingInService,
     closeContinueMeeting,
-    closeTurnMeeting
+    closeTurnMeeting,
+    recentMeetingRecord,
+    meetingRecordDateData
 }

+ 1 - 1
utils/func/request.js

@@ -1,5 +1,5 @@
 //设置域名
-const dev_baseUrl = 'http://192.168.77.224:14001/ma-meeting'; //测试
+const dev_baseUrl = 'http://192.168.77.47:14001/ma-meeting'; //测试
 const pro_baseUrl = 'https://common.hz-hanghui.com:8087/ma-meeting'; //正式
 
 //是否是正式环境