人民医院前端

myTask.vue 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <template>
  2. <view>
  3. <view class="uni-margin-wrap">
  4. <swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
  5. :duration="duration">
  6. <swiper-item v-for="item in bannnerData" :key="item.id">
  7. <image :src="item.imgPath" mode=""></image>
  8. </swiper-item>
  9. </swiper>
  10. </view>
  11. <view class="orderManage">
  12. <view class="orderTit" style="padding-left: 15px;color: rgb(126, 131, 125);">
  13. <text style="width: 4px;background-color: rgb(26, 188, 156);height: 20px;margin-top: 10px;margin-right: 5px;"></text>
  14. <text style="font-size: 14px;">工单模块</text>
  15. </view>
  16. <view class="orderCon">
  17. <view class="orderList" v-for="item in orderListData" :key="item.id" @click="workOrderListClick(item)">
  18. <image :style="{ background: item.imageBg }" :src="item.imagePath" mode=""></image>
  19. <text>{{ item.text }}</text>
  20. </view>
  21. </view>
  22. <view class="orderTit" @click="changeStore" v-if="noticState">
  23. <image style="background: #ff9600" src="/static/icon_noticefi.png"></image>
  24. <text>公告通知</text>
  25. </view>
  26. <view class="notification">
  27. <view class="notifiList" v-for="item in noticListData" :key="item.id">
  28. <image :style="{ background: item.imageBg }" :src="item.imagePath" mode=""></image>
  29. <view class="">
  30. <text>{{ item.textTit }}</text>
  31. <text>{{ item.textCon }}</text>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. import { mapGetters } from "vuex"
  40. import store from '@/store';
  41. import { getToken } from '@/utils/auth'
  42. export default {
  43. data() {
  44. return {
  45. indicatorDots: true,
  46. autoplay: true,
  47. interval: 2000,
  48. noticState: false,
  49. duration: 500,
  50. bannnerData: [],
  51. orderListData: [],
  52. noticListData: [],
  53. }
  54. },
  55. computed: {
  56. ...mapGetters(["State"]),
  57. },
  58. onLoad() {
  59. this.init()
  60. },
  61. methods: {
  62. init() {
  63. // // #ifdef APP-PLUS
  64. // let timer
  65. // timer = setInterval(() => {
  66. // plus.push.getClientInfoAsync((info) => {
  67. // let cid = info["clientid"];
  68. // if (cid) {
  69. // clearInterval(timer)
  70. // this.clienGet(cid) //获取cid
  71. // }
  72. // });
  73. // }, 5000)
  74. // // #endif
  75. if (!getToken()) {
  76. uni.reLaunch({
  77. url: '/pages/login/login'
  78. });
  79. } else {
  80. //banner数据
  81. this.bannnerData = this.$mConstDataConfig.bannnerData
  82. this.getMenuPermissions() //获取用户权限
  83. // 公告数据
  84. //this.noticListData = this.$mConstDataConfig.noticListData
  85. }
  86. },
  87. changeStore() {
  88. this.$mStore.dispatch("STATE", 3)
  89. },
  90. workOrderListClick(item) {
  91. uni.navigateTo({
  92. url: item.navigateToUrl,
  93. })
  94. },
  95. getMenuPermissions() {
  96. let code = uni.getStorageSync("roleCode");
  97. /*
  98. GLY:管理员
  99. */
  100. if ( code === 'WXY') {
  101. this.orderListData = this.$mConstDataConfig.roleListData.UnitList
  102. }else if(code === "GLY") {
  103. this.orderListData = this.$mConstDataConfig.roleListData.administratorList
  104. }else if(code === "BXY" || code === 'CK_GLY') {
  105. this.orderListData = this.$mConstDataConfig.roleListData.applyRepairList
  106. }else if(code === "DDZX" ) {
  107. this.orderListData = this.$mConstDataConfig.roleListData.dispatchList
  108. } else if(code === "SJ" ){
  109. this.orderListData = this.$mConstDataConfig.roleListData.driverList
  110. }
  111. },
  112. },
  113. }
  114. </script>
  115. <style lang="scss">
  116. .uni-margin-wrap {
  117. width: 690rpx;
  118. width: 100%;
  119. }
  120. .swiper {
  121. height: 225px;
  122. image {
  123. width: 100%;
  124. height: 100%;
  125. }
  126. }
  127. .orderManage {
  128. .orderTit {
  129. margin-top: 15rpx;
  130. width: 100%;
  131. height: 80rpx;
  132. line-height: 80rpx;
  133. background: #ffffff;
  134. display: flex;
  135. border-bottom: 1rpx solid #eeeeee;
  136. text {
  137. font-size: 32rpx;
  138. }
  139. image {
  140. width: 24rpx;
  141. height: 24rpx;
  142. padding: 8rpx;
  143. border-radius: 12px;
  144. background: #1972c2;
  145. margin: 20rpx 10rpx 20rpx 26rpx;
  146. }
  147. }
  148. .orderCon {
  149. background: #ffffff;
  150. display: flex;
  151. flex-wrap: wrap;
  152. .orderList {
  153. width: 186rpx;
  154. height: 206rpx;
  155. text-align: center;
  156. border-right: 2rpx solid #eeeeee;
  157. border-bottom: 2rpx solid #eeeeee;
  158. image {
  159. width: 40rpx;
  160. height: 40rpx;
  161. margin: 0 auto;
  162. display: block;
  163. border-radius: 35rpx;
  164. padding: 15rpx;
  165. margin-top: 45rpx;
  166. }
  167. text {
  168. font-size: 24rpx;
  169. line-height: 60rpx;
  170. }
  171. }
  172. .orderList:nth-child(4n + 4) {
  173. border-right: none;
  174. }
  175. .orderList:last-child {
  176. border-right: none;
  177. }
  178. }
  179. .notification {
  180. background: #ffffff;
  181. margin-bottom: 100rpx;
  182. display: flex;
  183. flex-wrap: wrap;
  184. border-bottom: 1rpx solid #eeeeee;
  185. .notifiList {
  186. width: 375rpx;
  187. height: 172rpx;
  188. padding: 46rpx 30rpx 46rpx 30rpx;
  189. text-align: left;
  190. border-right: 1rpx solid #eeeeee;
  191. border-bottom: 1rpx solid #eeeeee;
  192. box-sizing: border-box;
  193. display: flex;
  194. image {
  195. width: 48rpx;
  196. height: 48rpx;
  197. box-sizing: border-box;
  198. border-radius: 24rpx;
  199. padding: 10rpx;
  200. margin: 19rpx;
  201. }
  202. text {
  203. font-size: 24rpx;
  204. line-height: 30rpx;
  205. }
  206. }
  207. .notifiList:nth-child(2n + 2) {
  208. border-right: none;
  209. }
  210. }
  211. }
  212. </style>