App.vue 4.9 KB

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