index.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <template>
  2. <view class="content">
  3. <doctor-therapy v-show="userType===1" ref="doctor" />
  4. <patient-record v-show="userType===2" ref="patientRecord" />
  5. </view>
  6. </template>
  7. <script>
  8. // import{
  9. // mapState
  10. // } from 'vuex'
  11. import doctorTherapy from '@/views/doctorItems/therapy/index.vue';
  12. import patientRecord from '@/views/patientItems/record/index.vue';
  13. export default {
  14. components:{
  15. patientRecord,
  16. doctorTherapy,
  17. ReachBottomTimer:null
  18. },
  19. data(){
  20. return{
  21. userType:null,
  22. tabBars:[]
  23. }
  24. },
  25. // computed: {
  26. // ...mapState([
  27. // 'userType'
  28. // ])
  29. // },
  30. onLoad({type}) {
  31. this.$nextTick(()=>{
  32. if(type==="appraise"){
  33. this.$refs.patientRecord.init(type)
  34. }else if(type==="create"){
  35. this.$refs.doctor.init(type)
  36. }
  37. })
  38. },
  39. created() {
  40. let accountInfo=uni.getStorageSync('accountInfo');
  41. this.$nextTick(()=>{
  42. this.userType=accountInfo.userType;
  43. })
  44. if(accountInfo.userType===1){
  45. uni.setNavigationBarTitle({
  46. title:"治疗"
  47. })
  48. }
  49. }
  50. }
  51. </script>
  52. <style lang="scss" scoped>
  53. .content{
  54. &{
  55. padding: 0 24upx;
  56. }
  57. .title {
  58. font-size: 38upx;
  59. padding: 58upx 0 49upx 0;
  60. font-weight: 600;
  61. .tl-1{
  62. color: #3384ff;
  63. padding-right: 8upx;
  64. }
  65. }
  66. .list{
  67. .item{
  68. height: 160upx;
  69. margin-top: 24upx;
  70. display: flex;
  71. justify-content: flex-start;
  72. align-items: center;
  73. position: relative;
  74. .icon{
  75. .zhcx-iconfont{
  76. font-size: 55upx;
  77. }
  78. padding-right: 79upx;
  79. }
  80. .text{
  81. font-size: 32upx;
  82. color: #333;
  83. }
  84. .link{
  85. position: absolute;
  86. right: 34upx;
  87. }
  88. }
  89. }
  90. }
  91. </style>