home.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  1. <template>
  2. <view class="home-wrap">
  3. <view class="home-title">
  4. <view class="title-bac">
  5. <view class="section-view">
  6. <view class="user-cont">
  7. <span class="user-spn">欢迎</span>
  8. <span class="user-spn spnr">{{userData.userName}}</span>
  9. </view>
  10. <view class="curent-cont">
  11. <span class="current-spn">当前所在医疗机构:</span>
  12. <span class="user-spn spnr">{{userData.userName}}</span>
  13. </view>
  14. </view>
  15. <view class="all-app">
  16. <view class="all-title">
  17. 请选择医疗机构
  18. </view>
  19. <view class="all-app-view">
  20. <view class="app-view-item" v-for="(item,index) in appData" :key="index">
  21. <view class="app-item-img" :style="{background: item.bgColor}" @click.stop="appView(item)">
  22. <image class="app-item-svg" :src="item.iconUrl">
  23. </image>
  24. </view>
  25. <view class="app-item-text">
  26. {{item.name}}
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. <uni-popup ref="message" type="dialog">
  34. <uni-popup-dialog type="warn" cancelText="取消" confirmText="确定" content="确定退出当前账号?" @confirm="dialogConfirm"
  35. @close="dialogClose"></uni-popup-dialog>
  36. </uni-popup>
  37. </view>
  38. </template>
  39. <script>
  40. import {
  41. mapState,
  42. mapMutations,
  43. mapActions
  44. } from 'vuex';
  45. export default {
  46. components: {},
  47. computed: {
  48. ...mapState(['houseData', 'houseSelectData', 'userData', 'homeAwaitData', 'messData']),
  49. },
  50. data() {
  51. return {
  52. listData: [],
  53. msData: [],
  54. outRoom: "请选择仓库",
  55. romDetData: {
  56. acpCnt: '待验收',
  57. groundCnt: '待上架',
  58. stooutCnt: "待出库",
  59. stostrCnt: "待配送"
  60. },
  61. appData: [{
  62. iconUrl: "../../static/pandian.svg",
  63. name: "大同市人民医院",
  64. bgColor: "#2CE4BF",
  65. },
  66. {
  67. iconUrl: "../../static/pandian.svg",
  68. name: "太原市人民医院",
  69. bgColor: "#2CE4BF",
  70. },
  71. ]
  72. }
  73. },
  74. onLoad() {
  75. },
  76. mounted() {
  77. this.getUserData();
  78. },
  79. watch: {
  80. messData(newOld) {
  81. }
  82. },
  83. methods: {
  84. ...mapActions(['getUserData']),
  85. ...mapMutations(['setHouseName']),
  86. //跳转页面
  87. appView(item) {
  88. uni.switchTab({
  89. url: '/pages/mintir/index',
  90. success: function(res) {}
  91. });
  92. },
  93. }
  94. }
  95. </script>
  96. <style lang="scss" scoped>
  97. .home-wrap {
  98. width: 100%;
  99. height: 100%;
  100. background-color: #F5F5F5;
  101. .home-title {
  102. width: 100%;
  103. height: auto;
  104. .title-bac {
  105. width: 100%;
  106. height: 392rpx;
  107. border-radius: 0rpx 0rpx 40rpx 40rpx;
  108. background: linear-gradient(180deg, rgba(1, 169, 146, 1) 0%, rgba(1, 176, 164, 0.54) 46%, rgba(2, 181, 176, 0.24) 100%, rgba(2, 185, 185, 0) 100%);
  109. padding: 20rpx;
  110. box-sizing: border-box;
  111. .roomt {
  112. width: 100%;
  113. height: 70rpx;
  114. display: flex;
  115. align-items: center;
  116. justify-content: space-between;
  117. .rom-spn {
  118. color: rgba(255, 255, 255, 0.9);
  119. font-size: 36rpx;
  120. text-align: left;
  121. font-family: PingFangSC-bold;
  122. }
  123. }
  124. .section-view {
  125. width: 97%;
  126. margin: 70rpx auto 40rpx auto;
  127. height: 210rpx;
  128. background-color: rgba(255, 255, 255, 1);
  129. box-shadow: -2rpx 4rpx 10rpx 0rpx rgba(0, 0, 0, 0.4);
  130. border-radius: 20rpx;
  131. padding: 20rpx;
  132. box-sizing: border-box;
  133. margin-top: 130rpx;
  134. .user-cont {
  135. width: 100%;
  136. height: 50rpx;
  137. .user-spn {
  138. color: rgba(0, 0, 0, 0.8);
  139. font-size: 36rpx;
  140. font-family: AlibabaPuHui-medium;
  141. }
  142. .spnr {
  143. margin-left: 20rpx;
  144. font-size: 35rpx;
  145. font-family: AlibabaPuHui-medium;
  146. }
  147. }
  148. .curent-cont {
  149. width: 100%;
  150. height: 100rpx;
  151. display: flex;
  152. align-items: center;
  153. .current-spn {
  154. font-size: 32rpx;
  155. color: #5AB7A5;
  156. }
  157. }
  158. .sec-data {
  159. width: 100%;
  160. height: 110rpx;
  161. display: flex;
  162. justify-content: space-around;
  163. margin-top: 60rpx;
  164. .sec-item {
  165. width: 130rpx;
  166. height: 100%;
  167. display: flex;
  168. flex-direction: column;
  169. align-items: center;
  170. justify-content: space-between;
  171. .item-spn {
  172. font-size: 32rpx;
  173. font-family: PingFangSC-bold;
  174. }
  175. .spnVal {
  176. color: rgba(7, 190, 167, 1);
  177. }
  178. }
  179. }
  180. }
  181. .app-view {
  182. width: 100%;
  183. height: 200rpx;
  184. display: flex;
  185. justify-content: space-between;
  186. .app-item {
  187. width: 48%;
  188. height: 100%;
  189. border-radius: 16rpx;
  190. background-color: rgba(255, 255, 255, 1);
  191. border: 2rpx solid rgba(187, 187, 187, 0.5);
  192. padding: 20rpx;
  193. box-sizing: border-box;
  194. .app-title {
  195. font-size: 32rpx;
  196. font-family: SourceHanSansSC-bold;
  197. color: rgba(0, 0, 0, 1);
  198. }
  199. .app-item-mut {
  200. width: 100%;
  201. height: 120rpx;
  202. display: flex;
  203. justify-content: space-between;
  204. align-items: center;
  205. .app-item-spn {
  206. color: rgba(154, 154, 154, 0.8);
  207. font-size: 20rpx;
  208. font-family: AlibabaPuHui-medium;
  209. width: 140rpx;
  210. height: 50rpx;
  211. }
  212. .app-item-img {
  213. width: 140rpx;
  214. height: 106.68rpx;
  215. background-size: 100% 100%;
  216. }
  217. .app-item-img-pan {
  218. width: 140rpx;
  219. height: 106.68rpx;
  220. background-size: 100% 100%;
  221. }
  222. }
  223. }
  224. }
  225. .message-view {
  226. width: 100%;
  227. margin-top: 20rpx;
  228. position: relative;
  229. padding-top: 20rpx;
  230. margin-bottom: 20rpx;
  231. .all-message {
  232. position: absolute;
  233. right: 0rpx;
  234. top: 5rpx;
  235. width: 117rpx;
  236. height: 20rpx;
  237. color: rgba(1, 169, 146, 1);
  238. font-size: 20rpx;
  239. font-family: AlibabaPuHui-regular;
  240. display: flex;
  241. align-items: center;
  242. }
  243. .message-item {
  244. margin-top: 20rpx;
  245. width: 100%;
  246. height: 50rpx;
  247. border-radius: 25rpx;
  248. display: flex;
  249. justify-content: space-between;
  250. align-items: center;
  251. padding: 0 20rpx;
  252. box-sizing: border-box;
  253. color: rgba(0, 0, 0, 0.8);
  254. font-size: 20rpx;
  255. text-align: left;
  256. font-family: AlibabaPuHui-regular;
  257. background-color: rgba(255, 255, 255, 1);
  258. box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.4);
  259. .item-mesage {
  260. overflow: hidden;
  261. white-space: nowrap;
  262. text-overflow: ellipsis;
  263. }
  264. .fot-btn {
  265. width: 170rpx;
  266. margin-left: 20rpx;
  267. }
  268. }
  269. }
  270. .all-app {
  271. width: 100%;
  272. .all-title {
  273. width: 100%;
  274. height: 46rpx;
  275. color: rgba(0, 0, 0, 0.8);
  276. font-size: 32rpx;
  277. text-align: left;
  278. font-family: AlibabaPuHui-bold;
  279. }
  280. .all-app-view {
  281. margin-top: 20rpx;
  282. width: 100%;
  283. height: auto;
  284. background-color: #fff;
  285. border-radius: 20rpx;
  286. display: flex;
  287. flex-wrap: wrap;
  288. align-content: flex-start;
  289. padding-bottom: 50rpx;
  290. .app-view-item {
  291. width: 24%;
  292. margin-left: 7rpx;
  293. height: 150rpx;
  294. display: flex;
  295. flex-direction: column;
  296. align-items: center;
  297. margin-top: 20rpx;
  298. margin-bottom: 20rpx;
  299. justify-content: space-between;
  300. .app-item-img {
  301. width: 102rpx;
  302. height: 102rpx;
  303. border-radius: 20rpx;
  304. display: flex;
  305. align-items: center;
  306. justify-content: center;
  307. .app-item-svg {
  308. width: 80rpx;
  309. height: 80rpx;
  310. background-size: 100% 100%;
  311. }
  312. }
  313. .app-item-text {
  314. width: 100%;
  315. height: 34rpx;
  316. color: rgba(0, 0, 0, 0.8);
  317. font-size: 28rpx;
  318. text-align: center;
  319. font-family: AlibabaPuHui-bold;
  320. }
  321. }
  322. }
  323. }
  324. }
  325. }
  326. }
  327. uni-page-body {
  328. width: 100%;
  329. height: 100%;
  330. }
  331. uni-page-wrapper {
  332. width: 100%;
  333. height: 100%;
  334. }
  335. uni-page {
  336. width: 100%;
  337. height: 100%;
  338. }
  339. </style>