workbench.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <template>
  2. <view class="">
  3. <!-- 顶部导航栏 -->
  4. <uni-nav-bar status-bar=true fixed=true left-icon="arrowleft" background-color="#1d5edb" color="#ffffff"
  5. @clickLeft="navigateBack"
  6. @clickRight="goHome">
  7. <text slot="default" style="text-align: center; flex: 1; font-size: 18px; font-weight: bold;">工作台</text>
  8. <button class="home-btn" slot="right" size="mini">
  9. <uni-icons type="home-filled" size="22" color="#ffffff"></uni-icons>
  10. </button>
  11. </uni-nav-bar>
  12. <!-- 会议选择 -->
  13. <scroll-view scroll-y="true" class="staff-list" :style="{top:showMeetinglist? '-100%': (systemInfo.statusBarHeight+44)+'px', height: (systemInfo.screenHeight-systemInfo.statusBarHeight-44)+'px'}">
  14. <!-- <view class="meeting-search">
  15. <mSearch :show="false" @search="search($event,0)" placeholder='' border="0px" style="color: #000000;"></mSearch>
  16. </view> -->
  17. <view @click="toGuestList(i)" class="staff-list-item" :class="{'staff-list-item-active': meetingIndex==i}" v-for="(item,i) in meetingList" :key="item.id">
  18. <view class="listTop">{{item.meetingName}}</view>
  19. <view class="listBottom">
  20. <view style="font-size: 20rpx;line-height: 60rpx;">{{item.meetingYear}}</view>
  21. <view style="text-align: right;line-height: 52rpx;">{{item.meetingPlace}}</view>
  22. </view>
  23. </view>
  24. </scroll-view>
  25. <!-- 头部标题部分 -->
  26. <view class="topbox">
  27. <view>
  28. <text>当前会议</text>
  29. <text class="exchange-btn" @click="changeMeeting">切换</text>
  30. </view>
  31. <view class="meeting-title">{{currentMeeting.meetingName}}</view>
  32. <view style="text-align: center;">
  33. <text style="margin-right: 20px">{{moment(currentMeeting.meetingStartDate).format('YYYY-MM-DD')}}</text>
  34. <text :style="{color: meetingState(currentMeeting.meetingStartDate, currentMeeting.meetingEndDate).color}">
  35. {{meetingState(currentMeeting.meetingStartDate, currentMeeting.meetingEndDate).text}}
  36. </text>
  37. </view>
  38. </view>
  39. <!-- tab -->
  40. <view class="main-content" v-if="showMeetinglist">
  41. <view class="bodybox">
  42. <!-- tab栏 -->
  43. <view class="tabtop">
  44. <view class="active-box" :style="{left: sign*33.33+'%'}"></view>
  45. <view class="tabtop-list">
  46. <view class="tabtop-item" :style="{color: sign==index? '#1d5edb': '#0c1d3e'}" v-for="(item,index) in categoryList" :key="index" @click="select(index)">
  47. {{item.label}}
  48. </view>
  49. </view>
  50. </view>
  51. <!-- 主体部分 -->
  52. <view :style="{height: tabViewBox, 'padding-top': '20px', 'overflow-x': 'hidden'}">
  53. <view v-if="sign == 0">
  54. <statistic v-if="currentMeeting!={}" :meetingId="currentMeeting.id"></statistic>
  55. </view>
  56. <view v-if="sign == 1">
  57. <workProgress v-if="currentMeeting!={}" :meetingId="currentMeeting.id"></workProgress>
  58. </view>
  59. <view v-if="sign == 2">
  60. <work-scheme :meetingId="currentMeeting.id"></work-scheme>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. import uniNavBar from "@/components/uni-nav-bar/uni-nav-bar.vue";
  69. import statistic from "./signinStatistic.vue";
  70. import workProgress from "./workProgress.vue";
  71. import workScheme from "./workscheme.vue";
  72. export default{
  73. components: {statistic, workScheme, workProgress},
  74. data(){
  75. return{
  76. showMeetinglist: true,
  77. meetingIndex: 0,
  78. currentMeeting: {},
  79. conferenceData: [],
  80. meetingList: [],
  81. categoryList:[
  82. {"label":'签到统计',"value":"1"},
  83. {"label":'工作进展',"value":"2"},
  84. {"label":'会议方案',"value":"3"},
  85. ],
  86. sign: 0,//决定哪一个显示的标记
  87. }
  88. },
  89. mounted() {
  90. this.getList();
  91. },
  92. computed: {
  93. tabViewBox(){
  94. return (this.systemInfo.windowHeight-this.systemInfo.statusBarHeight-44-263)+'px';
  95. }
  96. },
  97. methods:{
  98. // 判断会议状态
  99. meetingState(st, et){
  100. var ct = Date.parse(new Date());
  101. if(ct < st){
  102. return {text: '即将召开', color: '#f59a23'};
  103. }else if(ct<=et && ct>=st){
  104. return {text: '正在进行', color: '#91ef69'};
  105. }else{
  106. return {text: '已结束', color: '#ffffff'};
  107. }
  108. },
  109. async getList(){
  110. const res= await this.$myRequest({
  111. url: '/meeting/meetingBasicInfos/getList',
  112. });
  113. // console.log(res)
  114. this.meetingList = res.data.meetingBasicInfos;
  115. this.conferenceData = this.meetingList;
  116. this.currentMeeting = this.meetingList[0];
  117. console.log(this.currentMeeting)
  118. },
  119. changeMeeting(){
  120. this.showMeetinglist = !this.showMeetinglist;
  121. },
  122. toGuestList(i){
  123. this.meetingIndex = i;
  124. this.currentMeeting = this.meetingList[i];
  125. this.showMeetinglist = true;
  126. // uni.navigateTo({
  127. // url: 'guestList?id='+this.meetingList[i].id
  128. // })
  129. },
  130. navigateBack(){
  131. uni.navigateBack();
  132. },
  133. goHome(){
  134. this.$mRouter.reLaunch({ route: '/pages/index/index' });
  135. },
  136. select(index){
  137. this.sign = index
  138. },
  139. },
  140. }
  141. </script>
  142. <style>
  143. page{
  144. background-color: #4d87ff;
  145. }
  146. .home-btn{
  147. height: 30px;
  148. border-radius: 15px;
  149. background-color: #2f5baf;
  150. }
  151. .home-btn:active{
  152. opacity: 0.7;
  153. }
  154. .uni-icons{
  155. line-height: 30px;
  156. }
  157. .topbox{
  158. padding: 30px;
  159. height: 190px;
  160. background-color: #4d87ff;
  161. margin-bottom: 30rpx;
  162. font-size: 15px;
  163. color: #FFFFFF;
  164. }
  165. .exchange-btn{
  166. color: #fdfdfd;
  167. margin-left: 10px;
  168. display: inline-block;
  169. background-color: #2772dc;
  170. width: 40px;
  171. height: 21px;
  172. text-align: center;
  173. border-radius: 12px;
  174. }
  175. .exchange-btn:active{
  176. opacity: 0.5;
  177. }
  178. .meeting-title{
  179. text-align: center;
  180. font-size: 48rpx;
  181. font-weight: bold;
  182. height: 100px;
  183. padding-top: 20px;
  184. overflow: hidden;
  185. text-overflow:ellipsis;
  186. }
  187. .main-content{
  188. padding: 0 40rpx;
  189. }
  190. .bodybox{
  191. background-color: #FFFFFF;
  192. border-radius: 15px;
  193. overflow: hidden;
  194. }
  195. .tabtop{
  196. width: 100%;
  197. height: 50px;
  198. background-color: #ecf3fe;
  199. position: relative;
  200. border-radius: 15px;
  201. }
  202. .tabtop-list{
  203. display: flex;
  204. position: absolute;
  205. top: 0;
  206. left: 0;
  207. width: 100%;
  208. height: 100%;
  209. z-index: 9;
  210. }
  211. .tabtop-list .tabtop-item {
  212. flex: 1;
  213. text-align: center;
  214. line-height: 100rpx;
  215. font-size: 34rpx;
  216. font-weight: 700;
  217. }
  218. .active-box{
  219. width: 33.33%;
  220. height: 100%;
  221. position: absolute;
  222. top: 0;
  223. transition: all 0.3s;
  224. background: #fff;
  225. border-radius: 15px;
  226. }
  227. .staff-list{
  228. background: #fff;
  229. width: 100%;
  230. position: absolute;
  231. left: 0;
  232. transition: all 0.4s;
  233. z-index: 99;
  234. }
  235. .staff-list-item{
  236. display: flex;
  237. flex-direction: column;
  238. width: 100%;
  239. height: 65px;
  240. border-top: 1px solid #ccc;
  241. padding: 0 15px;
  242. }
  243. .staff-list-item-active{
  244. background: #dee4e4
  245. }
  246. .staff-list-item view {
  247. width: 100%;
  248. height: 100%;
  249. flex: 1;
  250. }
  251. .listBottom{
  252. display: flex;
  253. justify-content: space-between;
  254. }
  255. .listTop{
  256. font-size: 30rpx;
  257. font-weight: bold;
  258. overflow: hidden;
  259. line-height:76rpx;
  260. }
  261. </style>