annual_inspection_plan.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <view class="mb-5">
  3. <view class="m-3">
  4. <view class="centerY mt-3">
  5. <view class="bule_line" style=""></view>
  6. <text class="font-bold text-dark ml-2 fs-16 line-height1">全年检查计划</text>
  7. </view>
  8. <view class="mt-3 bg-white p-3">
  9. <view class="">
  10. <view class="mtable-title centerY bg-primary text-white fs-12">
  11. <view class=" w-20">
  12. 时间
  13. </view>
  14. <view class=" text-center w-80">
  15. 检查项
  16. </view>
  17. </view>
  18. <view v-if="yearCheck.length>0" class="mtable-body-item centerY fs-12" v-for="(item,index) in yearCheck" style="color: #868687;">
  19. <view class="w-20">
  20. {{item.date}}
  21. </view>
  22. <view class="w-80">
  23. <span>{{item.value}}</span>
  24. </view>
  25. </view>
  26. <view class="px-3 pb-3 mt-n2" v-if="yearCheck.length==0">
  27. <Empty title="没有随眼底检查" class="py-5" />
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. import Empty from '@/component/empty/empty.vue'
  36. import Moment from 'moment'
  37. let res = {"code":0,"msg":"ok","data":[{"bloodPressure":"血压","footLook":"足外观、足背动脉搏动","signs":"身高/体重","bloodSugar":"血糖","bloodGlucose3":"糖化血红蛋白检查","Waist":"腰围","bloodFat":"TC、HDL⁃C、LDL⁃C、TG","serumCreatinine":"血肌酐、尿素氮"},{"bloodPressure":"血压","urinaryAlbumin":"尿白蛋白/尿肌酐","routineUrine":"尿常规","signs":"身高/体重","bloodSugar":"血糖","Waist":"腰围"},{"bloodPressure":"血压","signs":"身高/体重","bloodSugar":"血糖","liverFunction":"肝功能","Waist":"腰围"},{"bloodPressure":"血压","footLook":"足外观、足背动脉搏动","signs":"身高/体重","bloodSugar":"血糖","bloodGlucose3":"糖化血红蛋白检查","Waist":"腰围","ecg":"心电图"},{"bloodPressure":"血压","fundus":"视力及眼底","signs":"身高/体重","bloodSugar":"血糖","Waist":"腰围"},{"bloodPressure":"血压","signs":"身高/体重","bloodSugar":"血糖","Waist":"腰围","neuropathy":"神经病变的相关检查"},{"bloodPressure":"血压","footLook":"足外观、足背动脉搏动","signs":"身高/体重","bloodSugar":"血糖","bloodGlucose3":"糖化血红蛋白检查","Waist":"腰围"},{"bloodPressure":"血压","routineUrine":"尿常规","signs":"身高/体重","bloodSugar":"血糖","Waist":"腰围"},{"bloodPressure":"血压","signs":"身高/体重","bloodSugar":"血糖","Waist":"腰围"},{"bloodPressure":"血压","footLook":"足外观、足背动脉搏动","signs":"身高/体重","bloodSugar":"血糖","bloodGlucose3":"糖化血红蛋白检查","Waist":"腰围"},{"bloodPressure":"血压","signs":"身高/体重","bloodSugar":"血糖","Waist":"腰围"},{"bloodPressure":"血压","signs":"身高/体重","bloodSugar":"血糖","Waist":"腰围"}],"data2":null}
  38. export default {
  39. components: {
  40. Empty
  41. },
  42. name:"AnnualInspectionPlan",
  43. props:{
  44. propData: {
  45. type: Object,
  46. default () {
  47. return {
  48. yearCheck: []
  49. }
  50. },
  51. },
  52. },
  53. data() {
  54. return {
  55. yearCheck:[]
  56. }
  57. },
  58. watch: {
  59. propData: {
  60. handler(val) {
  61. this.getyearCheck(val)
  62. },
  63. },
  64. },
  65. created() {
  66. },
  67. methods: {
  68. async getyearCheck(res) {
  69. // this.yearCheck = data
  70. let data = res.yearCheck ? res.yearCheck : []
  71. let data1 = []
  72. data.map((item) => {
  73. let str = ''
  74. let arr = Object.values(item)
  75. arr.map((item1, index) => {
  76. str += index + 1 + '. ' + item1 + ';'
  77. })
  78. data1.push(str)
  79. })
  80. let yearList = (function () {
  81. let date = new Date()
  82. let arr = []
  83. for (let i = 0; i < 12; i++) {
  84. arr.push(
  85. date.getFullYear() +
  86. '-' +
  87. Moment(date.getFullYear()).add(i, 'months').format('MM')
  88. )
  89. }
  90. return arr
  91. })()
  92. // console.log(data1,yearList,this.yearCheck)
  93. let yearCheck1 = []
  94. yearList.map((item, index) => {
  95. yearCheck1.push({ date: item, value: data1[index] })
  96. })
  97. this.yearCheck = yearCheck1
  98. },
  99. }
  100. }
  101. </script>
  102. <style lang="scss">
  103. page {
  104. background: #F5F9FF;
  105. }
  106. .mtable {
  107. &-title {
  108. border-radius: 50rpx;
  109. padding: 20rpx;
  110. box-shadow: 0px 2px 7px 1px rgba(45, 142, 255, 0.5);
  111. }
  112. &-body {
  113. &-item {
  114. margin-top: 20rpx;
  115. border-radius: 50rpx;
  116. padding: 20rpx;
  117. background-color: #F6F9FE;
  118. color: #868687;
  119. }
  120. }
  121. }
  122. </style>