index.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <div>
  3. <div class="chart-1">
  4. <div class="chart-title">
  5. <span>眼轴</span>
  6. <i class="iconfont icon-wenhao" @click="onOpenPopup('眼轴')"></i>
  7. </div>
  8. <canvas
  9. canvas-id="canvasLineA"
  10. id="canvasLineA"
  11. class="charts"
  12. :width="cWidth"
  13. :height="cHeight"
  14. :style="{ width: cWidth + 'px', height: cHeight + 'px' }"
  15. @touchstart="touchLineA"
  16. @touchmove="moveLineA"
  17. @touchend="touchEndLineA"
  18. ></canvas>
  19. </div>
  20. <div class="line"></div>
  21. <!-- 名词解释弹窗 -->
  22. <uni-popup ref="popupShow" type="bottom">
  23. <div class="popup-content">
  24. <span class="close-btn" @click="$refs.popupShow.close()"><i class="iconfont icon-quxiaoguanbi"></i></span>
  25. <div class="bl-describe-con">
  26. <div class="describe-title">名词解释</div>
  27. <div class="describe-box">
  28. <div class="describe-tag">
  29. <span>
  30. <i>{{ popupData.title }}</i>
  31. </span>
  32. </div>
  33. <img v-if="popupData.img" class="describe-img" :src="baseUrl + '/device/' + popupData.img" />
  34. <scroll-view scroll-y="true" class="describe-text">
  35. <div v-html="popupData.content"></div>
  36. </scroll-view>
  37. </div>
  38. </div>
  39. </div>
  40. </uni-popup>
  41. </div>
  42. </template>
  43. <script>
  44. import methods from './methods.js';
  45. import uniPopup from '@/components/uni-popup/uni-popup';
  46. export default {
  47. components: {
  48. uniPopup
  49. },
  50. data() {
  51. return {
  52. imgUrl: '',
  53. baseUrl: '',
  54. cWidth: '',
  55. cHeight: '',
  56. patientId: '',
  57. data: '',
  58. popupData: {
  59. title: '',
  60. img: '',
  61. content: ''
  62. },
  63. };
  64. },
  65. onLoad(options) {
  66. let app = getApp();
  67. this.imgUrl = app.globalData.imgUrl;
  68. this.baseUrl = app.globalData.baseUrl;
  69. this.patientId = options.id;
  70. this.cWidth = uni.upx2px(750);
  71. this.cHeight = uni.upx2px(600);
  72. this.inData();
  73. },
  74. onShow() {},
  75. methods: {
  76. ...methods
  77. }
  78. };
  79. </script>
  80. <style lang="scss" scoped>
  81. @import './style.scss';
  82. </style>