eye_ground.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. <template>
  2. <view class="mb-5">
  3. <view class="position-relative bghead">
  4. <image style="opacity: 0;" src="@/static/img/other/ydjc.png" mode="widthFix" class="w-100"></image>
  5. <view class="position-absolute text-white px-3 mx-3 positionY-50" style="">
  6. <view class="centerY">
  7. <view class="bw_line line-height1"></view>
  8. <view class="ml-1 fs-18 font-bold">
  9. 眼底检查
  10. </view>
  11. </view>
  12. <view class="mt-2 fs-14">
  13. 患者检查的眼底片和医生建议记录
  14. </view>
  15. </view>
  16. </view>
  17. <view class="px-3 pb-3 mt-n2" v-if="dataArray.length>0">
  18. <view class="bg-white px-3 py-2 mt-3" style="border-radius: 16rpx;" v-for="(item,index) in dataArray">
  19. <view class="centerY mb-2 text-gry">
  20. <text class="iconfont Clock fs-20"></text>
  21. <view class="">
  22. {{item.createTime}}
  23. </view>
  24. <view class="">
  25. <span :class="{'text-green':item.isRead==1}">
  26. ({{item.isRead==0?'未阅片':'已阅片'}})
  27. </span>
  28. </view>
  29. </view>
  30. <view class="">
  31. <view class="centerY">
  32. <view class="w-50 mx-1">
  33. <view class="centerY">
  34. <image class="w-15" src="@/static/img/other/zuo.png" mode="widthFix"></image>
  35. <view class="d-inline-block ml-1 fs-14 text-dark">
  36. 左眼
  37. </view>
  38. </view>
  39. <view class="border mt-2"
  40. style="background: #F6F9FE;border-radius: 16rpx;padding: 14rpx;box-sizing: border-box;">
  41. <view class="picbox1"
  42. style="border: 1px dotted #E3E3E3;border-radius: 16rpx;box-sizing: border-box;">
  43. <view style="background: #F6F9FE;" class="picimg1">
  44. <image @click="pic( item.leftImg || item.localLeftImg
  45. ? img_host +
  46. (accessType == 1
  47. ? item.leftImg
  48. : item.localLeftImg)
  49. : '@/static/img/other/you.png')" class="w-100" style="height: 100%;" :src="
  50. item.leftImg || item.localLeftImg
  51. ? img_host +
  52. (accessType == 1
  53. ? item.leftImg
  54. : item.localLeftImg)
  55. : '@/static/img/other/you.png'
  56. " mode="scaleToFill"></image>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. <view class="w-50 mx-2">
  62. <view class="centerY">
  63. <image class="w-15" src="@/static/img/other/you.png" mode="widthFix"></image>
  64. <view class="d-inline-block ml-1 fs-14 text-dark">
  65. 右眼
  66. </view>
  67. </view>
  68. <view class="border mt-2"
  69. style="background: #F6F9FE;border-radius: 16rpx;padding: 14rpx;box-sizing: border-box;">
  70. <view class="picbox1"
  71. style="border: 1px dotted #E3E3E3;border-radius: 16rpx;box-sizing: border-box;">
  72. <view style="background: #F6F9FE;" class="picimg1">
  73. <image @click="pic( item.rightImg || item.localRightImg
  74. ? img_host +
  75. (accessType == 1
  76. ? item.rightImg
  77. : item.localRightImg)
  78. : '@/static/img/other/you.png')" class="w-100" style="height: 100%;" :src="
  79. item.rightImg || item.localRightImg
  80. ? img_host +
  81. (accessType == 1
  82. ? item.rightImg
  83. : item.localRightImg)
  84. : '@/static/img/other/you.png'" mode="scaleToFill"></image>
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. <view class="mt-3 p-2"
  91. style="box-shadow: 0px 2px 13px 2px rgba(211,212,214,0.45);border-radius: 8px;">
  92. <view class="centerY mt-2">
  93. <image class="w-15" src="@/static/img/other/jcyy.png" mode="widthFix"></image>
  94. <view class="fs-14 font-bold ml-2 space-nowrap">
  95. 检测医院
  96. </view>
  97. <view class=" ml-2 fs-12" style="color: #868687;">
  98. {{hospital.hospitalName||'暂无医院信息'}}
  99. </view>
  100. </view>
  101. <view class="centerY">
  102. <image class="w-15" src="@/static/img/other/zjjy.png" mode="widthFix"></image>
  103. <view class="fs-14 font-bold ml-2 space-nowrap">
  104. 专家建议
  105. </view>
  106. <view v-if="item.isRead==1" class="ml-2 fs-12" style="color: #868687;">
  107. <span>左眼:{{item.leftNote||'无'}};</span>
  108. <span>右眼:{{item.rightNote||'无'}}</span>
  109. </view>
  110. <view v-if="item.isRead==0" class="ml-2 fs-12" style="color: #868687;">
  111. 暂未阅片
  112. </view>
  113. </view>
  114. </view>
  115. </view>
  116. <view class="text-center text-gry2 fs-10 mt-2 mb-2">
  117. 注:本报告内容只针对眼底照片可见范围
  118. </view>
  119. </view>
  120. </view>
  121. <view v-if="dataArray.length>0">
  122. <uni-load-more iconType="circle" :status="status" class="fs-12"></uni-load-more>
  123. </view>
  124. <view class="px-3 pb-3 mt-n2" v-if="dataArray.length==0">
  125. <Empty title="没有随眼底检查" class="py-5" />
  126. </view>
  127. </view>
  128. </template>
  129. <script>
  130. import Empty from '@/component/empty/empty.vue';
  131. export default {
  132. components: {
  133. Empty
  134. },
  135. data() {
  136. return {
  137. accessType: 1,
  138. dataArray: [],
  139. status: 'loading',
  140. hospital: {},
  141. filter: {
  142. size: 10,
  143. current: 1
  144. },
  145. img_host: ''
  146. };
  147. },
  148. onLoad() {
  149. this.getifoss();
  150. this.get_medicinal();
  151. this.find_hospital()
  152. },
  153. onReachBottom(a) {
  154. if (this.status !== "no-more") {
  155. this.status = 'loading';
  156. let page = JSON.parse(this.filter.page) + 1
  157. this.get_medicinal(page)
  158. }
  159. },
  160. methods: {
  161. async pic(url) {
  162. uni.previewImage({
  163. urls: [url],
  164. longPressActions: {
  165. itemList: ['发送给朋友', '保存图片', '收藏'],
  166. success: function(data) {
  167. console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
  168. },
  169. fail: function(err) {
  170. console.log(err.errMsg);
  171. }
  172. }
  173. });
  174. },
  175. async find_hospital() {
  176. let idCard = uni.getStorageSync('idCard')
  177. let {
  178. data,
  179. code
  180. } = await this.$api.find_hospital({
  181. idCard
  182. })
  183. if (code == 0) {
  184. this.hospital = data
  185. uni.stopPullDownRefresh()
  186. } else {
  187. this.status = 'more';
  188. uni.hideLoading();
  189. uni.stopPullDownRefresh()
  190. }
  191. },
  192. async getifoss() {
  193. let idCard = uni.getStorageSync('idCard')
  194. let {
  195. data,
  196. code,
  197. count
  198. } = await this.$api.ifoss({
  199. idCard
  200. })
  201. if (code == 0) {
  202. this.accessType = data
  203. let configData = getApp().globalData.configData
  204. data == 1 ?
  205. this.img_host = configData.img_prod_host :
  206. this.img_host = configData.img_local_host
  207. uni.hideLoading();
  208. uni.stopPullDownRefresh()
  209. } else {
  210. this.status = 'more';
  211. uni.hideLoading();
  212. uni.stopPullDownRefresh()
  213. }
  214. },
  215. async get_medicinal(page) {
  216. page = page || 1
  217. this.filter = {
  218. ...this.filter,
  219. page
  220. }
  221. uni.showLoading({
  222. title: '加载中'
  223. });
  224. let idCard = uni.getStorageSync('idCard')
  225. let {
  226. data,
  227. code,
  228. count
  229. } = await this.$api.find_eye_page({
  230. idCard,
  231. ...this.filter
  232. })
  233. if (code == 0) {
  234. uni.setStorageSync('userData', data || {})
  235. this.dataArray = [...this.dataArray, ...data || []]
  236. uni.hideLoading();
  237. console.log(count / this.filter.size > this.filter.current)
  238. if (count / this.filter.size > this.filter.current) {
  239. this.status = 'more';
  240. } else {
  241. this.status = 'no-more';
  242. }
  243. uni.stopPullDownRefresh()
  244. } else {
  245. this.status = 'more';
  246. uni.hideLoading();
  247. uni.stopPullDownRefresh()
  248. }
  249. },
  250. },
  251. onPullDownRefresh() {
  252. this.dataArray = []
  253. this.get_medicinal(1)
  254. }
  255. }
  256. </script>
  257. <style lang="scss">
  258. page {
  259. background: #F5F9FF;
  260. }
  261. .picbox1 {
  262. width: 100% !important;
  263. height: 0;
  264. padding-bottom: 70%;
  265. margin: 0;
  266. position: relative;
  267. overflow: hidden;
  268. }
  269. .picbox1 .picimg1 {
  270. width: 100%;
  271. height: 100%;
  272. position: absolute;
  273. }
  274. .bw_line {
  275. width: 10rpx;
  276. height: 30rpx;
  277. background-color: #fff;
  278. border-radius: 6rpx;
  279. }
  280. .bghead {
  281. background-image: url('@/static/img/other/ydjc.png');
  282. background-size: 100% 100%;
  283. background-repeat: no-repeat;
  284. background-position: center;
  285. }
  286. </style>