index.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. <template>
  2. <view class="content">
  3. <view class="desc-container item">
  4. <view class="item-head">
  5. <view class="dot"></view>
  6. <text class="name">病情描述</text>
  7. </view>
  8. <view class="desc" v-html="IllnessDescription"></view>
  9. <view class="tags">
  10. <view class="item" v-for="(IllnessTag,index) in IllnessTags" :key="index">
  11. <text>{{IllnessTag.illnessname}}</text>
  12. </view>
  13. </view>
  14. </view>
  15. <view class="image-container item">
  16. <view class="item-head">
  17. <view class="dot"></view>
  18. <text class="name">医学影像</text>
  19. </view>
  20. <view class="item-cont">
  21. <view class="imgbox" v-for="(image,index) in images" :key="index">
  22. <image :src="uploadServer+image.path" v-if="images.length>0"></image>
  23. </view>
  24. </view>
  25. </view>
  26. <view class="assist-container item">
  27. <view class="item-head">
  28. <text class="head-highlight">AI</text>
  29. <text class="name">辅助诊断</text>
  30. </view>
  31. <view class="item-cont aiDiagnose" v-html="aiDiagnose"></view>
  32. </view>
  33. <view class="consult-container">
  34. <view class="suggest" @click="consult"><text class="zhcx-icon-zhucewangzhan zhcx-iconfont"></text>系统建议进一步咨询医生</view>
  35. <view class="consult" @click="consult">立即咨询</view>
  36. </view>
  37. <view class="recommendBt" @click="recommend">查看推荐医生</view>
  38. </view>
  39. </template>
  40. <script>
  41. import {consultationDoctor} from '@/api/patient';
  42. import {notEmpty} from '@/libs';
  43. import config from '@/config';
  44. export default{
  45. data(){
  46. return{
  47. uploadServer:config.uploadServer,
  48. seekId:null,
  49. drop:false,
  50. dropWrapHight:null,
  51. diagnoseStatus:true,
  52. diagnoseResult:false,
  53. diagnoseTitle :"诊断结果",
  54. diagnoseTxt:"",
  55. name:"",
  56. gender:"",
  57. time:"",
  58. aiDiagnose:"",
  59. IllnessDescription:"",
  60. IllnessTags:[],
  61. images:[]
  62. }
  63. },
  64. onLoad() {
  65. this.init();
  66. },
  67. // mounted() {
  68. // },
  69. methods:{
  70. dropHandle(){
  71. this.drop=!this.drop;
  72. },
  73. init(){
  74. this.getdetails();
  75. },
  76. getdetails(){
  77. let aidiagnoseInfo=uni.getStorageSync("aidiagnoseInfo");
  78. let diseaseImgDesc=aidiagnoseInfo.diseaseImgDesc;
  79. this.seekId=aidiagnoseInfo.seekId;
  80. this.time=aidiagnoseInfo.seekTime;
  81. this.aiDiagnose=aidiagnoseInfo.aidiagnosticresults;
  82. this.IllnessDescription=aidiagnoseInfo.diseaseDesc;
  83. if(notEmpty(diseaseImgDesc)){
  84. this.images=JSON.parse(diseaseImgDesc)
  85. }
  86. if(notEmpty(aidiagnoseInfo.site)){
  87. this.IllnessTags=JSON.parse(aidiagnoseInfo.site);
  88. }
  89. },
  90. consult(){
  91. var patientName=uni.getStorageSync('userInfo').patientName;
  92. var diagnosticdoctor=uni.getStorageSync('aidiagnoseInfo').diagnosticdoctor;
  93. let seekId=uni.getStorageSync('aidiagnoseInfo').seekId;
  94. let doctorIds=diagnosticdoctor.map((item)=>{
  95. return item.id;
  96. })
  97. if(doctorIds<1){
  98. uni.showToast({
  99. icon:'none',
  100. title:"当前没有可以咨询的医生!"
  101. })
  102. return;
  103. }
  104. doctorIds=doctorIds.join(',');
  105. consultationDoctor({
  106. patientName,
  107. seekId,
  108. doctorIds:doctorIds
  109. }).then(()=>{
  110. uni.showToast({
  111. icon:"success",
  112. title:'咨询成功!',
  113. complete() {
  114. uni.reLaunch({
  115. url:'/pages/home/index?type=consult'
  116. })
  117. }
  118. })
  119. })
  120. },
  121. recommend(){
  122. let seekId=uni.getStorageSync('aidiagnoseInfo').seekId;
  123. uni.navigateTo({
  124. url:`/views/patientItems/recommend/index?type=3&id=${seekId}`
  125. })
  126. }
  127. }
  128. }
  129. </script>
  130. <style lang="scss" scoped>
  131. .content{
  132. padding: 0 48upx 50upx;
  133. .head{
  134. height: 100upx;
  135. display: flex;
  136. justify-content: space-between;
  137. align-items: center;
  138. .zhcx-iconfont{
  139. color: #0a0a0a;
  140. text{
  141. padding-left: 10upx;
  142. }
  143. }
  144. }
  145. .item{
  146. .item-head{
  147. padding: 30upx 0;
  148. display: flex;
  149. justify-content: flex-start;
  150. align-items: center;
  151. .dot{
  152. width: 36upx;
  153. height: 36upx;
  154. border-radius: 50%;
  155. position: relative;
  156. background:rgba(51, 132, 255,0.2);
  157. &::after{
  158. width: 18upx;
  159. height: 18upx;
  160. border-radius: 50%;
  161. display:block ;
  162. content: "";
  163. position: absolute;
  164. left: 50%;
  165. top: 50%;
  166. margin-top:-8upx ;
  167. margin-left:-8upx ;
  168. background: #3384FF;
  169. }
  170. }
  171. .name{
  172. font-size: 30upx;
  173. color: #0a0a0a;
  174. padding-left: 15upx;
  175. }
  176. }
  177. .desc,.aiDiagnose{
  178. display: -webkit-box;
  179. -webkit-box-orient: vertical;
  180. -webkit-line-clamp: 3;
  181. overflow: hidden;
  182. text-align: justify;
  183. color: #333;
  184. line-height: 40upx;
  185. }
  186. .tags{
  187. padding-top: 16upx;
  188. .item{
  189. display: inline-block;
  190. color: #409eff;
  191. border: 1px solid #d9ecff;
  192. background-color: #ecf5ff;
  193. margin-right: 8upx;
  194. padding: 4upx 12upx;
  195. border-radius: 4upx;
  196. font-size: 22upx;
  197. margin-bottom: 10upx;
  198. padding-bottom: 20upx;
  199. }
  200. }
  201. &.assist-container{
  202. .head-highlight{
  203. color: #3384ff;
  204. font-size: 30upx;
  205. }
  206. }
  207. &.image-container{
  208. .item-cont{
  209. display: flex;
  210. justify-content: flex-start;
  211. flex-direction: column;
  212. .imgbox{
  213. width: 220upx;
  214. height: 220upx;
  215. border-radius: 6upx;
  216. overflow: hidden;
  217. margin-right: 15upx;
  218. border: 1px solid #eaeaea;
  219. image{
  220. display: block;
  221. width: 220upx;
  222. height: 220upx;
  223. }
  224. }
  225. }
  226. }
  227. }
  228. .consult-container{
  229. display: flex;
  230. justify-content: center;
  231. align-items: center;
  232. padding-top: 20upx;
  233. .suggest{
  234. width: 440upx;
  235. height: 80upx;
  236. text-align: center;
  237. line-height: 80upx;
  238. color: #3384FF;
  239. border:1px solid #1ea5ff;
  240. background-color: #fff;
  241. border-radius: 10upx;
  242. font-size: 28upx;
  243. .zhcx-iconfont{
  244. padding-right: 10upx;
  245. }
  246. }
  247. .consult{
  248. width: 200upx;
  249. height: 80upx;
  250. text-align: center;
  251. line-height: 80upx;
  252. background-color: #3384FF;
  253. color: #fff;
  254. border-radius: 10upx;
  255. margin-left: 26upx;
  256. font-size: 32upx;
  257. }
  258. }
  259. .recommendBt{
  260. width: 300upx;
  261. height: 80upx;
  262. text-align: center;
  263. line-height: 80upx;
  264. background-color: #3384FF;
  265. color: #fff;
  266. border-radius: 10upx;
  267. font-size: 32upx;
  268. margin-top: 30upx;
  269. }
  270. }
  271. </style>