App.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <script>
  2. import {loginAfterHandle} from './utils/loginHandle.js'
  3. export default {
  4. onLaunch: function(e) {
  5. //当url存在loginData时直接种上数据
  6. /* 条件编译,仅在H5平台生效 */
  7. // #ifdef H5
  8. if(e.query.loginData&&e.query.hospSign){
  9. try{
  10. loginAfterHandle(JSON.parse(decodeURI(e.query.loginData)),e.query.hospSign);
  11. }catch(e){
  12. console.log({e})
  13. }
  14. }
  15. uni.getSystemInfo({
  16. success(e) {
  17. /* 窗口宽度大于420px且不在PC页面且不在移动设备时跳转至 PC.html 页面 */
  18. console.log(e, window.top.isPC, !/iOS|Android/i.test(e.system));
  19. if (e.windowWidth > 420 && !window.top.isPC && !/iOS|Android/i.test(e.system)) {
  20. const url = decodeURIComponent(`/TracerMethodology/static/html/template.html`);
  21. // console.log({hospSign,url});
  22. window.location.pathname = url;
  23. /* 若项目未设置根目录(默认为 / 时),则使用下方代码 */
  24. // window.location.pathname = '/static/html/pc.html';
  25. }
  26. }
  27. })
  28. // #endif
  29. },
  30. onShow: function() {
  31. },
  32. onHide: function() {
  33. },
  34. methods: {
  35. // 监测是否传参数
  36. checkArguments() {
  37. try {
  38. if (uni.getSystemInfoSync().platform === 'android') {
  39. // 接收第三方app传递的参数 extra;
  40. // #ifdef APP-PLUS
  41. if (plus.runtime.arguments) {
  42. // patParams: 院区,病区, 床号
  43. const {
  44. patParams
  45. } = JSON.parse(plus.runtime.arguments);
  46. console.log({
  47. patParams
  48. });
  49. uni.setStorageSync('patParams', patParams);
  50. }
  51. // #endif
  52. }
  53. } catch (e) {}
  54. },
  55. //角色和对应的跳转页面
  56. rolToTarget(nowPermission) {
  57. if(nowPermission != 0){
  58. let current = this.rolList.find(item => item.permission == nowPermission);
  59. if(current){
  60. // 页面跳转
  61. uni.redirectTo({
  62. url: `/${current.pagePath}`
  63. });
  64. }
  65. }
  66. }
  67. }
  68. };
  69. </script>
  70. <style lang="scss">
  71. @import "uview-ui/index.scss";
  72. /*每个页面公共css */
  73. /* 条件编译,仅在H5平台生效 */
  74. // #ifdef H5
  75. body::-webkit-scrollbar,
  76. html::-webkit-scrollbar {
  77. display: none;
  78. }
  79. // #endif
  80. body,
  81. uni-app,
  82. uni-page,
  83. uni-page-wrapper,
  84. uni-page-body {
  85. height: 100%;
  86. font-size: 20rpx;
  87. line-height: 30rpx;
  88. color: #292C33;
  89. background-color: #F5F6FA;
  90. }
  91. view,
  92. label,
  93. scroll-view {
  94. box-sizing: border-box;
  95. }
  96. // 底部固定的按钮
  97. .fixed-buttom-btn {
  98. position: fixed;
  99. left: 0;
  100. bottom: 0;
  101. display: flex;
  102. justify-content: center;
  103. align-items: center;
  104. margin-top: 12.5rpx;
  105. width: 100%;
  106. height: 75rpx;
  107. background-color: #3377FF;
  108. .btn-text {
  109. flex: 1;
  110. font-size: 22.5rpx;
  111. color: #fff;
  112. text-align: center;
  113. }
  114. .btn-text.cancle {
  115. line-height: 76.25rpx;
  116. background-color: #FFFFFF;
  117. color: #3377FF;
  118. }
  119. }
  120. // 新建情境样式start
  121. .creatingSituations {
  122. .title {
  123. padding-bottom: 35rpx;
  124. padding-left: 25rpx;
  125. font-size: 30rpx;
  126. line-height: 45rpx;
  127. color: #292C33;
  128. }
  129. }
  130. // 新建情境样式end
  131. // 查核地图列表样式start
  132. .check-map-list {
  133. overflow: hidden;
  134. padding: 0 25rpx;
  135. .item {
  136. position: relative;
  137. overflow: hidden;
  138. margin-bottom: 25rpx;
  139. border-radius: 5rpx;
  140. padding-top: 16.25rpx;
  141. padding-bottom: 0;
  142. width: 100%;
  143. background-color: #fff;
  144. box-shadow: 0 3.75rpx 12.5rpx 0 rgba(0, 13, 51, 0.1);
  145. .title-wrap {
  146. display: flex;
  147. flex-direction: row;
  148. align-items: center;
  149. padding: 0 25rpx;
  150. >text {
  151. font-size: 35rpx;
  152. line-height: 52.5rpx;
  153. font-weight: normal;
  154. color: #292C33;
  155. }
  156. >view {
  157. display: flex;
  158. flex-direction: row;
  159. align-items: center;
  160. margin-left: 20rpx;
  161. // border-radius: 17.5rpx;
  162. height: 35rpx;
  163. font-size: 17.5rpx;
  164. line-height: 35rpx;
  165. color: #8F9BB3;
  166. background-color: #EDF2FA;
  167. image {
  168. width: 35rpx;
  169. height: 35rpx;
  170. }
  171. text {
  172. padding-left: 10rpx;
  173. padding-right: 20rpx;
  174. }
  175. }
  176. }
  177. .content {
  178. display: flex;
  179. flex-direction: column;
  180. padding: 11.25rpx 25rpx 20rpx;
  181. >text {
  182. overflow: hidden;
  183. white-space: nowrap;
  184. text-overflow: ellipsis;
  185. font-size: 20rpx;
  186. line-height: 30rpx;
  187. color: #666F80;
  188. &:first-child {
  189. margin-bottom: 5rpx;
  190. font-weight: bold;
  191. color: #292C33;
  192. }
  193. }
  194. }
  195. }
  196. }
  197. // 查核地图列表样式end
  198. </style>