人民医院前端

myTask.vue 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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. }
  109. },
  110. },
  111. }
  112. </script>
  113. <style lang="scss">
  114. .uni-margin-wrap {
  115. width: 690rpx;
  116. width: 100%;
  117. }
  118. .swiper {
  119. height: 225px;
  120. image {
  121. width: 100%;
  122. height: 100%;
  123. }
  124. }
  125. .orderManage {
  126. .orderTit {
  127. margin-top: 15rpx;
  128. width: 100%;
  129. height: 80rpx;
  130. line-height: 80rpx;
  131. background: #ffffff;
  132. display: flex;
  133. border-bottom: 1rpx solid #eeeeee;
  134. text {
  135. font-size: 32rpx;
  136. }
  137. image {
  138. width: 24rpx;
  139. height: 24rpx;
  140. padding: 8rpx;
  141. border-radius: 12px;
  142. background: #1972c2;
  143. margin: 20rpx 10rpx 20rpx 26rpx;
  144. }
  145. }
  146. .orderCon {
  147. background: #ffffff;
  148. display: flex;
  149. flex-wrap: wrap;
  150. .orderList {
  151. width: 186rpx;
  152. height: 206rpx;
  153. text-align: center;
  154. border-right: 2rpx solid #eeeeee;
  155. border-bottom: 2rpx solid #eeeeee;
  156. image {
  157. width: 40rpx;
  158. height: 40rpx;
  159. margin: 0 auto;
  160. display: block;
  161. border-radius: 35rpx;
  162. padding: 15rpx;
  163. margin-top: 45rpx;
  164. }
  165. text {
  166. font-size: 24rpx;
  167. line-height: 60rpx;
  168. }
  169. }
  170. .orderList:nth-child(4n + 4) {
  171. border-right: none;
  172. }
  173. .orderList:last-child {
  174. border-right: none;
  175. }
  176. }
  177. .notification {
  178. background: #ffffff;
  179. margin-bottom: 100rpx;
  180. display: flex;
  181. flex-wrap: wrap;
  182. border-bottom: 1rpx solid #eeeeee;
  183. .notifiList {
  184. width: 375rpx;
  185. height: 172rpx;
  186. padding: 46rpx 30rpx 46rpx 30rpx;
  187. text-align: left;
  188. border-right: 1rpx solid #eeeeee;
  189. border-bottom: 1rpx solid #eeeeee;
  190. box-sizing: border-box;
  191. display: flex;
  192. image {
  193. width: 48rpx;
  194. height: 48rpx;
  195. box-sizing: border-box;
  196. border-radius: 24rpx;
  197. padding: 10rpx;
  198. margin: 19rpx;
  199. }
  200. text {
  201. font-size: 24rpx;
  202. line-height: 30rpx;
  203. }
  204. }
  205. .notifiList:nth-child(2n + 2) {
  206. border-right: none;
  207. }
  208. }
  209. }
  210. </style>