meeting.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <template>
  2. <view>
  3. <view class="navbox">
  4. <uni-nav-bar color="#ffffff" left-icon="left" title="会议预订" :background-color="backgroundColor"
  5. :border="false" statusBar='true' fixed="true" @clickLeft='getBack'>
  6. </uni-nav-bar>
  7. </view>
  8. <image :src="navbg" class="navbg"></image>
  9. <view class="zxmain" :style="'margin-top:-'+marTop+'rpx;'">
  10. <view class="ytbox">
  11. <uni-forms ref="form" class="ytforms" :modelValue="datainfo">
  12. <view class="ytsbox">
  13. <view class="yttit">预订信息</view>
  14. <view class="pt5">
  15. <uni-forms-item label="预定人员" class="disable" name="visitName">
  16. <view class="intit">刘安宁</view>
  17. </uni-forms-item>
  18. <uni-forms-item label="开始时间" name="appointmentSite">
  19. <uni-datetime-picker v-model="datainfo.starttime">
  20. <view class="pickbox flexc">
  21. <view :class="datainfo.starttime?'txr flex1':'coa txr flex1'">{{datainfo.starttime || "请选择开始时间"}}</view>
  22. <image :src="hupimg" class="hupimg"></image>
  23. </view>
  24. </uni-datetime-picker>
  25. </uni-forms-item>
  26. <uni-forms-item label="结束时间" name="appointmentSite">
  27. <uni-datetime-picker v-model="datainfo.starttime">
  28. <view class="pickbox flexc">
  29. <view :class="datainfo.starttime?'txr flex1':'coa txr flex1'">{{datainfo.starttime || "请选择结束时间"}}</view>
  30. <image :src="hupimg" class="hupimg"></image>
  31. </view>
  32. </uni-datetime-picker>
  33. </uni-forms-item>
  34. <uni-forms-item label="会议室" name="appointmentSite">
  35. <picker class="pickbox" range-key='dictLabel' :value="adridx"
  36. :range="adrlist" @change="bindTimeChangea">
  37. <view class="flexc flex1">
  38. <view class="flex1 " :class="jclx?'co16 fw5 f14':'coa f14'">
  39. {{jclx||'请选择会议室'}}</view>
  40. <image :src="hupimg" class="hupimg"></image>
  41. </view>
  42. </picker>
  43. </uni-forms-item>
  44. <uni-forms-item label="会议名称" name="visitPhone">
  45. <uni-easyinput :inputBorder="false" type="textarea" autoHeight v-model="datainfo.visitPhone"
  46. placeholder="输入会议名称">
  47. </uni-easyinput>
  48. </uni-forms-item>
  49. <uni-forms-item label="参会人数" name="visitPhone">
  50. <uni-easyinput :inputBorder="false" v-model="datainfo.visitPhone"
  51. placeholder="输入参会人数">
  52. </uni-easyinput>
  53. </uni-forms-item>
  54. </view>
  55. <view class="ybtn flexcc" @click="getSubmit">确认提交</view>
  56. <view class="tips">* 为避免重复操作,请先选择时间查看当前会议室是否被占用。</view>
  57. </view>
  58. </uni-forms>
  59. </view>
  60. </view>
  61. </view>
  62. </template>
  63. <script>
  64. import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
  65. import {getCameraList,getCameraVideo} from "@/api/mine/order.js"
  66. import {getDictionaryFn} from "@/api/mine/register.js"
  67. export default {
  68. components: {},
  69. data() {
  70. return {
  71. hupimg:require("@/static/images/order/hup.png"),
  72. navbg:require("@/static/images/navbg.png"),
  73. backgroundColor: "transparent",
  74. datainfo:{
  75. starttime:'',
  76. },
  77. nvaHeight: 44,
  78. marTop: 0, //距离顶部的距离
  79. stubarHeight: 0, //
  80. day:'',
  81. jclx:'',
  82. adridx:'',
  83. adrlist:[],
  84. }
  85. },
  86. onPageScroll(e) {
  87. var scrollTop = Number(e.scrollTop);
  88. if (scrollTop > 0) {
  89. this.backgroundColor = '#0491FD'
  90. } else {
  91. this.backgroundColor = 'transparent'
  92. }
  93. },
  94. onLoad: function() {
  95. this.init()
  96. // this.getDataFn()
  97. uni.getSystemInfo({
  98. success: (e) => {
  99. this.stubarHeight = Number(e.statusBarHeight);
  100. this.nvaHeight = Number(e.statusBarHeight) + 44;
  101. this.tabscheight = Number(this.nvaHeight) * 2 + 100;
  102. }
  103. })
  104. // 3c8cadac11af4f1298a2882addc8788d
  105. },
  106. onUnload() {
  107. uni.$off('refreshdatalist')
  108. },
  109. onShow() {},
  110. mounted() {
  111. this.getHeightFn()
  112. },
  113. // 上拉触底加载更多触发事件
  114. onReachBottom() {
  115. if (this.reachflag) {
  116. this.pageNum++
  117. this.getDataFn()
  118. }
  119. },
  120. methods: {
  121. checkPermi,
  122. checkRole,
  123. getBack() {
  124. uni.navigateBack({
  125. delta: 1
  126. })
  127. },
  128. bindTimeChangea(e){
  129. var val=e.detail.value;
  130. this.day=val
  131. },
  132. getHeightFn() {
  133. let query = uni.createSelectorQuery().in(this);
  134. //需要给黄色区域设置一个id标识,在这里是demo
  135. query.select('.navbox').boundingClientRect(data => {
  136. var top = data.top < 0 ? -data.top : data.top;
  137. var stubarHeight = Number(this.stubarHeight);
  138. this.marTop = stubarHeight > 0 ? 692 - Number(data.height) * 2 : 692 - Number(data.height) *
  139. 2 + 40 //赋值,待会要用
  140. if (top <= this.nvaHeight) {
  141. const opacity = top / 100 // 计算透明度值
  142. const color = `rgba(4, 145, 253, ${opacity})`
  143. this.backgroundColor = color // 更新盒子背景颜色
  144. } else {
  145. this.backgroundColor = '#00A9F0'
  146. }
  147. }).exec();
  148. },
  149. init() {
  150. // 门卫
  151. // getDictionaryFn('is_read').then(res=>{
  152. // if(res.code==200){
  153. // this.ydztlist = res.data.map(v => {
  154. // return {
  155. // label: v.dictLabel,
  156. // value: v.dictValue
  157. // }
  158. // })
  159. // }
  160. // })
  161. },
  162. getDataFn() {
  163. var params = {
  164. pageSize: this.pageSize,
  165. pageNo: this.pageNum,
  166. // visitType:3
  167. }
  168. getCameraList(params).then(res => {
  169. if (res.code == 200) {
  170. if (res.rows.length < this.pageSize) {
  171. this.reachflag = false
  172. this.wtdt = '到底了~';
  173. } else {
  174. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum -
  175. 1)
  176. if (num < res.total) {
  177. this.reachflag = true
  178. this.wtdt = '上拉加载更多'
  179. } else {
  180. this.reachflag = false
  181. this.wtdt = '到底了~';
  182. }
  183. }
  184. if (this.pageNum == 1) {
  185. this.list = res.rows;
  186. } else {
  187. this.list = this.list.concat(res.rows)
  188. }
  189. } else {
  190. this.$toast(res.msg)
  191. }
  192. })
  193. },
  194. },
  195. }
  196. </script>
  197. <style>
  198. /* page {
  199. background: #ffffff;
  200. } */
  201. </style>
  202. <style lang="scss" scoped>
  203. .ytbox /deep/ .uni-forms .uni-forms-item{padding: 10rpx 26rpx 10rpx;border: 2rpx solid #0391FD;margin-bottom: 24rpx;border-radius: 12rpx;}
  204. .ytbox /deep/ .uni-forms-item__label{flex: 0 0 auto;width: 144rpx !important;font-size: 28rpx;font-weight: bold;position: relative;color: #161616;text-align-last: justify;}
  205. .ytbox /deep/ .uni-forms-item__label text{flex: 1;}
  206. .ytbox /deep/ .uni-forms-item__label .is-required{position: absolute;right: 0;color: #F10C31;margin-top: 16rpx;}
  207. .ytbox /deep/ uni-textarea{flex: 1;width: auto;text-align: right;}
  208. .ytbox /deep/ .uni-textarea-placeholder{font-size: 28rpx;color: #aaaaaa !important;}
  209. .ytbox /deep/ .uni-easyinput__placeholder-class{font-size: 28rpx;color: #aaaaaa;}
  210. .ytbox /deep/ .uni-forms-item__content{display: flex;align-items: center;flex-direction: row;}
  211. .ytbox /deep/ .uni-easyinput{flex: 1;text-align: right;}
  212. .ytbox /deep/ .uni-easyinput__content-input{font-size: 28rpx;}
  213. .ytbox /deep/ .uni-forms-item__error{margin-top:20rpx;left: auto;right: 0;}
  214. .ytbox /deep/ .uni-easyinput__content-textarea{min-height: 48rpx;}
  215. .disable{background: #EFF0F2;border: none !important;}
  216. .ytbox{width: 684rpx;margin: 0 auto;padding-top: 24rpx;position: relative;flex: 1;overflow: auto;background-color: #ffffff;padding-bottom: 4rpx;border-radius: 14rpx;}
  217. .ytforms{
  218. .yttit{font-size: 28rpx;font-weight: bold;margin-bottom: 56rpx;
  219. color: #161616;display: flex;align-items: center;padding: 0rpx 26rpx;box-sizing: border-box;position: relative;
  220. &::before{content: '';width: 6rpx;height: 34rpx;background: $com-cd3;border-radius: 4rpx;position: absolute;top: 50%;transform: translateY(-50%);left: 0rpx;}
  221. }
  222. .ytsbox{background-color: #ffffff;padding: 32rpx 28rpx 0;border-radius: 14rpx;margin-bottom: 24rpx;
  223. .intit{font-weight: 500;flex: 1;font-size: 26rpx;text-align: right;color: #666666;}
  224. .pickbox{flex: 1;text-align: right;font-weight: 500;font-size: 28rpx;color: #161616;
  225. .hupimg{width: 18rpx;height: 14rpx;margin-left: 12rpx;flex: 0 0 auto;}
  226. }
  227. }
  228. }
  229. // 按钮
  230. .ybtn{width: 100%;height: 90rpx;background: $com-cd3;border-radius: 14rpx;margin: 100rpx auto 0;font-size: 28rpx;font-weight: 500;color: #FFFFFF;
  231. &.btn1{background-color: #9a9c9e;}
  232. }
  233. .tips{font-weight: bold;margin-top: 28rpx;
  234. font-size: 22rpx;line-height: 34rpx;
  235. color: #FF0000;}
  236. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4; }
  237. .navbg{width: 100%;height: 692rpx;}
  238. .zxmain{position: relative;padding: 20rpx 32rpx 40rpx;box-sizing: border-box;display: flex;
  239. min-height: calc(100vh - 44px);
  240. }
  241. </style>