HospitalServiceHome.vue 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  1. <template>
  2. <window-size :showBackNav="false">
  3. <div class="logo-div">
  4. <div style="display: flex">
  5. <div><img src="../../assets/thyy_logo.png" style="height: 60px" /></div>
  6. <div style="color: #00525e">
  7. <h3>医疗服务平台</h3>
  8. </div>
  9. </div>
  10. <div style="font-size: 13px">
  11. <i class="van-icon van-icon-user-o"></i>
  12. <span style="margin-left: 4px; color: #777" @click="router.push('/myPatientIdCards')">{{
  13. defaultPatientId
  14. }}</span>
  15. </div>
  16. </div>
  17. <div class="big-box xinguanjiance" @click="routeTo(filterPath('/selectCovidBranch/', '/selectOrderCovidPatient'))">
  18. <div>
  19. <img class="large-icon" src="../../assets/hospital-service/xinguanjiance2.png" />
  20. </div>
  21. <div class="hsjctext">核酸检测</div>
  22. </div>
  23. <div id="router-lane">
  24. <div style="height: 10px"></div>
  25. <van-row gutter="5">
  26. <van-col span="6" @click="routeTo('/appointment')">
  27. <img src="../../assets/hospital-service/yuyueguahao.png" />
  28. <div class="icon-label">预约挂号</div>
  29. </van-col>
  30. <van-col span="6" @click="routeTo(filterPath('/unPaidList/', '/selectPayPatient'))">
  31. <img src="../../assets/hospital-service/menzhenjiaofei.png" />
  32. <div class="icon-label">门诊缴费</div>
  33. </van-col>
  34. <van-col span="6" @click="routeTo(filterPath('/checkExamIndex/', '/selectExamPatient'))">
  35. <img src="../../assets/hospital-service/baogaochaxun.png" />
  36. <div class="icon-label">报告查询</div>
  37. </van-col>
  38. <van-col span="6" @click="routeTo(filterPath('/inPatientService/', '/selectInpatientCard'))">
  39. <img src="../../assets/hospital-service/zhuyuanfuwu.png" />
  40. <div class="icon-label">住院服务</div>
  41. </van-col>
  42. </van-row>
  43. <div style="height: 10px"></div>
  44. <van-row gutter="5">
  45. <van-col span="6" @click="routeTo(filterPath('/assessments/', '/selectAssessmentPatient'))">
  46. <img src="../../assets/hospital-service/wenjuandiaocha.png" />
  47. <div class="icon-label">问卷调查</div>
  48. </van-col>
  49. <van-col span="6" @click="routeTo(filterPath('/physicalExamIndex/', '/selectPhysicalExamPatient'))">
  50. <img src="../../assets/hospital-service/tijianbaogao.png" />
  51. <div class="icon-label">体检报告</div>
  52. </van-col>
  53. <van-col span="6" @click="routeTo(filterPath('/healthCartCategory/', '/selectHealthCartPatient'))">
  54. <img src="../../assets/hospital-service/gouwuche.png" />
  55. <div class="icon-label">自助预约</div>
  56. </van-col>
  57. <van-col span="6" @click="routeTo('/onlineConsult')">
  58. <img src="../../assets/hospital-service/online-consult.png" />
  59. <div class="icon-label">在线咨询</div>
  60. </van-col>
  61. </van-row>
  62. </div>
  63. <div style="position: relative; width: 95%; margin-top: 10px; height: 70px; display: flex">
  64. <div
  65. style="
  66. width: 45%;
  67. margin-left: 5%;
  68. height: 70px;
  69. background-size: 100%;
  70. border-radius: 8px;
  71. display: flex;
  72. align-items: center;
  73. background-image: url('http://staticweb.hnthyy.cn/images/ybdzpzrk.png');
  74. "
  75. @click="toybdzpz"
  76. >
  77. </div>
  78. <div
  79. style="
  80. width: 45%;
  81. margin-left: 5%;
  82. height: 70px;
  83. background-size: 100%;
  84. border-radius: 8px;
  85. display: flex;
  86. align-items: center;
  87. background-image: url('http://staticweb.hnthyy.cn/images/dzjkkrk.png');
  88. "
  89. @click="todzjkk"
  90. >
  91. </div>
  92. </div>
  93. <div style="width: 90%; margin-left: 5%; margin-top: 15px">
  94. <van-tag size="large" type="warning">名医直达</van-tag>
  95. </div>
  96. <div :style="swipeStyle">
  97. <div :style="loadingStyle" v-show="loading">
  98. <van-loading size="24px" type="spinner" vertical></van-loading>
  99. </div>
  100. <van-swipe :autoplay="10000" :show-indicators="false" vertical style="height: 100%">
  101. <van-swipe-item v-for="(arr, index) in doctors" :key="index">
  102. <div :style="swipeRowStyle" v-for="item in arr" :key="item.doctorCode" @click="clickDoctor(item)">
  103. <van-image
  104. round
  105. fit="cover"
  106. style="margin-top: 5px; margin-left: 5px"
  107. :width="portraitWidth"
  108. :height="portraitHeight"
  109. :src="'data:image/png;base64,' + item.portrait"
  110. />
  111. <div :style="infoStyle">
  112. {{ item.doctorName }} | {{ item.deptName }} | {{ item.doctorTitle }}
  113. <div v-show="item.introduction" :style="specialtyStyle">{{ item.introduction }}</div>
  114. </div>
  115. </div>
  116. </van-swipe-item>
  117. </van-swipe>
  118. </div>
  119. </window-size>
  120. </template>
  121. <script>
  122. import { computed, onMounted, ref } from 'vue'
  123. import store from '../../store'
  124. import { getDate } from '../../utils/date'
  125. import router from '../../router'
  126. import axios from 'axios'
  127. import {Toast} from "vant";
  128. export default {
  129. setup() {
  130. const windowSize = store.state.windowSize
  131. const swipeStyle = {
  132. width: '90%',
  133. marginLeft: '5%',
  134. marginTop: '5px',
  135. height: windowSize.h - 460 + 'px',
  136. h: windowSize.h - 460,
  137. w: windowSize.w * 0.9,
  138. }
  139. const swipeRowStyle = {
  140. width: '100%',
  141. height: swipeStyle.h / 3 - 5 + 'px',
  142. marginBottom: '5px',
  143. borderRadius: '8px',
  144. backgroundColor: '#00525e',
  145. backgroundImage: 'linear-gradient(to bottom right, #03a0b8, #00525e)',
  146. display: 'flex',
  147. h: swipeStyle.h / 3 - 5,
  148. color: 'white',
  149. }
  150. const loadingStyle = {
  151. position: 'fixed',
  152. top: 400 + swipeStyle.h / 2 - 32 + 'px',
  153. left: 0,
  154. right: 0,
  155. bottom: '50px',
  156. }
  157. const portraitHeight = swipeRowStyle.h - 10 + 'px'
  158. const portraitWidth = swipeRowStyle.h * 0.65 + 'px'
  159. const infoStyle = {
  160. width: swipeStyle.w - swipeRowStyle.h * 0.65 - 10 + 'px',
  161. height: '32px',
  162. fontSize: '13px',
  163. fontWeight: 'bold',
  164. marginLeft: '10px',
  165. marginTop: swipeRowStyle.h / 2 - 20 + 'px',
  166. }
  167. const specialtyStyle = {
  168. overflow: 'hidden',
  169. textOverflow: 'ellipsis',
  170. whiteSpace: 'nowrap',
  171. fontSize: '12px',
  172. fontWeight: 'normal',
  173. paddingRight: '15px',
  174. }
  175. const cards = computed(() => {
  176. return store.state.patientCards
  177. })
  178. const filterPath = (singleCardPath, multipleCardsPath) => {
  179. return cards.value.length === 1 ? singleCardPath + cards.value[0].patientId : multipleCardsPath
  180. }
  181. const defaultPatientId = computed(() => {
  182. if (cards.value.length === 0) {
  183. return '未绑卡'
  184. }
  185. if (cards.value.length === 1) {
  186. return cards.value[0].patientId
  187. }
  188. for (let i = 0; i < cards.value.length; i++) {
  189. if (cards.value[i].isDefault === 1) {
  190. return cards.value[i].patientId
  191. }
  192. }
  193. })
  194. const doctors = computed(() => {
  195. return store.state.homePageDoctors
  196. })
  197. const date = getDate()
  198. const clickDoctor = (val) => {
  199. const path = '/doctorArrangement/' + date + '/' + val.deptCode + '/' + val.doctorCode
  200. router.push(path)
  201. }
  202. const routeTo = (val) => {
  203. router.push(val)
  204. }
  205. const toVaccinateAppointment = () => {
  206. if (cards.value.length === 1) {
  207. window.open('http://www.hnthyy.cn:8080/covidVaccinate/' + cards.value[0].patientId, '_self')
  208. } else {
  209. router.push('/selectCovidVaccinatePatient')
  210. }
  211. }
  212. const toybdzpz = () => {
  213. store.commit('SET_LOADING', true)
  214. window.location.href =
  215. 'https://mp.weixin.qq.com/insurance/card/creditjump?cityid=430100&from=u1ZYLGrYTJspxoHAQoU96w.%3D#wechat_redirect'
  216. }
  217. const todzjkk = () => {
  218. router.push('/electronicHealthCardHome')
  219. }
  220. const loading = ref(false)
  221. onMounted(() => {
  222. if (doctors.value.length === 0) {
  223. loading.value = true
  224. const url = import.meta.env.VITE_BASE_URL + '/homepage/selectHomePageDoctors'
  225. axios({
  226. withCredentials: true,
  227. url: url,
  228. }).then((res) => {
  229. store.commit('SET_HOMEPAGEDOCTORS', res.data.data)
  230. loading.value = false
  231. })
  232. }
  233. })
  234. return {
  235. filterPath,
  236. doctors,
  237. router,
  238. clickDoctor,
  239. swipeStyle,
  240. swipeRowStyle,
  241. portraitHeight,
  242. portraitWidth,
  243. infoStyle,
  244. specialtyStyle,
  245. defaultPatientId,
  246. routeTo,
  247. toVaccinateAppointment,
  248. loadingStyle,
  249. loading,
  250. toybdzpz,
  251. todzjkk,
  252. }
  253. },
  254. }
  255. </script>
  256. <style scoped>
  257. .logo-div {
  258. width: 92.5%;
  259. margin-left: 3%;
  260. height: 60px;
  261. line-height: 60px;
  262. display: flex;
  263. justify-content: space-between;
  264. }
  265. .big-box {
  266. margin-top: 10px;
  267. width: 90%;
  268. margin-left: 5%;
  269. height: 70px;
  270. background-size: 100%;
  271. border-radius: 8px;
  272. display: flex;
  273. align-items: center;
  274. }
  275. .hsjctext {
  276. font-size: 36px;
  277. color: rgba(4, 59, 104, 0.9);
  278. font-weight: bold;
  279. padding-left: 8px;
  280. }
  281. .large-icon {
  282. margin-left: 10px;
  283. margin-top: 11px;
  284. }
  285. .xinguanjiance {
  286. background: url('../../assets/hospital-service/xinguanjiancebackground.png') no-repeat !important;
  287. background-size: 100% !important;
  288. }
  289. .bold-text {
  290. font-weight: bold;
  291. }
  292. #router-lane .van-col {
  293. text-align: center;
  294. }
  295. #router-lane img {
  296. width: 32px;
  297. height: 32px;
  298. }
  299. .icon-label {
  300. font-size: 13px;
  301. color: #333;
  302. /* color:#048a9e; */
  303. }
  304. .doctor-loading-box {
  305. position: fixed;
  306. display: inline-block;
  307. width: 120px;
  308. padding: 15px 0;
  309. vertical-align: middle;
  310. background-color: #fff;
  311. border-radius: 4px;
  312. border: 1px solid #ebeef5;
  313. box-shadow: 1px 2px 9px 5px rgba(0, 0, 0, 0.1);
  314. }
  315. </style>